edu.jhu.cs.cisst.algorithms.util
Class DataOperations

java.lang.Object
  extended by edu.jhu.cs.cisst.algorithms.util.DataOperations

public final class DataOperations
extends java.lang.Object

The Class DataOperations defines basic operations to perform on raw data.


Constructor Summary
DataOperations()
           
 
Method Summary
static float[][] blur(float[][] image, double stddev)
          Blur.
static float[][] gaussianCurvature(float[][] image)
          Gaussian curvature.
protected static double getImageValue(float[][] image, int i, int j, int rows, int cols)
          Gets the image value.
protected static float getValue(int i, int j, int rows, int cols, float[][] imgMat)
          Gets the value.
static float[][][] gradient(float[][] image, boolean componentsFirst)
          Gradient.
static double interpolate(double x, double y, double z, ConstGrid grid, int sx, int sy, int sz)
          Interpolate.
static double interpolate(double x, double y, double z, float[][][] data, int sx, int sy, int sz)
          Interpolate.
static double interpolate(double x, double y, float[][] data, int sx, int sy)
          Interpolate.
static float[][] meanCurvature(float[][] image)
          Mean curvature.
static float[][][] restrict(float[][][] fineData, Stencil s, int cx, int cy, int cz)
          Restrict.
static float[][] restrict(float[][] fineData, Stencil s, int cx, int cy)
          Restrict.
static float[][] softThresholdArcTan(float[][] image, double fuzziness)
          Soft threshold arc tan.
static float[][] softThresholdSigmoid(float[][] image, double fuzziness)
          Soft threshold sigmoid.
static float[][] softThresholdSin(float[][] image, double fuzziness)
          Soft threshold sin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataOperations

public DataOperations()
Method Detail

interpolate

public static final double interpolate(double x,
                                       double y,
                                       float[][] data,
                                       int sx,
                                       int sy)
Interpolate.

Parameters:
x - the x
y - the y
data - the data
sx - the sx
sy - the sy
Returns:
the double

interpolate

public static final double interpolate(double x,
                                       double y,
                                       double z,
                                       float[][][] data,
                                       int sx,
                                       int sy,
                                       int sz)
Interpolate.

Parameters:
x - the x
y - the y
z - the z
data - the data
sx - the sx
sy - the sy
sz - the sz
Returns:
the double

restrict

public static final float[][] restrict(float[][] fineData,
                                       Stencil s,
                                       int cx,
                                       int cy)
Restrict.

Parameters:
fineData - the fine data
s - the stencil
cx - the cx
cy - the cy
Returns:
the float[][]

restrict

public static final float[][][] restrict(float[][][] fineData,
                                         Stencil s,
                                         int cx,
                                         int cy,
                                         int cz)
Restrict.

Parameters:
fineData - the fine data
s - the stencil
cx - the cx
cy - the cy
cz - the cz
Returns:
the float[][][]

softThresholdSigmoid

public static final float[][] softThresholdSigmoid(float[][] image,
                                                   double fuzziness)
Soft threshold sigmoid.

Parameters:
image - the image
fuzziness - the fuzziness
Returns:
the float[][]

softThresholdSin

public static final float[][] softThresholdSin(float[][] image,
                                               double fuzziness)
Soft threshold sin.

Parameters:
image - the image
fuzziness - the fuzziness
Returns:
the float[][]

softThresholdArcTan

public static final float[][] softThresholdArcTan(float[][] image,
                                                  double fuzziness)
Soft threshold arc tan.

Parameters:
image - the image
fuzziness - the fuzziness
Returns:
the float[][]

getValue

protected static final float getValue(int i,
                                      int j,
                                      int rows,
                                      int cols,
                                      float[][] imgMat)
Gets the value.

Parameters:
i - the i
j - the j
rows - the rows
cols - the cols
imgMat - the img mat
Returns:
the value

gaussianCurvature

public static final float[][] gaussianCurvature(float[][] image)
Gaussian curvature.

Parameters:
image - the image
Returns:
the float[][]

meanCurvature

public static final float[][] meanCurvature(float[][] image)
Mean curvature.

Parameters:
image - the image
Returns:
the float[][]

blur

public static final float[][] blur(float[][] image,
                                   double stddev)
Blur.

Parameters:
image - the image
stddev - the stddev
Returns:
the float[][]

gradient

public static float[][][] gradient(float[][] image,
                                   boolean componentsFirst)
Gradient.

Parameters:
image - the image
componentsFirst - indicate components come first
Returns:
the float[][][]

getImageValue

protected static double getImageValue(float[][] image,
                                      int i,
                                      int j,
                                      int rows,
                                      int cols)
Gets the image value.

Parameters:
image - the image
i - the i
j - the j
rows - the rows
cols - the cols
Returns:
the image value

interpolate

public static final double interpolate(double x,
                                       double y,
                                       double z,
                                       ConstGrid grid,
                                       int sx,
                                       int sy,
                                       int sz)
Interpolate.

Parameters:
x - the x
y - the y
z - the z
grid - the grid
sx - the sx
sy - the sy
sz - the sz
Returns:
the double