<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->


<div class="WordSection1">
<p class="MsoPlainText">Thanks for the explanation David. I tried it and works the way that you said it would. However, it messes up what I was trying to do. Allow me to explain and your suggestions are very valuable.<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">I need to extract slices from a given volume as per a position and orientation of a cut plane and display the image on the center of the screen - just like we would see on the screen in ultrasonography as we move the probe around.
<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">Have I been going about the wrong way using the ImageResliceMapper? Or is there a simpler way of going about it?
<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">Thanks.<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> David Gobbi [via VTK] [mailto:ml-node&#43;<a href="/user/SendEmail.jtp?type=node&node=5716672&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>]
<br>
<b>Sent:</b> Monday, October 15, 2012 1:58 PM<br>
<b>To:</b> Ghosh, Debjit<br>
<b>Subject:</b> Re: SetCutPlane not working in vtkImageResliceMapper<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Just a short addendum to my last email, that might make the <br>
SliceFacesCamera option easier to understand. <br>
<br>
When SliceFacesCamera and SliceAtFocalPoint are on, the <br>
vtkImageResliceMapper will automatically set the SlicePlane <br>
to the focal plane. &nbsp;The &quot;focal plane&quot; is the plane that faces <br>
the camera and passes through the focal point. &nbsp;In other words, <br>
setting the camera's FocalPoint sets the &quot;Origin&quot; of the slice <br>
plane, and moving the camera's Position relative to the focal <br>
point controls the &quot;Normal&quot; of the slice plane. &nbsp;The slice is <br>
always facing the camera. <br>
<br>
&nbsp;- David <br>
<br>
On Mon, Oct 15, 2012 at 2:23 PM, David Gobbi &lt;<a href="/user/SendEmail.jtp?type=node&amp;node=5716657&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt; wrote:
<o:p></o:p></p>
<div>
<p class="MsoNormal"><br>
&gt; Hi Debjit, <br>
&gt; <br>
&gt; If you want to &quot;slap it to the screen&quot; then you need to use <br>
&gt; SliceFacesCameraOn instead of using the vtkPlane to control the <br>
&gt; slicing. <br>
&gt; <br>
&gt; With SliceFacesCameraOn, you can control the slicing by changing the <br>
&gt; pose of the camera (i.e. by changing the Position, FocalPoint, and <br>
&gt; ViewUp). &nbsp;With SliceFacesCameraOn, you cannot change the slicing with <br>
&gt; the vtkPlane (because SliceFacesCameraOn overrides the vtkPlane). <br>
&gt; However, from what you are trying to do, it sounds like <br>
&gt; SliceFacesCameraOn &#43; camera positioning is a much better way for you <br>
&gt; to control the slicing than with the vtkPlane. <br>
&gt; <br>
&gt; &nbsp;- David <br>
&gt; <br>
&gt; <br>
&gt; On Mon, Oct 15, 2012 at 11:56 AM, Debjit Ghosh &lt;<a href="/user/SendEmail.jtp?type=node&amp;node=5716657&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt; wrote:
<br>
&gt;&gt; Thank you very much. You are right! <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; So I turned SliceFacesCamera Off and it SetSlicePlane with a vtkPlane <br>
&gt;&gt; object. Now, though the corresponding slice has been extracted, there are <br>
&gt;&gt; two issues that I face, that I would appreciate your advice on, immensely. <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; - The image is getting visualized as a plane slanted in 3D space which I had <br>
&gt;&gt; to move with Shift &#43; LeftMousePressed to align - How do I slap it onto the <br>
&gt;&gt; screen so it is straight? <br>
&gt;&gt; <br>
&gt;&gt; - I was updating the normal in a Timer and incrementing it to test whether I <br>
&gt;&gt; can do this dynamically and it took effect only the first time <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; Perhaps it's due to my lack of experience in 3D slicing but these are the <br>
&gt;&gt; updates that I have tried calling: <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TimerEvent() <br>
&gt;&gt; <br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ <br>
&gt;&gt; <br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;vtkSmartPointer&lt;vtkPlane&gt; <br>
&gt;&gt; slicePlane = vtkSmartPointer&lt;vtkPlane&gt;::New(); <br>
&gt;&gt; <br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;slicePlane = <br>
&gt;&gt; resliceMapper-&gt;GetSlicePlane(); <br>
&gt;&gt; <br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;slicePlane-&gt;Print(std::cout); <br>
&gt;&gt; <br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;x&#43;=0.01; y &#43;=0.01; z&#43;=0.01; <br>
&gt;&gt; <br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;slicePlane-&gt;SetNormal(x, y, z); <br>
&gt;&gt; <br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;slicePlane-&gt;SetOrigin(103.5, <br>
&gt;&gt; 111.5, 175.5); <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; resliceMapper-&gt;SetSlicePlane(slicePlane); <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;resliceMapper-&gt;Modified(); <br>
&gt;&gt; <br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;imageSlice-&gt;Render(renderer); <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;renderer-&gt;ResetCamera(); <br>
&gt;&gt; <br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;interactor-&gt;Modified(); <br>
&gt;&gt; <br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;interactor-&gt;Render(); <br>
&gt;&gt; <br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; Basically, I have tried all the possible updates that I could :| But in <br>
&gt;&gt; vain. Could you please advise which update needs to be called? <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; Thank you! <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; From: David Gobbi [via VTK] [mailto:ml-node&#43;[hidden email]] <br>
&gt;&gt; <br>
&gt;&gt; Sent: Friday, October 12, 2012 5:23 PM <br>
&gt;&gt; To: Ghosh, Debjit <br>
&gt;&gt; Subject: Re: SetCutPlane not working in vtkImageResliceMapper <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; Hi Debjit, <br>
&gt;&gt; <br>
&gt;&gt; You probably have SliceFacesCamera turned on for the mapper. &nbsp;This <br>
&gt;&gt; will override any plane that you set manually. <br>
&gt;&gt; <br>
&gt;&gt; If you are using SliceFacesCamera and SliceAtFocalPoint, then the way <br>
&gt;&gt; to change the slice is by changing the camera's position and focal <br>
&gt;&gt; point. <br>
&gt;&gt; <br>
&gt;&gt; &nbsp;- David <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; On Fri, Oct 12, 2012 at 6:01 PM, Debjit Ghosh &lt;[hidden email]&gt; wrote: <br>
&gt;&gt;&gt; I have been facing an issue where I called the SetSlicePlane(vtkPlane*) <br>
&gt;&gt;&gt; with <br>
&gt;&gt;&gt; a normal and/or an origin but the visualization didn't change. I had <br>
&gt;&gt;&gt; called <br>
&gt;&gt;&gt; the interactor-&gt;Render(), called the Modified() on the ImageResliceMapper <br>
&gt;&gt;&gt; but neither made the difference. <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; It would be great if someone could tell me what I am missing here. <o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">_______________________________________________
<br>
Powered by <a href="http://www.kitware.com" target="_top" rel="nofollow" link="external">www.kitware.com</a> <br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_top" rel="nofollow" link="external">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_top" rel="nofollow" link="external">
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="_top" rel="nofollow" link="external">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
<o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="1" width="100%" noshade="" style="color:#CCCCCC" align="center">
</div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#444444">If you reply to this email, your message will be added to the discussion below:<o:p></o:p></span></b></p>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#444444"><a href="http://vtk.1045678.n5.nabble.com/SetCutPlane-not-working-in-vtkImageResliceMapper-tp5716627p5716657.html" target="_top" rel="nofollow" link="external">http://vtk.1045678.n5.nabble.com/SetCutPlane-not-working-in-vtkImageResliceMapper-tp5716627p5716657.html</a>
<o:p></o:p></span></p>
</div>
<div style="margin-top:4.8pt">
<p class="MsoNormal" style="line-height:18.0pt"><span style="font-size:8.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#666666">To unsubscribe from SetCutPlane not working in vtkImageResliceMapper,
<a href="" target="_top" rel="nofollow" link="external">
click here</a>.<br>
<a href="http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" target="_top" rel="nofollow" link="external"><span style="font-size:7.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">NAML</span></a>
<o:p></o:p></span></p>
</div>
</div>

<P><br/>---------------------------------------------------------------------<br/>CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, <br/>is for the sole use of the intended recipient(s) and may contain confidential<br/>or legally privileged information. Any unauthorized review, use, disclosure<br/>or distribution is prohibited. If you are not the intended recipient, please<br/>contact the sender by reply e-mail and destroy all copies of this original message.  <br/><br/>---------------------------------------------------------------------<br/>
</P>



        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/SetCutPlane-not-working-in-vtkImageResliceMapper-tp5716627p5716672.html">RE: SetCutPlane not working in vtkImageResliceMapper</a><br/>
Sent from the <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html">VTK - Users mailing list archive</a> at Nabble.com.<br/>