Skip to content
Snippets Groups Projects
Commit 999b19e7 authored by Céline  TREBEAU's avatar Céline TREBEAU
Browse files

Code cleanup

parent 187ddbee
No related branches found
No related tags found
1 merge request!41Resolve "Consider rescaling (binning) large images"
...@@ -82,7 +82,7 @@ public class Pretreatment< T extends RealType< T > & NativeType< T > > ...@@ -82,7 +82,7 @@ public class Pretreatment< T extends RealType< T > & NativeType< T > >
{ {
throw new BinningFailedException(); throw new BinningFailedException();
} }
Img< FloatType > output = gaussianBlurFilterDenoising( temp, temp.factory(), radius ); // Filtering op Img< FloatType > output = gaussianBlurFilterDenoising( temp, radius ); // Filtering op
// The denoised image is normalized between 0 and 255 // The denoised image is normalized between 0 and 255
output = normalizeImage( output, output.factory() ); // normalizing op output = normalizeImage( output, output.factory() ); // normalizing op
...@@ -129,11 +129,10 @@ public class Pretreatment< T extends RealType< T > & NativeType< T > > ...@@ -129,11 +129,10 @@ public class Pretreatment< T extends RealType< T > & NativeType< T > >
/** /**
* Applies a gaussian filter to a noisy image * Applies a gaussian filter to a noisy image
* *
* @param input the noisy image as a {@link RandomAccessibleInterval} * @param input the noisy image as a {@link RandomAccessibleInterval}
* @param factory the input factory
* @return a denoised image as a {@link Img} * @return a denoised image as a {@link Img}
*/ */
private static < T extends RealType< T > & NativeType< T > > Img< FloatType > gaussianBlurFilterDenoising( RandomAccessibleInterval< T > input, ImgFactory< T > factory, double radius ) private static < T extends RealType< T > & NativeType< T > > Img< FloatType > gaussianBlurFilterDenoising( RandomAccessibleInterval< T > input, double radius )
{ {
Dimensions dimensions = new FinalDimensions( input.dimension( 0 ), input.dimension( 1 ), input.dimension( 2 ) ); Dimensions dimensions = new FinalDimensions( input.dimension( 0 ), input.dimension( 1 ), input.dimension( 2 ) );
ImgFactory< FloatType > newImgFactory = Util.getArrayOrCellImgFactory(dimensions, new FloatType()); ImgFactory< FloatType > newImgFactory = Util.getArrayOrCellImgFactory(dimensions, new FloatType());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment