diff --git a/client/src/components/geoJS/LayerManager.vue b/client/src/components/geoJS/LayerManager.vue index 4ab7b5c7..33b454c3 100644 --- a/client/src/components/geoJS/LayerManager.vue +++ b/client/src/components/geoJS/LayerManager.vue @@ -748,6 +748,22 @@ export default defineComponent({ watch([backgroundColor, colorScheme], updateColorFilter); + function convMatrixFromOrder(order: number) { + let matrix = ''; + for (let i = 0; i < order; i++) { + for (let j = 0; j < order; j++) { + matrix += `1${j === order - 1 ? '': ' '}`; + } + matrix += `${i === order - 1 ? '' : '\n'}`; + } + return matrix; + } + + // Knobs for testing blur filters + const contrast = ref({slope: 1.2, intercept: -0.1}); + const gaussianBlur = ref({ stdDeviation: 1.5 }); + const convolutionMatrix = ref({ order: 5 }); + return { annotationState, localAnnotations, @@ -757,6 +773,10 @@ export default defineComponent({ rValues, gValues, bValues, + contrast, + gaussianBlur, + convolutionMatrix, + convMatrixFromOrder, }; }, }); @@ -796,7 +816,6 @@ export default defineComponent({ values="0" result="grayscale" /> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/src/components/geoJS/geoJSUtils.ts b/client/src/components/geoJS/geoJSUtils.ts index 34df93c6..a25e7975 100644 --- a/client/src/components/geoJS/geoJSUtils.ts +++ b/client/src/components/geoJS/geoJSUtils.ts @@ -121,7 +121,10 @@ const useGeoJS = () => { }); } clearQuadFeatures(); - quadFeatureLayer.node().css("filter", "url(#apply-color-scheme)"); + // quadFeatureLayer.node().css("filter", "url(#apply-color-scheme)"); + // quadFeatureLayer.node().css("filter", "url(#spectro-smoothing-gaussian)"); + // quadFeatureLayer.node().css("filter", "url(#spectro-smoothing-convo)"); + quadFeatureLayer.node().css("filter", "url(#spectro-smoothing-combined)"); for (let i = 0; i < imageCount; i += 1) { quadFeatures.push(quadFeatureLayer.createFeature("quad")); }