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

Luis Ibanez luis.ibanez at kitware.com
Mon, 23 Feb 2004 21:05:58 -0500


Hi Yasser,

Try the low level verification:

    image1->Print( std::cout );
    image2->Print( std::cout );

It will print out the basic data of the
images. Look closely to the origin and
spacing of both images.


Regards,


    Luis


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

> Hi Luis,
>  
> Yes that is correct.  The problem however is that the two ITK volumes 
> have different dimensions so i can not use the SquaredDifferenceImageFilter.
>  
> Any other ideas?
>  
> Yasser
>  
> 
> 
> */Luis Ibanez <luis.ibanez at kitware.com>/* wrote:
> 
> 
>     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
>     locat! ed 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.
> 
> 
> 
> 
>     _______________________________________________
>     Insight-users mailing list
>     Insight-users at itk.org
>     http://www.itk.org/mailman/listinfo/insight-users
> 
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Yahoo! Mail SpamGuard 
> <http://us.rd.yahoo.com/mailtag_us/*http://antispam.yahoo.com/tools?tool=1> 
> - Read only the mail you want.