Class CUDASeparableConvolutionFunctions
java.lang.Object
net.preibisch.mvrecon.process.cuda.CUDASeparableConvolutionFunctions
Executes gaussian convolution using the native CUDA implementation
(https://github.com/StephanPreibisch/SeparableConvolutionCUDALib)
- Author:
- Stephan Preibisch (stephan.preibisch@gmx.de)
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCUDASeparableConvolutionFunctions(CUDASeparableConvolution cuda, int cudaDeviceId) -
Method Summary
Modifier and TypeMethodDescriptionbooleangauss(float[] img, int[] dim, double sigma) Compute Gaussian convolution with and extend-border-pixels outofbounds strategybooleangauss(float[] img, int[] dim, double[] sigma) Compute Gaussian convolution with and extend-border-pixels outofbounds strategybooleangauss(float[] img, int[] dim, double[] sigma, CUDASeparableConvolutionFunctions.OutOfBounds oobs, float oobsValue) Compute Gaussian convolutionstatic final booleangauss(float[] img, int[] dim, double[] sigma, CUDASeparableConvolutionFunctions.OutOfBounds oobs, float oobsValue, CUDASeparableConvolution cuda, int cudaDeviceId) Compute Gaussian convolutionbooleangauss(float[] img, int[] dim, double sigma, CUDASeparableConvolutionFunctions.OutOfBounds oobs, float oobsValue) Compute Gaussian convolutionstatic final booleangauss(float[] img, int[] dim, double sigma, CUDASeparableConvolutionFunctions.OutOfBounds oobs, float oobsValue, CUDASeparableConvolution cuda, int cudaDeviceId) Compute Gaussian convolutionbooleangauss(float[] img, int[] dim, float[] sigma) static float[][]getCUDAKernels(double[] sigma, int[] supportedKernelSizes) static float[]getFloatKernelPadded(double[] kernel, int size)
-
Constructor Details
-
CUDASeparableConvolutionFunctions
-
-
Method Details
-
gauss
public boolean gauss(float[] img, int[] dim, double sigma) Compute Gaussian convolution with and extend-border-pixels outofbounds strategy- Parameters:
img- - the image (1d/2d/3d) as flat float arraydim- - the dimensions of the image in 1d/2d/3dsigma- - the sigma for all dimensions- Returns:
- success? true or false
-
gauss
public boolean gauss(float[] img, int[] dim, double[] sigma) Compute Gaussian convolution with and extend-border-pixels outofbounds strategy- Parameters:
img- - the image (1d/2d/3d) as flat float arraydim- - the dimensions of the image in 1d/2d/3dsigma- - the sigma per dimension- Returns:
- success? true or false
-
gauss
public boolean gauss(float[] img, int[] dim, float[] sigma) -
gauss
public boolean gauss(float[] img, int[] dim, double sigma, CUDASeparableConvolutionFunctions.OutOfBounds oobs, float oobsValue) Compute Gaussian convolution- Parameters:
img- - the image (1d/2d/3d) as flat float arraydim- - the dimensions of the image in 1d/2d/3dsigma- - the sigma for all dimensionsoobs- - the OutOfBounds strategyoobsValue- - value to use in oobs- Returns:
- success? true or false
-
gauss
public boolean gauss(float[] img, int[] dim, double[] sigma, CUDASeparableConvolutionFunctions.OutOfBounds oobs, float oobsValue) Compute Gaussian convolution- Parameters:
img- - the image (1d/2d/3d) as flat float arraydim- - the dimensions of the image in 1d/2d/3dsigma- - the sigma per dimensionoobs- - the OutOfBounds strategyoobsValue- - the value for out of image pixels if the OutOfBoundsStrategy is OutOfBounds.VALUE- Returns:
- success? true or false
-
gauss
public static final boolean gauss(float[] img, int[] dim, double sigma, CUDASeparableConvolutionFunctions.OutOfBounds oobs, float oobsValue, CUDASeparableConvolution cuda, int cudaDeviceId) Compute Gaussian convolution- Parameters:
img- - the image (1d/2d/3d) as flat float arraydim- - the dimensions of the image in 1d/2d/3dsigma- - the sigma for all dimensionsoobs- - the OutOfBounds strategyoobsValue- - the value for out of image pixels if the OutOfBoundsStrategy is OutOfBounds.VALUEcuda- - TheCUDASeparableConvolutioninterface that loaded the external native librarycudaDeviceId- - which CUDA device to use, -1 means single-threaded computation on CPU using native code- Returns:
- success? true or false
-
gauss
public static final boolean gauss(float[] img, int[] dim, double[] sigma, CUDASeparableConvolutionFunctions.OutOfBounds oobs, float oobsValue, CUDASeparableConvolution cuda, int cudaDeviceId) Compute Gaussian convolution- Parameters:
img- - the image (1d/2d/3d) as flat float arraydim- - the dimensions of the image in 1d/2d/3dsigma- - the sigma per dimensionoobs- - the OutOfBounds strategyoobsValue- - the value for out of image pixels if the OutOfBoundsStrategy is OutOfBounds.VALUEcuda- - TheCUDASeparableConvolutioninterface that loaded the external native librarycudaDeviceId- - which CUDA device to use, -1 means single-threaded computation on CPU using native code- Returns:
- success? true or false
-
getCUDAKernels
public static float[][] getCUDAKernels(double[] sigma, int[] supportedKernelSizes) -
getFloatKernelPadded
public static float[] getFloatKernelPadded(double[] kernel, int size)
-