diff --git a/src/main/java/fr/pasteur/ida/zellige/steps/selection/pretreatment/Pretreatment.java b/src/main/java/fr/pasteur/ida/zellige/steps/selection/pretreatment/Pretreatment.java index 5b33412bfc50a14b4cacc6ca18a52f5e9bf377ed..c257cb24883610ef6633e867cf5dc7f91990bc28 100644 --- a/src/main/java/fr/pasteur/ida/zellige/steps/selection/pretreatment/Pretreatment.java +++ b/src/main/java/fr/pasteur/ida/zellige/steps/selection/pretreatment/Pretreatment.java @@ -28,19 +28,27 @@ */ package fr.pasteur.ida.zellige.steps.selection.pretreatment; +import io.scif.img.ImgOpener; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; +import net.imglib2.algorithm.convolution.fast_gauss.FastGauss; +import net.imglib2.algorithm.fft2.FFTConvolution; import net.imglib2.algorithm.gauss3.Gauss3; import net.imglib2.algorithm.stats.Normalize; import net.imglib2.converter.Converters; +import net.imglib2.converter.RealTypeConverters; import net.imglib2.converter.readwrite.RealFloatSamplerConverter; import net.imglib2.img.Img; import net.imglib2.img.ImgFactory; import net.imglib2.img.array.ArrayImgFactory; import net.imglib2.type.NativeType; +import net.imglib2.type.Type; import net.imglib2.type.numeric.RealType; +import net.imglib2.type.numeric.complex.ComplexFloatType; import net.imglib2.type.numeric.real.FloatType; import net.imglib2.util.ImgUtil; +import net.imglib2.util.RealSum; +import net.imglib2.view.IntervalView; import net.imglib2.view.Views; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -92,8 +100,9 @@ public class Pretreatment< T extends RealType< T > & NativeType< T > > * @return a new Img with normalize pixel intensity values. */ private static < T extends RealType< T > & NativeType< T > > Img< T > normalizeImage( - Img< T > image, ImgFactory< T > factory ) + RandomAccessibleInterval< T > image, ImgFactory< T > factory ) { + LOGGER.debug( "Staring normalization." ); Img< T > normalizedImage = factory.create( image ); ImgUtil.copy( image, normalizedImage ); T min = normalizedImage.firstElement().createVariable(); @@ -101,6 +110,7 @@ public class Pretreatment< T extends RealType< T > & NativeType< T > > T max = normalizedImage.firstElement().copy().createVariable(); max.setReal( 255 ); Normalize.normalize( normalizedImage, min, max ); + LOGGER.debug( "End of normalization." ); return normalizedImage; }