<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="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi David,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">It struck me that perhaps by replying on the thread, you aren’t receiving the emails but I am sending them to myself. Please look at this link where I had responded
 with diagrams to make clear the axes that we were discussing:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444"><a href="http://vtk.1045678.n5.nabble.com/3D-Slicing-vtkImageResliceMapper-No-motion-of-cutplane-in-one-of-3-axes-yaw-tp5725426p5725433.html" target="_top" rel="nofollow" link="external">http://vtk.1045678.n5.nabble.com/3D-Slicing-vtkImageResliceMapper-No-motion-of-cutplane-in-one-of-3-axes-yaw-tp5725426p5725433.html</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444">Warm regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444">Debjit</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Ghosh, Debjit
<br>
<b>Sent:</b> Wednesday, January 15, 2014 3:12 PM<br>
<b>To:</b> David Gobbi [via VTK]<br>
<b>Subject:</b> Re: 3D Slicing | vtkImageResliceMapper | No motion of cutplane in one of 3 axes (yaw)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in">So does this mean that your software has two views, one 3D view and one 2D view?  Where the 2D view shows whatever the plane is slicing through in the 3D view?<o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-left:.5in">No it does not. The attached image was to merely show how the system functions. There is the 3D volume the software reads, and only the 2D slice is rendered on the screen ie. the 2D slice is internally what the
 cut plane slices in the 3D volume. <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><br>
<br>
<o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Now you have to explain exactly what axis the "yaw" angle rotates around.  In terms of 3D graphics, a "yaw" generally means rotation around the Y axis of the display coordinate system, i.e. around the vertical axis
 of the camera.  Also, whenever you say "x axis", "y axis", or "z axis" make sure you are clear about whether you are talking about the axes of the data set vs. the axes of the camera vs. the axes of the sensor.  Please don't use terms like "yaw out" because
 I have no idea what that is supposed to mean.<o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-left:.5in">Knowing the confusion of the usage of axes (sensor, camera or data) is why I created a representation of the 3 axes in the attached image and based on that roll is in the Y axis, pitch is in Z and yaw is in X. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Pardon my use of "yaw out". If the plane is centered at the tip of the cone, and the plane was to have a yaw motion, it would move like the dial of the pendulum from the inside to the outside of the bounding box. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><br>
<br>
<o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in">On Wed, Jan 15, 2014 at 3:45 PM, Debjit Ghosh <<a href="/user/SendEmail.jtp?type=node&node=5725433&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>> wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">David,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I definitely understand.
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I have attached an image to this email which depicts what I mean by cut plane and what is produced by the positioning of the cut plane. Now, based on the axes drawn in the image,
 Y would be the axis of Roll, Z would be the axes of Pitch and X would be the axes of Yaw. Now you can imagine the cut plane which is positioned at the tip of the cone to be rolling, pitching and yawing.
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Now the orientation of the plane is controlled by a 6DOF sensor. So when the sensor rolls, the plane rolls and the image is rendered correspondingly. Similar for pitch. Now when
 the sensor is yawed, the plane remains stationary – that’s the issue at hand. The plane needs to ideally leave the bounds of the box ie. yaw out. As far as pitch is concerned, I have observed the plane moves all the way to the top surface of the box.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Does this make sense?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
<b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> David Gobbi [via VTK] [mailto:<a href="/user/SendEmail.jtp?type=node&node=5725433&i=1" target="_top" rel="nofollow" link="external">[hidden
 email]</a><a href="http://user/SendEmail.jtp?type=node&node=5725431&i=0" target="_blank" rel="nofollow" link="external">[hidden email]</a>]
<br>
<b>Sent:</b> Wednesday, January 15, 2014 1:24 PM<br>
<b>To:</b> Ghosh, Debjit<br>
<b>Subject:</b> Re: 3D Slicing | vtkImageResliceMapper | No motion of cutplane in one of 3 axes (yaw)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
 <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in">
Hi Debjit, <br>
<br>
Your question is of the sort that is very difficult to understand without some <br>
sort of visual aid.  Do you have any diagrams that illustrate exactly what <br>
you want to achieve?  Do you have screenshots to demonstrate what the <br>
system is doing right now? <br>
<br>
  David <br>
<br>
<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in">On Wed, Jan 15, 2014 at 12:26 PM, Debjit Ghosh <<a href="http://user/SendEmail.jtp?type=node&node=5725429&i=0" target="_blank" rel="nofollow" link="external">[hidden email]</a>> wrote:
<o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
<br>
> I have been using the vtkImageResliceMapper to slice through a 3D volume <br>
> using the following logic (thanks to David Gobbi) where I am able to slice <br>
> in 2 out of 3 axes only. When I change the orientation of the slice in the <br>
> yaw direction there is no movement of the cut plane. I am not sure what I am <br>
> doing incorrectly here or whether this is a limitation of the system. <br>
> <br>
> Here is the code snippet which implements the slicing using the camera and I <br>
> wonder if it has to do with the default_norm that I have set to [0,0,1]: <br>
> <br>
> matrix_= imageslice->GetMatrix(); <br>
> matrix_->MultiplyPoint(default_viewup, this->view_up); <br>
> <br>
> //matrix is a 3x3 rotation matrix which defines the orientation of the <br>
> cutplane <br>
> matrix->MultiplyPoint(this->default_norm, this->normal); <br>
> <br>
> double focalPt[] = {0,0,0}; <br>
> double centerofvol[] = {dimX/2, dimY/2, dimZ/2}; double origin[] = {dimX/2, <br>
> dimY/2, 0}; <br>
> <br>
> vtkSmartPointer<vtkPlane> plane = vtkSmartPointer<vtkPlane>::New(); <br>
> plane->ProjectPoint( centerofvol, focalPt ); <br>
> <br>
> position[0] = focalPt[0] + distfromcam * this->normal[0]; position[1] = <br>
> focalPt[1] + distfromcam * this->normal[1]; position[2] = focalPt[2] + <br>
> distfromcam * this->normal[2]; <br>
> <br>
> cam->SetPosition(position);             //Orientation of the slice plane <br>
> cam->SetFocalPoint(focalPt);    //Point at which my plane is fixed <br>
> cam->SetViewUp(this->view_up); <br>
> cam->SetWindowCenter(win_center_x, win_center_y); <o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:1.0in">
_______________________________________________ <o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in">
<br>
_______________________________________________ <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="margin-left:.5in;text-align:center">
<hr size="1" width="100%" noshade="" style="color:#CCCCCC" align="center">
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";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" style="margin-left:.5in"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444"><a href="http://vtk.1045678.n5.nabble.com/3D-Slicing-vtkImageResliceMapper-No-motion-of-cutplane-in-one-of-3-axes-yaw-tp5725426p5725433.html" target="_top" rel="nofollow" link="external">http://vtk.1045678.n5.nabble.com/3D-Slicing-vtkImageResliceMapper-No-motion-of-cutplane-in-one-of-3-axes-yaw-tp5725426p5725433.html</a>
<o:p></o:p></span></p>
</div>
<div style="margin-top:4.8pt">
<p class="MsoNormal" style="margin-left:.5in;line-height:18.0pt"><span style="font-size:8.5pt;font-family:"Tahoma","sans-serif";color:#666666">To unsubscribe from 3D Slicing | vtkImageResliceMapper | No motion of cutplane in one of 3 axes (yaw),
<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&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&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:"Times New Roman","serif"">NAML</span></a>
<o:p></o:p></span></p>
</div>
</div>
</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/3D-Slicing-vtkImageResliceMapper-No-motion-of-cutplane-in-one-of-3-axes-yaw-tp5725426p5725792.html">RE: 3D Slicing | vtkImageResliceMapper | No motion of cutplane in one of 3 axes (yaw)</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/>