[Insight-users] data-spacing in itk::Image

Georgi Diakov georgi.diakov at uklibk.ac.at
Mon Sep 12 11:52:45 EDT 2005


Hello everybody,
It seems that the spacing in an itk::Image object is not quite a real 
thing. I did the following experiment:
1. I have a binary 3D vtkImage with spacing (0.39; 0.39; 3), outlining a 
segmented region very clearly
2. With vtkMarchingCubes I extract the surface of the segmented region. 
The resulting vtkPolyData (a mesh) is dimensioned according to the 
spacing (0.39; 0.39; 3), set in the image
3. Using the pipeline, I convert the vtkImage to itk::Image
4. From the itk::Image, I calculate a gradient map with 
itk::GradientMagnitudeRecursiveGaussianImageFilter and 
itk::GradientRecursiveGaussianImageFilter, as described in the ITK 
Software Guide on page 379 (the hybrid segmentation framework).
5. I apply the gradient map and the mesh (converted from vtkPolyData) in 
the deformable model as described in the ITK Software Guide

Running that setup, the program bursts during the deformation.

Then I increased the number of voxels in the image artificially (x- and 
y-directions), to maintain the same dimension with spacing (3; 3; 3). 
Now the program ran fine and the mesh was properly deformed. This 
brought me to the idea, that the image spacing in itk is not considered 
in the gradient calculation, thats why the resulting force field is too 
small to cover the full surface of the mesh (which corresponds to the 
realistic image dimesions).

How to go around that problem, without the need of having isotropic 
images with equal spacing in all directions? Artificially pumping voxels 
into the image is not an elegant solution and costs accuracy (0.39 
doesn't fit an integer number of times into 3).

Thanks,
Georgi



More information about the Insight-users mailing list