Try adding the actor to the imageviewer's renderer *after* you setup the interactor for the viewer. <br><br>The SetupInteractor call generally installs the pipeline, possibly creates a new renderer.. <br><br><div class="gmail_quote">
On Tue, Feb 24, 2009 at 11:47 PM, S, Navneeth (GE, Research) <span dir="ltr"><<a href="mailto:navneeth.s@ge.com">navneeth.s@ge.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I've put together a tcl script to show what I mean (see attached).<br>
<br>
This script:<br>
1) Generates a synthetic image composed of spheres<br>
2) Uses either vtkContourer or vtkDiscreteMarchingCubes to extract the<br>
contour.<br>
3) Renders the result of 2 independently & also inside a vtkImageViewer<br>
<br>
Notice that though the contour (in this case 3D) shows up on the vanilla<br>
renderer it does not show up on the vtkImageViewer !.<br>
<br>
What could be happening ?<br>
<br>
Thanks for your help,<br>
navneeth<br>
<br>
________________________________<br>
<br>
From: Karthik Krishnan [mailto:<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>]<br>
Sent: Wednesday, February 25, 2009 12:10 AM<br>
<div class="Ih2E3d">To: S, Navneeth (GE, Research)<br>
</div>Cc: Mark Gooding; VTK users group<br>
<div><div></div><div class="Wj3C7c">Subject: Re: [vtkusers] Overlay Contour on vtkImageViewer2<br>
<br>
<br>
Perhaps your mask and input images have different locations in physical<br>
space. (origin,/ extent etc).<br>
<br>
--<br>
k<br>
<br>
<br>
On Tue, Feb 24, 2009 at 4:35 AM, S, Navneeth (GE, Research)<br>
<<a href="mailto:navneeth.s@ge.com">navneeth.s@ge.com</a>> wrote:<br>
<br>
<br>
It shows up, but in the wrong place.<br>
Oddly the contour is at the correct iso-curve on the original<br>
image (in vtkImageViewer2).<br>
<br>
Eg. If I set<br>
myVtkImageViewer2->SetInput( orig );<br>
<br>
contourer->SetInput( mask )<br>
contourer->SetValue(0, 2);<br>
<br>
The iso-contour shows up corresponding to intensity=2 on the<br>
image=orig. Though, the contourer should generate the same for<br>
image=mask !<br>
<br>
Thanks !<br>
<br>
<br>
-----Original Message-----<br>
From: Mark Gooding [mailto:<a href="mailto:mark.gooding@gmail.com">mark.gooding@gmail.com</a>]<br>
Sent: Tuesday, February 24, 2009 2:42 PM<br>
To: S, Navneeth (GE, Research); VTK users group<br>
Subject: Re: [vtkusers] Overlay Contour on vtkImageViewer2<br>
<br>
could you elaborate on the problem - is the contour showing up,<br>
but in the wrong place? or is it just not showing up at all?<br>
<br>
mark<br>
<br>
2009/2/24 S, Navneeth (GE, Research) <<a href="mailto:navneeth.s@ge.com">navneeth.s@ge.com</a>>:<br>
> Hello,<br>
> I'm trying to overlay a contour corresponding to a<br>
segmentation<br>
> mask on an image displayed using vtkImageViewer2.<br>
> However, the iso contour lines do not show up correctly<br>
(corresponding<br>
> to the actual boundary)<br>
...<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at:<br>
<a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
Karthik Krishnan<br>
R&D Engineer,<br>
Kitware Inc.<br>
Ph: 518 371 3971 x119<br>
Fax: 518 371 3971<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Karthik Krishnan<br>R&D Engineer,<br>Kitware Inc.<br>Ph: 518 371 3971 x119<br>Fax: 518 371 3971<br>