[Insight-users] Unable to display segmented images properly using itk-vtk

Luis Ibanez luis.ibanez at kitware.com
Sun, 22 Feb 2004 21:52:43 -0500


Hi Yasser,

I assume that you have two ITK images that you are converting
into two VTK images, and from them you are extracting contours
for visualization.   Is this assumption  correct ?

If so, one easy way to check for the correctness of the alignment
is to take the two ITK  images, pass them as inputs  to the
 SquaredDifferenceImageFilter and save the output in a file.
http://www.itk.org/Insight/Doxygen/html/classitk_1_1SquaredDifferenceImageFilter.html

This will verify the alignment up to the ITK side of the application.

If that's working ok, the next place to check is the two VTK images.
Use the vtkImageBlend filter
http://www.vtk.org/doc/release/4.2/html/classvtkImageBlend.html
in order to combine both VTK images and save the result in a file.
If this file looks ok then you will know that the problem should be
located in the process of surface extraction and surface rendering.

The ITK-VTK conversion filters should in principle pass the origin
and spacing of the images. However, it doesn't hurt to verify the
values.


Please let us know what you find when you perform the two
tests described above.


   Thanks


      Luis


-----------------------
Yasser Bashir wrote:

> Luis,
>  
> Hi.
>  
> Thanks.  I will definitely change the code once i get the alignment 
> working.  Right now i am more concerned about incorrect alignment.  Do 
> you have any insights into that?
>  
> Do you think the spacing and origin information is correctly taken 
> from itk to vtk when i connect the pipelines and if the vtkClipVolume 
> uses the correct origin and spacing information to generated the 
> tetrahedral mesh.
>  
> The image iam getting for the left and the right heart is attached and 
> its way more misaligned than i expect.
>  
> Yasser.