[Insight-users] Unable to display segmented images properly using itk-vtk
Yasser Bashir
itk_at_stanford at yahoo.com
Mon, 23 Feb 2004 22:42:43 -0800 (PST)
--0-1792003057-1077604963=:57438
Content-Type: text/plain; charset=us-ascii
Luis,
Thanks. I was able to figure out the problem with the data using the debug log.
Yasser
Luis Ibanez <luis.ibanez at kitware.com> wrote:
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 /* 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
>
> - Read only the mail you want.
---------------------------------
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
--0-1792003057-1077604963=:57438
Content-Type: text/html; charset=us-ascii
<DIV>
<DIV> </DIV>
<DIV>Luis,</DIV>
<DIV><BR>Thanks. I was able to figure out the problem with the data using the debug log.</DIV>
<DIV> </DIV>
<DIV>Yasser</DIV>
<DIV><BR><BR><B><I>Luis Ibanez <luis.ibanez at kitware.com></I></B> wrote:
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>Hi Yasser,<BR><BR>Try the low level verification:<BR><BR>image1->Print( std::cout );<BR>image2->Print( std::cout );<BR><BR>It will print out the basic data of the<BR>images. Look closely to the origin and<BR>spacing of both images.<BR><BR><BR>Regards,<BR><BR><BR>Luis<BR><BR><BR>--------------------<BR>Yasser Bashir wrote:<BR><BR>> Hi Luis,<BR>> <BR>> Yes that is correct. The problem however is that the two ITK volumes <BR>> have different dimensions so i can not use the SquaredDifferenceImageFilter.<BR>> <BR>> Any other ideas?<BR>> <BR>> Yasser<BR>> <BR>> <BR>> <BR>> */Luis Ibanez <LUIS.IBANEZ at KITWARE.COM>/* wrote:<BR>> <BR>> <BR>> Hi Yasser,<BR>> <BR>> I assume that you have two ITK images that you are converting<BR>> into two VTK images, and from them you are extracting contours<BR>> for visualization. Is this
assumption correct ?<BR>> <BR>> If so, one easy way to check for the correctness of the alignment<BR>> is to take the two ITK images, pass them as inputs to the<BR>> SquaredDifferenceImageFilter and save the output in a file.<BR>> http://www.itk.org/Insight/Doxygen/html/classitk_1_1SquaredDifferenceImageFilter.html<BR>> <BR>> This will verify the alignment up to the ITK side of the application.<BR>> <BR>> If that's working ok, the next place to check is the two VTK images.<BR>> Use the vtkImageBlend filter<BR>> http://www.vtk.org/doc/release/4.2/html/classvtkImageBlend.html<BR>> in order to combine both VTK images and save the result in a file.<BR>> If this file looks ok then you will know that the problem should be<BR>> locat! ed in the process of surface extraction and surface rendering.<BR>> <BR>> The ITK-VTK conversion filters should in principle pass the origin<BR>> and spacing of the images. However, it doesn't hurt to verify
the<BR>> values.<BR>> <BR>> <BR>> Please let us know what you find when you perform the two<BR>> tests described above.<BR>> <BR>> <BR>> Thanks<BR>> <BR>> <BR>> Luis<BR>> <BR>> <BR>> -----------------------<BR>> Yasser Bashir wrote:<BR>> <BR>> > Luis,<BR>> ><BR>> > Hi.<BR>> ><BR>> > Thanks. I will definitely change the code once i get the alignment<BR>> > working. Right now i am more concerned about incorrect alignment. Do<BR>> > you have any insights into that?<BR>> ><BR>> > Do you think the spacing and origin information is correctly taken<BR>> > from itk to vtk when i connect the pipelines and if the<BR>> vtkClipVolume<BR>> > uses the correct origin and spacing information to generated the<BR>> > tetrahedral mesh.<BR>> ><BR>> > The image iam getting for the left and the right heart is<BR>> attached and<BR>> > its way more misaligned than
i expect.<BR>> ><BR>> > Yasser.<BR>> <BR>> <BR>> <BR>> <BR>> _______________________________________________<BR>> Insight-users mailing list<BR>> Insight-users at itk.org<BR>> http://www.itk.org/mailman/listinfo/insight-users<BR>> <BR>> ------------------------------------------------------------------------<BR>> Do you Yahoo!?<BR>> Yahoo! Mail SpamGuard <BR>> <HTTP: tools?tool="1" antispam.yahoo.com *http: mailtag_us us.rd.yahoo.com><BR>> - Read only the mail you want.<BR><BR><BR></BLOCKQUOTE></DIV></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/mailtag_us/*http://antispam.yahoo.com/tools?tool=1">Yahoo! Mail SpamGuard</a> - Read only the mail you want.</a>
--0-1792003057-1077604963=:57438--