|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.jhmi.rad.medic.libraries.ImageFunctionsPublic
public class ImageFunctionsPublic
This class computes various basic image functions, e.g. gradient, convolution, interpolation.
| Constructor Summary | |
|---|---|
ImageFunctionsPublic()
|
|
| Method Summary | |
|---|---|
static void |
computeGradient(float[][][] img,
float[][][] dx,
float[][][] dy,
float[][][] dz,
int nx,
int ny,
int nz)
simple gradient (central differences) |
static void |
computeGradientHorn(float[][][] img,
float[][][] dx,
float[][][] dy,
float[][][] dz,
int nx,
int ny,
int nz)
Horn-like derivatives: use a 2x2 forward square as averaging the gradient images are passed from above |
static void |
computeGSTeigenvalues(float[][][] img,
float[][][][] values,
int nx,
int ny,
int nz)
gradient shape tensor: return the eigenvalues at each point |
static void |
computeHessian(float[][][] img,
float[][][][] hessian,
int nx,
int ny,
int nz)
simple Hessian |
static void |
computeHessianEigenvalues(float[][][] img,
float[][][][] values,
int nx,
int ny,
int nz)
simple Hessian |
static float[][][] |
convolution(float[][][] image,
int nx,
int ny,
int nz,
float[][][] kernel,
int kx,
int ky,
int kz)
convolution |
static float |
cubicLagrangianInterpolation3D(float[][][] image,
boolean[][][] mask,
float[][] wt,
float min,
float max,
float x,
float y,
float z,
int nx,
int ny,
int nz)
3D cubic Lagrangian function |
static float |
cubicLagrangianInterpolation3D(float[][][] image,
float[][] wt,
float min,
float max,
float x,
float y,
float z,
int nx,
int ny,
int nz)
3D cubic Lagrangian function |
static boolean |
exclusiveMaskInterpolation(boolean[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
interpolate a computation mask: where there is no data, the mask is set to false (generates a mask that is contained in the transformed image) |
static float[][][] |
gaussianKernel(float sx,
float sy,
float sz)
Gaussian kernel |
static float[][][] |
heatDiffusion(float[][][] image,
float scale,
float ratio,
int steps,
float dt,
int nx,
int ny,
int nz)
GVF-style diffusion on scalar images |
static float[][][] |
heatDiffusion(float[][][] image,
float ratio,
int steps,
float dt,
int nx,
int ny,
int nz)
GVF-style diffusion on scalar images |
static boolean |
inclusiveMaskInterpolation(boolean[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
interpolate a computation mask: where there is some data, the mask is set to true (generates a mask that contain the transformed image) |
static float |
linearDistanceInterpolation(float[][][] image,
float value,
float x,
float y,
float z,
int nx,
int ny,
int nz)
linear interpolation, with distance to boundary outside image |
static float |
linearGradientInterpolation(float[][][] image,
float value,
int dim,
float x,
float y,
float z,
int nx,
int ny,
int nz)
linear interpolation, with +/- value outside the image useful for interpolating gradients (suppose the gradient is +value away from the image) |
static float |
linearInterpolation(float[][][] image,
boolean[][][] mask,
float value,
float x,
float y,
float z,
int nx,
int ny,
int nz)
linear interpolation, with value outside the image and mask |
static float |
linearInterpolation(float[][][] image,
float value,
float x,
float y,
float z,
int nx,
int ny,
int nz)
linear interpolation, with value outside the image |
static float |
linearInterpolation(float[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
linear interpolation, with 0 outside the image |
static float |
linearInterpolation(float[] image,
float value,
float x,
float y,
float z,
int nx,
int ny,
int nz)
linear interpolation, with value outside the image |
static float |
linearInterpolationXderivative(float[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
exact derivatives of linear interpolation |
static float |
linearInterpolationXderivative(float[] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
exact derivatives of linear interpolation |
static float |
linearInterpolationYderivative(float[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
exact derivatives of linear interpolation |
static float |
linearInterpolationYderivative(float[] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
exact derivatives of linear interpolation |
static float |
linearInterpolationZderivative(float[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
exact derivatives of linear interpolation |
static float |
linearInterpolationZderivative(float[] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
exact derivatives of linear interpolation |
static boolean |
linearMaskInterpolation(boolean[][][] mask,
float x,
float y,
float z,
int nx,
int ny,
int nz)
interpolate a computation mask: the mask is true if the linear interpolant is above 0.5 |
static float |
linearMaskInterpolationValue(boolean[][][] mask,
float x,
float y,
float z,
int nx,
int ny,
int nz)
interpolate a computation mask: returns the linearly interpolated value in [0,1] |
static boolean |
maskInterpolation(boolean[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
interpolate a computation mask: where there is some data, the mask is set to true |
static byte |
maximum(byte[][][] img,
int nx,
int ny,
int nz)
maximum value of the image |
static float |
maximum(float[][][] img,
int nx,
int ny,
int nz)
maximum value of the image |
static int |
maximum(int[][][] img,
int nx,
int ny,
int nz)
maximum value of the image |
static float[][][] |
meanCurvature(float[][][] image,
int nx,
int ny,
int nz)
curvature estimation on a smooth distance function with no additionnal smoothing. |
static byte |
minimum(byte[][][] img,
int nx,
int ny,
int nz)
minimum value of the image |
static float |
minimum(float[][][] img,
int nx,
int ny,
int nz)
minimum value of the image |
static int |
minimum(int[][][] img,
int nx,
int ny,
int nz)
minimum value of the image |
static byte |
nearestNeighborInterpolation(byte[][][] image,
byte zero,
float x,
float y,
float z,
int nx,
int ny,
int nz)
linear interpolation, with given value outside the image |
static byte |
nearestNeighborInterpolation(byte[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
linear interpolation, with 0 outside the image |
static byte |
nearestNeighborInterpolation(byte[] image,
byte zero,
float x,
float y,
float z,
int nx,
int ny,
int nz)
linear interpolation, with given value outside the image |
static float |
nearestNeighborInterpolation(float[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
linear interpolation, with 0 outside the image |
static float[] |
nearestNeighborInterpolation(float[][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz,
int nd)
linear interpolation, with given value outside the image |
static int |
nearestNeighborInterpolation(int[][][] image,
int zero,
float x,
float y,
float z,
int nx,
int ny,
int nz)
linear interpolation, with given value outside the image |
static float |
robustMaximum(float[][][] image,
float ratio,
int scales,
int nx,
int ny,
int nz)
Robust maximum estimation |
static float |
robustMaximum(ImageData image,
float ratio,
int scales,
int nx,
int ny,
int nz)
Robust maximum estimation |
static float |
robustMinimum(float[][][] image,
float ratio,
int scales,
int nx,
int ny,
int nz)
Robust maximum estimation |
static float |
robustMinimum(ImageData image,
float ratio,
int scales,
int nx,
int ny,
int nz)
Robust maximum estimation |
static float[][][] |
separableConvolution(float[][][] image,
int nx,
int ny,
int nz,
float[][] kernel,
int kx,
int ky,
int kz)
convolution with a separable kernel (the kernel is 3x{kx,ky,kz}) |
static float[][] |
separableGaussianKernel(float sx,
float sy,
float sz)
Gaussian kernel for separable convolution |
static float[][] |
setup3DCubicLagrangianInterpolation()
Setup 3D cubic Lagrangian |
static float[][][][] |
subsample(float[][][][] image,
int nx,
int ny,
int nz,
int nv,
int factor)
scale down a vector image by a factor |
static float[][][] |
subsample(float[][][] image,
int nx,
int ny,
int nz,
int factor)
scale down by a factor |
static float[][] |
subsample(float[][] image,
int nx,
int ny,
int nz,
int nv,
int factor)
scale down a vector image by a factor |
static float[] |
subsample(float[] image,
int nx,
int ny,
int nz,
int factor)
scale down by a factor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImageFunctionsPublic()
| Method Detail |
|---|
public static float minimum(float[][][] img,
int nx,
int ny,
int nz)
public static float maximum(float[][][] img,
int nx,
int ny,
int nz)
public static int minimum(int[][][] img,
int nx,
int ny,
int nz)
public static int maximum(int[][][] img,
int nx,
int ny,
int nz)
public static byte minimum(byte[][][] img,
int nx,
int ny,
int nz)
public static byte maximum(byte[][][] img,
int nx,
int ny,
int nz)
public static void computeGradientHorn(float[][][] img,
float[][][] dx,
float[][][] dy,
float[][][] dz,
int nx,
int ny,
int nz)
public static void computeGradient(float[][][] img,
float[][][] dx,
float[][][] dy,
float[][][] dz,
int nx,
int ny,
int nz)
public static void computeHessian(float[][][] img,
float[][][][] hessian,
int nx,
int ny,
int nz)
public static void computeHessianEigenvalues(float[][][] img,
float[][][][] values,
int nx,
int ny,
int nz)
public static void computeGSTeigenvalues(float[][][] img,
float[][][][] values,
int nx,
int ny,
int nz)
public static float[][][] convolution(float[][][] image,
int nx,
int ny,
int nz,
float[][][] kernel,
int kx,
int ky,
int kz)
public static float[][][] separableConvolution(float[][][] image,
int nx,
int ny,
int nz,
float[][] kernel,
int kx,
int ky,
int kz)
public static float[][][] gaussianKernel(float sx,
float sy,
float sz)
public static float[][] separableGaussianKernel(float sx,
float sy,
float sz)
public static float nearestNeighborInterpolation(float[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static byte nearestNeighborInterpolation(byte[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static byte nearestNeighborInterpolation(byte[][][] image,
byte zero,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static byte nearestNeighborInterpolation(byte[] image,
byte zero,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float[] nearestNeighborInterpolation(float[][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz,
int nd)
public static int nearestNeighborInterpolation(int[][][] image,
int zero,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float linearInterpolation(float[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float linearInterpolation(float[][][] image,
float value,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float linearInterpolation(float[] image,
float value,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float linearInterpolation(float[][][] image,
boolean[][][] mask,
float value,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float linearGradientInterpolation(float[][][] image,
float value,
int dim,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float linearDistanceInterpolation(float[][][] image,
float value,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static boolean maskInterpolation(boolean[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static boolean linearMaskInterpolation(boolean[][][] mask,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float linearMaskInterpolationValue(boolean[][][] mask,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static boolean inclusiveMaskInterpolation(boolean[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static boolean exclusiveMaskInterpolation(boolean[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float linearInterpolationXderivative(float[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float linearInterpolationYderivative(float[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float linearInterpolationZderivative(float[][][] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float linearInterpolationXderivative(float[] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float linearInterpolationYderivative(float[] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float linearInterpolationZderivative(float[] image,
float x,
float y,
float z,
int nx,
int ny,
int nz)
public static float[][] setup3DCubicLagrangianInterpolation()
public static final float cubicLagrangianInterpolation3D(float[][][] image,
float[][] wt,
float min,
float max,
float x,
float y,
float z,
int nx,
int ny,
int nz)
wt - the interpolation kernelmin - minimum threshold for interpolated imagemax - maximum threshold for interpolated imagex - float point indexy - float point indexz - float point index
public static final float cubicLagrangianInterpolation3D(float[][][] image,
boolean[][][] mask,
float[][] wt,
float min,
float max,
float x,
float y,
float z,
int nx,
int ny,
int nz)
wt - the interpolation kernelmin - minimum threshold for interpolated imagemax - maximum threshold for interpolated imagemask - boolean mask: true if the image data is to be used in the interpolationx - float point indexy - float point indexz - float point index
public static final float robustMinimum(float[][][] image,
float ratio,
int scales,
int nx,
int ny,
int nz)
ratio - float fraction in [0,1]: the minimum number of points below or equal to the minimum over the total volumescales - int: the number of times the scale is refined for finding the robust minimum
public static final float robustMinimum(ImageData image,
float ratio,
int scales,
int nx,
int ny,
int nz)
ratio - float fraction in [0,1]: the minimum number of points below or equal to the minimum over the total volumescales - int: the number of times the scale is refined for finding the robust minimum
public static final float robustMaximum(float[][][] image,
float ratio,
int scales,
int nx,
int ny,
int nz)
ratio - float fraction in [0,1]: the minimum number of points above or equal to the maximum over the total volumescales - int: the number of times the scale is refined for finding the robust maximumnx,ny,nz - image dimensions
public static final float robustMaximum(ImageData image,
float ratio,
int scales,
int nx,
int ny,
int nz)
ratio - float fraction in [0,1]: the minimum number of points above or equal to the maximum over the total volumescales - int: the number of times the scale is refined for finding the robust maximumnx,ny,nz - image dimensions
public static final float[][][] heatDiffusion(float[][][] image,
float ratio,
int steps,
float dt,
int nx,
int ny,
int nz)
image - the original image, assumed to be in [0,1]ratio - amount of diffusionsteps - number of diffusion stepsdt - time interval
public static final float[][][] heatDiffusion(float[][][] image,
float scale,
float ratio,
int steps,
float dt,
int nx,
int ny,
int nz)
image - the original imagescale - maximum image valueratio - amount of diffusionsteps - number of diffusion stepsdt - time interval
public static final float[][][] meanCurvature(float[][][] image,
int nx,
int ny,
int nz)
image - the original distance image
public static float[][][] subsample(float[][][] image,
int nx,
int ny,
int nz,
int factor)
public static float[] subsample(float[] image,
int nx,
int ny,
int nz,
int factor)
public static float[][][][] subsample(float[][][][] image,
int nx,
int ny,
int nz,
int nv,
int factor)
public static float[][] subsample(float[][] image,
int nx,
int ny,
int nz,
int nv,
int factor)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||