[Insight-users] deformable model filter

Pieter Vos p . vos at rad . umcn . nl
Thu, 30 May 2002 15:37:26 +0200 (CEST)


Hi,

I have a comment on the deformable3Dfilter.

As inputs the filter has a initial mesh and a gradient map.
Deforming the initial mesh goed well, however, it does only 
so if the gradient map has image spacing {1, 1, 1} and origin {0,0,0}
The initial mesh I use is derived by  marching cubes. The spacing of the 
image used for the marching cubes has to have the same spacing and origin 
as the gradient map, or else the pixelcoordinates of the mesh do net 
match the pixelcoordinates of the gradient map. The filter does not 
take the spacing of the gradient map in consideration.
For example:
An volume with spacing {3, 3, 3} with size {20, 20, 20}
So PixelValue(10, 10, 10)_xyz has (30, 30, 30)_ijk in space.
The initial mesh dirived from this volume has for example the id:
Mesh(37)_xyz = (30, 30, 30).
But when the deformable filter goes to work it looks for pixel (in the 
gradient map):
pixel(30, 30, 30)_xyz = (90, 90, 90)
So the mesh is totally out of place.

Maybe a little bit confusing, but it means that in my case the following 
has be done:
A volume is loaded in VTK. The volume has spacing {0.2 0.2 0.2}. The 
initial mesh is dirived fromm this volume. To input the ITK filter 
correctly, the spacing of the volume is changed to {1,1,1}. To compensate 
the mesh, it has to be transformed by factor {5,5,5}.
The inputs are now ready for the ITK filter, the deformation goes well. 
But to visualise it in vtk, the output mesh has to be transformed back 
with factor {0.2, 0.2, 0.2}, since it has to match the original volume.

All this scaling can be avoided to just simply take the spacings into 
consideration, when reading the pixel values of the gradient map (when 
initializing the mesh).

I hope the problem has become clear now.

Bye,

-- 
Pieter Vos
UMC Radboud Nijmegen
The Netherlands
mailto:p.vos@azn.umcn.nl