geometry.object
Class DistanceMap3D

java.lang.Object
  extended by geometry.object.DistanceMap3D
All Implemented Interfaces:
DistanceMap

public class DistanceMap3D
extends java.lang.Object
implements DistanceMap

A 3-dimensional distance map. The distance map in this case is encoded as a 3D-array of doubles.


Field Summary
 double[][][] distancemap
          distance map, holding the distance to the contour from node (x,y,z) in index [x][y][z]
 
Constructor Summary
DistanceMap3D()
           
 
Method Summary
 double getAverageDistance()
          Get the average distance from each pixel/voxel in the shape to the contour.
 double getDistance(Index index)
          Get the distance from the specified coordinates to the contour
 java.lang.Object getDistanceMap()
           
 void setDistanceMap(java.lang.Object distancemap)
          set the distance map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

distancemap

public double[][][] distancemap
distance map, holding the distance to the contour from node (x,y,z) in index [x][y][z]

Constructor Detail

DistanceMap3D

public DistanceMap3D()
Method Detail

getDistance

public double getDistance(Index index)
Description copied from interface: DistanceMap
Get the distance from the specified coordinates to the contour

Specified by:
getDistance in interface DistanceMap
Parameters:
index - the index to get the distance to the contour for
Returns:
the distance from the specified coordinates to the contour

setDistanceMap

public void setDistanceMap(java.lang.Object distancemap)
Description copied from interface: DistanceMap
set the distance map.

Specified by:
setDistanceMap in interface DistanceMap
Parameters:
distancemap - the distance map to set.

getAverageDistance

public double getAverageDistance()
Description copied from interface: DistanceMap
Get the average distance from each pixel/voxel in the shape to the contour.

Specified by:
getAverageDistance in interface DistanceMap
Returns:
the average distance from each pixel/voxel to the contour

getDistanceMap

public java.lang.Object getDistanceMap()
Specified by:
getDistanceMap in interface DistanceMap