[Insight-users] question on "DanielssonDistanceMapImageFilter":
works in N-D
Luis Ibanez
luis . ibanez at kitware . com
Thu, 26 Jun 2003 13:55:39 -0400
Hi Sebastian,
The DanielssonDistanceMap filter works in N-D images.
(as almost all ITK filters).
However you have to instantiate the filter for the appropiate
dimension of the image you want to process. That is, you have
to make a decision at compile time.
I assume that you are using the example:
DanielssonDistanceMapImageFilter.cxx
available in
Insight/Examples/Filtering
If you want to run this example on 3D data, simply go to
lines 281-282
typedef itk::Image< InputPixelType, 2 > InputImageType;
typedef itk::Image< OutputPixelType, 2 > OutputImageType;
and make them
typedef itk::Image< InputPixelType, 3 > InputImageType;
typedef itk::Image< OutputPixelType, 3 > OutputImageType;
Recompile, and run
---
This filter is described in the SoftwareGuide
http://www . itk . org/ItkSoftwareGuide . pdf
under section 5.6 "Distance Map".
Please let us know if you encounter any problem.
Regards,
Luis
-------------------------------
Sebastian Ordas wrote:
> Hi All,
> I'm trying to use the DanielssonDistanceMapImageFilter on a 3D vtk
> image (pixel format unsigned char). On the FivePoints.png 2D image
> that comes with the examples, the filter works fine; but when
> attempting to retrieve a 3D vtk distance transform volume (unsigned
> short) I get a black image (the other two images are also wrong).
> Has anyone experienced the same problem? Does this filter work with 3D
> data?
>
> Thanks,
> Sebastian