public class CUDAVolumeOperator extends VolumeOperator
VolumeOperator
VolumeOperator.FILTER_TYPE
Constructor and Description |
---|
CUDAVolumeOperator() |
Modifier and Type | Method and Description |
---|---|
int |
abs(Volume3D vol)
Determines the absolute volume of the input volume.
If the input volume is real Math.abs() is called for each element. If the input volume is complex the power spectrum is computed. |
int |
addScalar(Volume3D vol,
float realPart,
float imagPart)
Adds a scalar to the Volume3D.
|
int |
addVolume(Volume3D vol1,
Volume3D vol2)
Adds the second volume to the first volume.
|
int |
addVolume(Volume3D vol1,
Volume3D vol2,
double weight)
Adds the second volume
![]() ![]() ![]() The first volume is overwritten. |
void |
cleanup() |
Volume3D |
createDirectionalWeights(int dimensions,
int[] size,
float[] dim,
float[] dir,
int A,
VolumeOperator.FILTER_TYPE t_filt)
Creates an anisotropic, i.e.
|
Volume3D |
createExponentialDirectionalHighPassFilter(int dimensions,
int[] size,
float[] dim,
float[] dir,
int A,
float B,
float ri,
VolumeOperator.FILTER_TYPE t_filt)
Creates an radially symetric anisotropic quadrature filter according to this definition:
%preamble{\\usepackage{amsmath}} \\begin{align*}
F(\\mathbf{u}) & = \\left \\{ \\begin{array}{ll} \\left(\\frac{\\displaystyle (\\mathbf{u} \\cdot \\hat{\\mathbf{n}}_k)}{\\displaystyle |\\rho|}\\right)^{2A} \\cdot R(\\rho)& \\text{if}\\qquad\\mathbf{u} \\cdot \\hat{\\mathbf{n}}_k >0 \\\\ 0 & \\text{else} \\end{array} \\right .
|
Volume3D |
createGaussLowPassFilter(int dimensions,
int[] size,
float[] dim,
float alpha)
Creates an isotropic, i.e.
|
Volume3D |
createHighPassFilter(int dimensions,
int[] size,
float[] dim,
int filt_loop,
float lp_upper)
Creates a directional high pass filter
![]() |
Volume3D |
createLowPassFilter(int dimensions,
int[] size,
float[] dim,
float lp_upper)
Creates an isotropic low-pass filter, i.e.
|
Volume3D |
createVolume(ij.ImagePlus image,
int mirror,
int cuty,
boolean uneven)
Creates a Volume3D Object from an ImagePlus.
|
Volume3D |
createVolume(int[] size,
float[] dim,
int in_dim)
Creates a new empty volume according to the parameters.
|
int |
divideByVolume(Volume3D vol1,
Volume3D vol2)
Divides the first volume by the second volume element by element
|
int |
fftShift(Volume3D vol)
Performs the shift required for the FFT, i.e.
|
void |
fill(Volume3D vol,
float number) |
int |
imag(Volume3D vol)
Maps a complex volume onto its imaginary part.
|
void |
initCUDA() |
void |
makeComplex(Volume3D vol)
Makes the volume complex, i.e.
|
float |
max(Volume3D vol)
Determines the maximum intensity of a pixel in the given volume.
|
float |
mean(Volume3D vol)
Determines the arithmetic average
![]() ![]() ![]() |
float |
min(Volume3D vol)
Determines the minimum intensity of the volume.
|
int |
minOfTwoVolumes(Volume3D vol1,
Volume3D vol2)
Determines the minimal volume element by element.
The output is stored in the first volume. |
int |
multiply(Volume3D vol1,
Volume3D vol2)
Multiplies two volumes element by element.
|
int |
multiplyScalar(Volume3D vol,
float realPart,
float imagPart)
Multiplies the volume by a scalar.
|
int |
real(Volume3D vol)
Maps volume onto its real part.
|
int |
sigmoid(Volume3D vol,
float smoothing,
float lowValue,
float highValue,
float highPassLowerLevel,
float highPassUpperLevel)
Remaps gray values using a sigmoid function.
|
Volume3D |
solveMaximumEigenvalue(Volume3D[][] structureTensor)
Method to compute the maximal eigenvalue
![]() |
int |
sqrt(Volume3D vol)
Replaces every element in the volume with the output of Math.sqrt(), i.e.
|
int |
upperLimit(Volume3D vol,
float max)
Iterates the volume and replaces all entries greater than max with max.
|
divideScalar, getFrequencyBoundings, subtractVolume
public void initCUDA()
public void cleanup()
public void fill(Volume3D vol, float number)
public int divideByVolume(Volume3D vol1, Volume3D vol2)
VolumeOperator
divideByVolume
in class VolumeOperator
vol1
- the first volumevol2
- the second volumepublic Volume3D solveMaximumEigenvalue(Volume3D[][] structureTensor)
VolumeOperator
solveMaximumEigenvalue
in class VolumeOperator
structureTensor
- the structure tensor as 2D array of volumes.public Volume3D createDirectionalWeights(int dimensions, int[] size, float[] dim, float[] dir, int A, VolumeOperator.FILTER_TYPE t_filt)
VolumeOperator
createDirectionalWeights
in class VolumeOperator
dimensions
- dimension should be 3size
- number of pixels per dimensiondim
- resolutiondir
- direction vector A
- parameter At_filt
- filter typepublic Volume3D createVolume(int[] size, float[] dim, int in_dim)
VolumeOperator
createVolume
in class VolumeOperator
size
- the sizes in each direction as arraydim
- the spacing of the pixels in mm in each directionin_dim
- the internal dimension (1 = real, 2 = complex)public Volume3D createExponentialDirectionalHighPassFilter(int dimensions, int[] size, float[] dim, float[] dir, int A, float B, float ri, VolumeOperator.FILTER_TYPE t_filt)
VolumeOperator
createExponentialDirectionalHighPassFilter
in class VolumeOperator
dimensions
- dimension should be 3size
- number of pixels per dimensiondim
- resolutiondir
- the filter direction A
- factor AB
- the relative bandwith of the filter Bri
- t_filt
- parameter toVolumeOperator.fftShift(Volume3D)
public int fftShift(Volume3D vol)
VolumeOperator
fftShift
in class VolumeOperator
vol
- the volumepublic Volume3D createHighPassFilter(int dimensions, int[] size, float[] dim, int filt_loop, float lp_upper)
VolumeOperator
createHighPassFilter
in class VolumeOperator
dimensions
- dimension should be 3size
- number of pixels per dimensiondim
- resolutionfilt_loop
- lp_upper
- VolumeOperator.fftShift(Volume3D)
,
VolumeOperator.createDirectionalWeights(int, int[], float[], float[], int, FILTER_TYPE)
public int multiply(Volume3D vol1, Volume3D vol2)
VolumeOperator
multiply
in class VolumeOperator
vol1
- the first volumevol2
- the second volumepublic Volume3D createVolume(ij.ImagePlus image, int mirror, int cuty, boolean uneven)
VolumeOperator
createVolume
in class VolumeOperator
image
- the ImagePlus with the image datamirror
- the number of pixels which are mirrored at the boundarycuty
- number of pixels to be cut from the ImagePlus (in order to remove emtpy areas at the top and the bottom of the imageuneven
- true if the original number of slices was uneven (may have been altered by cutting y)Volume3D.Volume3D(ImagePlus, int, int, boolean)
public void makeComplex(Volume3D vol)
VolumeOperator
makeComplex
in class VolumeOperator
vol
- the volumepublic Volume3D createLowPassFilter(int dimensions, int[] size, float[] dim, float lp_upper)
VolumeOperator
createLowPassFilter
in class VolumeOperator
dimensions
- dimension should be 3size
- number of pixels per dimensiondim
- resolutionlp_upper
- VolumeOperator.fftShift(Volume3D)
public Volume3D createGaussLowPassFilter(int dimensions, int[] size, float[] dim, float alpha)
VolumeOperator
createGaussLowPassFilter
in class VolumeOperator
VolumeOperator.fftShift(Volume3D)
public int sigmoid(Volume3D vol, float smoothing, float lowValue, float highValue, float highPassLowerLevel, float highPassUpperLevel)
VolumeOperator
sigmoid
in class VolumeOperator
vol
- the volumesmoothing
- slope of sigmoidlowValue
- the lower input limithighValue
- the upper input limithighPassLowerLevel
- the lower output valuehighPassUpperLevel
- the upper output valuepublic int addVolume(Volume3D vol1, Volume3D vol2)
VolumeOperator
addVolume
in class VolumeOperator
vol1
- the first volumevol2
- the second volumepublic int real(Volume3D vol)
VolumeOperator
real
in class VolumeOperator
vol
- the volume to be mapped.public int imag(Volume3D vol)
VolumeOperator
imag
in class VolumeOperator
vol
- the volumepublic int addVolume(Volume3D vol1, Volume3D vol2, double weight)
VolumeOperator
addVolume
in class VolumeOperator
vol1
- the first volume vol2
- the second volume weight
- the weighting factor public float min(Volume3D vol)
VolumeOperator
min
in class VolumeOperator
vol
- the volumepublic int minOfTwoVolumes(Volume3D vol1, Volume3D vol2)
VolumeOperator
minOfTwoVolumes
in class VolumeOperator
vol1
- the first volumevol2
- the second volumepublic float mean(Volume3D vol)
VolumeOperator
mean
in class VolumeOperator
vol
- the volumepublic float max(Volume3D vol)
VolumeOperator
max
in class VolumeOperator
vol
- the volumepublic int addScalar(Volume3D vol, float realPart, float imagPart)
VolumeOperator
addScalar
in class VolumeOperator
vol
- the volumerealPart
- the real partimagPart
- the imaginary partVolumeOperator.makeComplex(Volume3D)
public int abs(Volume3D vol)
VolumeOperator
abs
in class VolumeOperator
vol
- the input volume.public int multiplyScalar(Volume3D vol, float realPart, float imagPart)
VolumeOperator
multiplyScalar
in class VolumeOperator
vol
- the volumerealPart
- the real part of the scalarimagPart
- the imaginary part of the scalarVolumeOperator.makeComplex(Volume3D)
public int sqrt(Volume3D vol)
VolumeOperator
sqrt
in class VolumeOperator
vol
- the volume to be processed.public int upperLimit(Volume3D vol, float max)
VolumeOperator
upperLimit
in class VolumeOperator
vol
- the volumemax
- the maximum