[vtkusers] 3D Slicing | vtkImageResliceMapper | No motion of cutplane in one of 3 axes (yaw)

David Gobbi david.gobbi at gmail.com
Wed Jan 15 17:59:19 EST 2014


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?

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.


On Wed, Jan 15, 2014 at 3:45 PM, Debjit Ghosh <dghosh at chla.usc.edu> wrote:

>  David,
>
>
>
> I definitely understand.
>
>
>
> 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.
>
>
>
> 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.
>
>
>
> Does this make sense?
>
>
>
> *From:* David Gobbi [via VTK] [mailto:ml-node+[hidden email]<http://user/SendEmail.jtp?type=node&node=5725431&i=0>]
>
> *Sent:* Wednesday, January 15, 2014 1:24 PM
> *To:* Ghosh, Debjit
> *Subject:* Re: 3D Slicing | vtkImageResliceMapper | No motion of cutplane
> in one of 3 axes (yaw)
>
>
>
> Hi Debjit,
>
> Your question is of the sort that is very difficult to understand without
> some
> sort of visual aid.  Do you have any diagrams that illustrate exactly what
> you want to achieve?  Do you have screenshots to demonstrate what the
> system is doing right now?
>
>   David
>
>
> On Wed, Jan 15, 2014 at 12:26 PM, Debjit Ghosh <[hidden email]<http://user/SendEmail.jtp?type=node&node=5725429&i=0>>
> wrote:
>
>
> > I have been using the vtkImageResliceMapper to slice through a 3D volume
> > using the following logic (thanks to David Gobbi) where I am able to
> slice
> > in 2 out of 3 axes only. When I change the orientation of the slice in
> the
> > yaw direction there is no movement of the cut plane. I am not sure what
> I am
> > doing incorrectly here or whether this is a limitation of the system.
> >
> > Here is the code snippet which implements the slicing using the camera
> and I
> > wonder if it has to do with the default_norm that I have set to [0,0,1]:
> >
> > matrix_= imageslice->GetMatrix();
> > matrix_->MultiplyPoint(default_viewup, this->view_up);
> >
> > //matrix is a 3x3 rotation matrix which defines the orientation of the
> > cutplane
> > matrix->MultiplyPoint(this->default_norm, this->normal);
> >
> > double focalPt[] = {0,0,0};
> > double centerofvol[] = {dimX/2, dimY/2, dimZ/2}; double origin[] =
> {dimX/2,
> > dimY/2, 0};
> >
> > vtkSmartPointer<vtkPlane> plane = vtkSmartPointer<vtkPlane>::New();
> > plane->ProjectPoint( centerofvol, focalPt );
> >
> > position[0] = focalPt[0] + distfromcam * this->normal[0]; position[1] =
> > focalPt[1] + distfromcam * this->normal[1]; position[2] = focalPt[2] +
> > distfromcam * this->normal[2];
> >
> > cam->SetPosition(position);             //Orientation of the slice plane
> > cam->SetFocalPoint(focalPt);    //Point at which my plane is fixed
> > cam->SetViewUp(this->view_up);
> > cam->SetWindowCenter(win_center_x, win_center_y);
>
> _______________________________________________
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140115/564175b9/attachment.html>


More information about the vtkusers mailing list