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

Refactor

parent 4a7502bf
Branches
No related tags found
1 merge request!41Resolve "Consider rescaling (binning) large images"
...@@ -28,12 +28,14 @@ ...@@ -28,12 +28,14 @@
*/ */
package fr.pasteur.ida.zellige.steps; package fr.pasteur.ida.zellige.steps;
import net.imglib2.RandomAccess; import net.imglib2.*;
import net.imglib2.RandomAccessible;
import net.imglib2.RandomAccessibleInterval;
import net.imglib2.algorithm.gauss3.Gauss3; import net.imglib2.algorithm.gauss3.Gauss3;
import net.imglib2.img.Img;
import net.imglib2.type.NativeType; import net.imglib2.type.NativeType;
import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.RealType;
import net.imglib2.type.numeric.real.FloatType;
import net.imglib2.view.IterableRandomAccessibleInterval;
import net.imglib2.view.RandomAccessibleIntervalCursor;
import net.imglib2.view.Views; import net.imglib2.view.Views;
...@@ -62,6 +64,14 @@ public class Utils ...@@ -62,6 +64,14 @@ public class Utils
Gauss3.gauss( sigma, infiniteInput, output ); Gauss3.gauss( sigma, infiniteInput, output );
} }
public static < T extends RealType< T > & NativeType< T > > void
gaussianConvolution_( RandomAccessibleInterval< T > input, Img< FloatType > output,
double[] sigma )
{
RandomAccessible< T > infiniteInput = Views.extendValue( input, input.randomAccess().get().getRealFloat() );
Gauss3.gauss( sigma, infiniteInput, output );
}
public static < T extends RealType< T > & NativeType< T > > void setPosition( RandomAccess< T > randomAccess, int u, int v ) public static < T extends RealType< T > & NativeType< T > > void setPosition( RandomAccess< T > randomAccess, int u, int v )
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment