io.loader.load3D
Class SaitoToriwakiDistanceTransform

java.lang.Object
  extended by io.loader.load3D.SaitoToriwakiDistanceTransform

public class SaitoToriwakiDistanceTransform
extends java.lang.Object

An implementation of the 3D distance transform algorithm proposed in: T. Saito and J. Toriwaki : New algorithms for n-dimensional Euclidean distance transformation, Pattern Recognition, 27, 11, pp.1551-1565 (1994). The "basic" algorithm is used here, not the fast version.


Field Summary
private static org.apache.log4j.Logger logger
          logger instance
 
Constructor Summary
SaitoToriwakiDistanceTransform()
           
 
Method Summary
static double[][][] getDistanceTransform(int[][][] cube)
          Get the distance transform for the specified 3D volume.
protected static double[][][] initG(int[][][] cube)
           
protected static double[][][] phaseX(int[][][] cube)
           
protected static double[][][] phaseY(double[][][] g)
           
protected static double[][][] phaseZ(double[][][] h)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static org.apache.log4j.Logger logger
logger instance

Constructor Detail

SaitoToriwakiDistanceTransform

public SaitoToriwakiDistanceTransform()
Method Detail

getDistanceTransform

public static double[][][] getDistanceTransform(int[][][] cube)
Get the distance transform for the specified 3D volume.

Parameters:
cube - the 3D volume to get the distance map for
Returns:
3D distance map, where for each index the distance for this volume element to the boundary is given, except for background voxels, which are always 0

phaseZ

protected static double[][][] phaseZ(double[][][] h)

phaseY

protected static double[][][] phaseY(double[][][] g)

phaseX

protected static double[][][] phaseX(int[][][] cube)

initG

protected static double[][][] initG(int[][][] cube)