[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>&nbsp;</DIV>
<DIV>Luis,</DIV>
<DIV><BR>Thanks.&nbsp; I was able to figure out the problem with the data using the debug log.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Yasser</DIV>
<DIV><BR><BR><B><I>Luis Ibanez &lt;luis.ibanez at kitware.com&gt;</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-&gt;Print( std::cout );<BR>image2-&gt;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>&gt; Hi Luis,<BR>&gt; <BR>&gt; Yes that is correct. The problem however is that the two ITK volumes <BR>&gt; have different dimensions so i can not use the SquaredDifferenceImageFilter.<BR>&gt; <BR>&gt; Any other ideas?<BR>&gt; <BR>&gt; Yasser<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; */Luis Ibanez <LUIS.IBANEZ at KITWARE.COM>/* wrote:<BR>&gt; <BR>&gt; <BR>&gt; Hi Yasser,<BR>&gt; <BR>&gt; I assume that you have two ITK images that you are converting<BR>&gt; into two VTK images, and from them you are extracting contours<BR>&gt; for visualization. Is this
 assumption correct ?<BR>&gt; <BR>&gt; If so, one easy way to check for the correctness of the alignment<BR>&gt; is to take the two ITK images, pass them as inputs to the<BR>&gt; SquaredDifferenceImageFilter and save the output in a file.<BR>&gt; http://www.itk.org/Insight/Doxygen/html/classitk_1_1SquaredDifferenceImageFilter.html<BR>&gt; <BR>&gt; This will verify the alignment up to the ITK side of the application.<BR>&gt; <BR>&gt; If that's working ok, the next place to check is the two VTK images.<BR>&gt; Use the vtkImageBlend filter<BR>&gt; http://www.vtk.org/doc/release/4.2/html/classvtkImageBlend.html<BR>&gt; in order to combine both VTK images and save the result in a file.<BR>&gt; If this file looks ok then you will know that the problem should be<BR>&gt; locat! ed in the process of surface extraction and surface rendering.<BR>&gt; <BR>&gt; The ITK-VTK conversion filters should in principle pass the origin<BR>&gt; and spacing of the images. However, it doesn't hurt to verify
 the<BR>&gt; values.<BR>&gt; <BR>&gt; <BR>&gt; Please let us know what you find when you perform the two<BR>&gt; tests described above.<BR>&gt; <BR>&gt; <BR>&gt; Thanks<BR>&gt; <BR>&gt; <BR>&gt; Luis<BR>&gt; <BR>&gt; <BR>&gt; -----------------------<BR>&gt; Yasser Bashir wrote:<BR>&gt; <BR>&gt; &gt; Luis,<BR>&gt; &gt;<BR>&gt; &gt; Hi.<BR>&gt; &gt;<BR>&gt; &gt; Thanks. I will definitely change the code once i get the alignment<BR>&gt; &gt; working. Right now i am more concerned about incorrect alignment. Do<BR>&gt; &gt; you have any insights into that?<BR>&gt; &gt;<BR>&gt; &gt; Do you think the spacing and origin information is correctly taken<BR>&gt; &gt; from itk to vtk when i connect the pipelines and if the<BR>&gt; vtkClipVolume<BR>&gt; &gt; uses the correct origin and spacing information to generated the<BR>&gt; &gt; tetrahedral mesh.<BR>&gt; &gt;<BR>&gt; &gt; The image iam getting for the left and the right heart is<BR>&gt; attached and<BR>&gt; &gt; its way more misaligned than
 i expect.<BR>&gt; &gt;<BR>&gt; &gt; Yasser.<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; _______________________________________________<BR>&gt; Insight-users mailing list<BR>&gt; Insight-users at itk.org<BR>&gt; http://www.itk.org/mailman/listinfo/insight-users<BR>&gt; <BR>&gt; ------------------------------------------------------------------------<BR>&gt; Do you Yahoo!?<BR>&gt; Yahoo! Mail SpamGuard <BR>&gt; <HTTP: tools?tool="1" antispam.yahoo.com *http: mailtag_us us.rd.yahoo.com><BR>&gt; - 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--