Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkImageEuclideanDistance Class Reference

`#include <vtkImageEuclideanDistance.h>`

Inheritance diagram for vtkImageEuclideanDistance:

[legend]
Collaboration diagram for vtkImageEuclideanDistance:

[legend]
List of all members.

## Detailed Description

computes 3D Euclidean DT

Date:
  2002/01/22 15:32:25

Revision:
  1.11

vtkImageEuclideanDistance implements the Euclidean DT using Saito's algorithm. The distance map produced contains the square of the Euclidean distance values.

The algorithm has a o(n^(D+1)) complexity over nxnx...xn images in D dimensions. It is very efficient on relatively small images. Cuisenaire's algorithms should be used instead if n >> 500. These are not implemented yet.

For the special case of images where the slice-size is a multiple of 2^N with a large N (typically for 256x256 slices), Saito's algorithm encounters a lot of cache conflicts during the 3rd iteration which can slow it very significantly. In that case, one should use SetAlgorithmToSaitoCached() instead for better performance.

References:

T. Saito and J.I. Toriwaki. New algorithms for Euclidean distance transformations of an n-dimensional digitised picture with applications. Pattern Recognition, 27(11). pp. 1551--1565, 1994.

O. Cuisenaire. Distance Transformation: fast algorithms and applications to medical image processing. PhD Thesis, Universite catholique de Louvain, October 1999. http://ltswww.epfl.ch/~cuisenai/papers/oc_thesis.pdf

Created by:
  - Schroeder, Will

CVS contributions (if > 5%):
  - Schroeder, Will (87%)
  - Avila, Lisa (5%)

CVS logs (CVSweb):
  - .`h` (`/Imaging/vtkImageEuclideanDistance.h)`
  - .`cxx` (`/Imaging/vtkImageEuclideanDistance.cxx)`

Tests:
  vtkImageEuclideanDistance (Tests)

Definition at line 70 of file vtkImageEuclideanDistance.h.

## Public Types
typedef vtkImageDecomposeFilter | Superclass
## Public Methods
virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
void | IterativeExecuteData (vtkImageData *in, vtkImageData *out)
int | SplitExtent (int splitExt[6], int startExt[6], int num, int total)
virtual void | SetInitialize (int)
virtual int | GetInitialize ()
virtual void | InitializeOn ()
virtual void | InitializeOff ()
virtual void | SetConsiderAnisotropy (int)
virtual int | GetConsiderAnisotropy ()
virtual void | ConsiderAnisotropyOn ()
virtual void | ConsiderAnisotropyOff ()
virtual void | SetMaximumDistance (float)
virtual float | GetMaximumDistance ()
virtual void | SetAlgorithm (int)
virtual int | GetAlgorithm ()
void | SetAlgorithmToSaito ()
void | SetAlgorithmToSaitoCached ()
## Static Public Methods
vtkImageEuclideanDistance * | New ()
int | IsTypeOf (const char *type)
vtkImageEuclideanDistance * | SafeDownCast (vtkObject *o)
## Protected Methods
| vtkImageEuclideanDistance ()
| ~vtkImageEuclideanDistance ()
virtual void | AllocateOutputScalars (vtkImageData *outData)
void | ExecuteInformation (vtkImageData *input, vtkImageData *output)
void | ExecuteInformation ()
void | ComputeInputUpdateExtent (int inExt[6], int outExt[6])
## Protected Attributes
float | MaximumDistance
int | Initialize
int | ConsiderAnisotropy
int | Algorithm

## Member Typedef Documentation

typedef vtkImageDecomposeFilter vtkImageEuclideanDistance::Superclass

| Construct an instance of vtkImageDecomposeFilter filter with default dimensionality 3. Reimplemented from vtkImageDecomposeFilter. Definition at line 74 of file vtkImageEuclideanDistance.h.

## Constructor & Destructor Documentation

vtkImageEuclideanDistance::vtkImageEuclideanDistance | ( |  | ) | `[protected]`

vtkImageEuclideanDistance::~vtkImageEuclideanDistance | ( |  | ) | `[inline, protected]`

| Definition at line 128 of file vtkImageEuclideanDistance.h.

## Member Function Documentation

vtkImageEuclideanDistance* vtkImageEuclideanDistance::New | ( |  | ) | `[static]`

| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkObject.

virtual const char* vtkImageEuclideanDistance::GetClassName | ( |  | ) | `[virtual]`

| Construct an instance of vtkImageDecomposeFilter filter with default dimensionality 3. Reimplemented from vtkImageDecomposeFilter.

int vtkImageEuclideanDistance::IsTypeOf | ( | const char * | type | ) | `[static]`

| Construct an instance of vtkImageDecomposeFilter filter with default dimensionality 3. Reimplemented from vtkImageDecomposeFilter.

virtual int vtkImageEuclideanDistance::IsA | ( | const char * | type | ) | `[virtual]`

| Construct an instance of vtkImageDecomposeFilter filter with default dimensionality 3. Reimplemented from vtkImageDecomposeFilter.

vtkImageEuclideanDistance* vtkImageEuclideanDistance::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Construct an instance of vtkImageDecomposeFilter filter with default dimensionality 3. Reimplemented from vtkImageDecomposeFilter.

void vtkImageEuclideanDistance::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) | `[virtual]`

| Construct an instance of vtkImageDecomposeFilter filter with default dimensionality 3. Reimplemented from vtkImageDecomposeFilter.

int vtkImageEuclideanDistance::SplitExtent | ( | int | splitExt[6],
|  | int | startExt[6],
|  | int | num,
|  | int | total
| ) | `[virtual]`

| Used internally for streaming and threads. Splits output update extent into num pieces. This method needs to be called num times. Results must not overlap for consistent starting extent. Subclass can override this method. This method returns the number of peices resulting from a successful split. This can be from 1 to "total". If 1 is returned, the extent cannot be split. Reimplemented from vtkImageToImageFilter.

virtual void vtkImageEuclideanDistance::SetInitialize | ( | int |  | ) | `[virtual]`

| Used to set all non-zero voxels to MaximumDistance before starting the distance transformation. Setting Initialize off keeps the current value in the input image as starting point. This allows to superimpose several distance maps.

virtual int vtkImageEuclideanDistance::GetInitialize | ( |  | ) | `[virtual]`

| Used to set all non-zero voxels to MaximumDistance before starting the distance transformation. Setting Initialize off keeps the current value in the input image as starting point. This allows to superimpose several distance maps.

virtual void vtkImageEuclideanDistance::InitializeOn | ( |  | ) | `[virtual]`

| Used to set all non-zero voxels to MaximumDistance before starting the distance transformation. Setting Initialize off keeps the current value in the input image as starting point. This allows to superimpose several distance maps.

virtual void vtkImageEuclideanDistance::InitializeOff | ( |  | ) | `[virtual]`

| Used to set all non-zero voxels to MaximumDistance before starting the distance transformation. Setting Initialize off keeps the current value in the input image as starting point. This allows to superimpose several distance maps.

virtual void vtkImageEuclideanDistance::SetConsiderAnisotropy | ( | int |  | ) | `[virtual]`

| Used to define whether Spacing should be used in the computation of the distances

virtual int vtkImageEuclideanDistance::GetConsiderAnisotropy | ( |  | ) | `[virtual]`

| Used to define whether Spacing should be used in the computation of the distances

virtual void vtkImageEuclideanDistance::ConsiderAnisotropyOn | ( |  | ) | `[virtual]`

| Used to define whether Spacing should be used in the computation of the distances

virtual void vtkImageEuclideanDistance::ConsiderAnisotropyOff | ( |  | ) | `[virtual]`

| Used to define whether Spacing should be used in the computation of the distances

virtual void vtkImageEuclideanDistance::SetMaximumDistance | ( | float |  | ) | `[virtual]`

| Any distance bigger than this->MaximumDistance will not ne computed but set to this->MaximumDistance instead.

virtual float vtkImageEuclideanDistance::GetMaximumDistance | ( |  | ) | `[virtual]`

| Any distance bigger than this->MaximumDistance will not ne computed but set to this->MaximumDistance instead.

virtual void vtkImageEuclideanDistance::SetAlgorithm | ( | int |  | ) | `[virtual]`

| Selects a Euclidean DT algorithm. 1. Saito 2. Saito-cached More algorithms will be added later on.

virtual int vtkImageEuclideanDistance::GetAlgorithm | ( |  | ) | `[virtual]`

| Selects a Euclidean DT algorithm. 1. Saito 2. Saito-cached More algorithms will be added later on.

void vtkImageEuclideanDistance::SetAlgorithmToSaito | ( |  | ) | `[inline]`

| Selects a Euclidean DT algorithm. 1. Saito 2. Saito-cached More algorithms will be added later on. Definition at line 118 of file vtkImageEuclideanDistance.h. References VTK_EDT_SAITO.

void vtkImageEuclideanDistance::SetAlgorithmToSaitoCached | ( |  | ) | `[inline]`

| Selects a Euclidean DT algorithm. 1. Saito 2. Saito-cached More algorithms will be added later on. Definition at line 120 of file vtkImageEuclideanDistance.h. References VTK_EDT_SAITO_CACHED.

void vtkImageEuclideanDistance::IterativeExecuteData | ( | vtkImageData * | in,
|  | vtkImageData * | out
| ) | `[virtual]`

| Implements vtkImageIterateFilter.

virtual void vtkImageEuclideanDistance::AllocateOutputScalars | ( | vtkImageData * | outData | ) | `[protected, virtual]`

| Reimplemented from vtkImageIterateFilter.

void vtkImageEuclideanDistance::ExecuteInformation | ( | vtkImageData * | input,
|  | vtkImageData * | output
| ) | `[protected, virtual]`

| Reimplemented from vtkImageIterateFilter.

void vtkImageEuclideanDistance::ExecuteInformation | ( |  | ) | `[inline, protected, virtual]`

| Reimplemented from vtkImageIterateFilter. Definition at line 139 of file vtkImageEuclideanDistance.h. References vtkImageIterateFilter::ExecuteInformation().

void vtkImageEuclideanDistance::ComputeInputUpdateExtent | ( | int | inExt[6],
|  | int | outExt[6]
| ) | `[protected, virtual]`

| Reimplemented from vtkImageIterateFilter.

## Member Data Documentation

float vtkImageEuclideanDistance::MaximumDistance`[protected]`

| Definition at line 130 of file vtkImageEuclideanDistance.h.

int vtkImageEuclideanDistance::Initialize`[protected]`

| Definition at line 131 of file vtkImageEuclideanDistance.h.

int vtkImageEuclideanDistance::ConsiderAnisotropy`[protected]`

| Definition at line 132 of file vtkImageEuclideanDistance.h.

int vtkImageEuclideanDistance::Algorithm`[protected]`

| Definition at line 133 of file vtkImageEuclideanDistance.h.

The documentation for this class was generated from the following file:

- Imaging/vtkImageEuclideanDistance.h