A
- - The input Type
B
- - The NumericType
used to compute the gaussian convolutionC
- - The output Type
public class GaussianConvolution3<A extends Type<A>,B extends NumericType<B>,C extends Type<C>> extends Object implements MultiThreaded, OutputAlgorithm<C>, Benchmark
Type
(A) for which is defined how to convert it into a NumericType
(B) on which the convolution is performed and back to the desired output Type
(C).
Of course A and C can be same. Note that the kernel precision is limited to double here.Constructor and Description |
---|
GaussianConvolution3(Image<A> image,
ImageFactory<B> factoryProcess,
ImageFactory<C> factoryOut,
OutOfBoundsStrategyFactory<B> outOfBoundsFactory,
Converter<A,B> converterIn,
Converter<B,C> converterOut,
double sigma) |
GaussianConvolution3(Image<A> image,
ImageFactory<B> factoryProcess,
ImageFactory<C> factoryOut,
OutOfBoundsStrategyFactory<B> outOfBoundsFactory,
Converter<A,B> converterIn,
Converter<B,C> converterOut,
double[] sigma) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkInput() |
protected void |
computeKernel() |
protected void |
convolve(LocalizableByDimCursor<B> inputIterator,
LocalizableCursor<B> outputIterator,
int dim,
double[] kernel,
long startPos,
long loopSize) |
protected void |
convolveDim(LocalizableByDimCursor<B> inputIterator,
LocalizableCursor<B> outputIterator,
int currentDim,
long startPos,
long loopSize) |
protected static double[] |
createArray(Image<?> image,
double sigma) |
protected Image<C> |
getConvolvedImage() |
String |
getErrorMessage() |
Image<A> |
getImage() |
protected Image<B> |
getInputImage() |
protected LocalizableByDimCursor<B> |
getInputIterator(Image<B> temp1,
Image<B> temp2,
int currentDim) |
int |
getKernelSize(int dim) |
int |
getNumThreads()
The number of threads used by the algorithm
|
protected LocalizableCursor<B> |
getOutputIterator(Image<B> temp1,
Image<B> temp2,
int currentDim) |
long |
getProcessingTime() |
Image<C> |
getResult() |
double[] |
getSigma() |
double[] |
getSigmas()
The sigma the image was convolved with
|
protected Image<B> |
getTempImage1(int currentDim) |
protected Image<B> |
getTempImage2(int currentDim) |
boolean |
process() |
protected boolean |
processWithOptimizedMethod() |
void |
setImage(Image<A> image) |
void |
setNumThreads()
Sets the number of threads to the amount of processors available
|
void |
setNumThreads(int numThreads)
Sets the number of threads
|
void |
setSigma(double sigma) |
void |
setSigma(double[] sigma) |
public GaussianConvolution3(Image<A> image, ImageFactory<B> factoryProcess, ImageFactory<C> factoryOut, OutOfBoundsStrategyFactory<B> outOfBoundsFactory, Converter<A,B> converterIn, Converter<B,C> converterOut, double[] sigma)
public GaussianConvolution3(Image<A> image, ImageFactory<B> factoryProcess, ImageFactory<C> factoryOut, OutOfBoundsStrategyFactory<B> outOfBoundsFactory, Converter<A,B> converterIn, Converter<B,C> converterOut, double sigma)
protected static double[] createArray(Image<?> image, double sigma)
protected void computeKernel()
public void setSigma(double sigma)
public void setSigma(double[] sigma)
public double[] getSigma()
public long getProcessingTime()
getProcessingTime
in interface Benchmark
public void setNumThreads()
MultiThreaded
setNumThreads
in interface MultiThreaded
public void setNumThreads(int numThreads)
MultiThreaded
setNumThreads
in interface MultiThreaded
numThreads
- - number of threads to usepublic int getNumThreads()
MultiThreaded
getNumThreads
in interface MultiThreaded
public double[] getSigmas()
public int getKernelSize(int dim)
public Image<C> getResult()
getResult
in interface OutputAlgorithm<C extends Type<C>>
public boolean checkInput()
checkInput
in interface Algorithm
public String getErrorMessage()
getErrorMessage
in interface Algorithm
protected LocalizableByDimCursor<B> getInputIterator(Image<B> temp1, Image<B> temp2, int currentDim)
protected LocalizableCursor<B> getOutputIterator(Image<B> temp1, Image<B> temp2, int currentDim)
protected boolean processWithOptimizedMethod()
protected void convolveDim(LocalizableByDimCursor<B> inputIterator, LocalizableCursor<B> outputIterator, int currentDim, long startPos, long loopSize)
protected void convolve(LocalizableByDimCursor<B> inputIterator, LocalizableCursor<B> outputIterator, int dim, double[] kernel, long startPos, long loopSize)
Copyright © 2015–2021 Fiji. All rights reserved.