[vtkusers] SetCutPlane not working in vtkImageResliceMapper

Debjit Ghosh dghosh at chla.usc.edu
Mon Oct 15 13:56:10 EDT 2012


Thank you very much. You are right!



So I turned SliceFacesCamera Off and it SetSlicePlane with a vtkPlane object. Now, though the corresponding slice has been extracted, there are two issues that I face, that I would appreciate your advice on, immensely.



- The image is getting visualized as a plane slanted in 3D space which I had to move with Shift + LeftMousePressed to align - How do I slap it onto the screen so it is straight?

- I was updating the normal in a Timer and incrementing it to test whether I can do this dynamically and it took effect only the first time



Perhaps it's due to my lack of experience in 3D slicing but these are the updates that I have tried calling:



               TimerEvent()

               {

                                             vtkSmartPointer<vtkPlane> slicePlane = vtkSmartPointer<vtkPlane>::New();

                                             slicePlane = resliceMapper->GetSlicePlane();

                                             slicePlane->Print(std::cout);

                                             x+=0.01; y +=0.01; z+=0.01;

                                             slicePlane->SetNormal(x, y, z);

                                             slicePlane->SetOrigin(103.5, 111.5, 175.5);

                                             resliceMapper->SetSlicePlane(slicePlane);



                                             resliceMapper->Modified();

                                             imageSlice->Render(renderer);



                                             renderer->ResetCamera();

                                             interactor->Modified();

                                             interactor->Render();

               }



Basically, I have tried all the possible updates that I could :| But in vain. Could you please advise which update needs to be called?



Thank you!


From: David Gobbi [via VTK] [mailto:ml-node+s1045678n5716628h22 at n5.nabble.com]
Sent: Friday, October 12, 2012 5:23 PM
To: Ghosh, Debjit
Subject: Re: SetCutPlane not working in vtkImageResliceMapper

Hi Debjit,

You probably have SliceFacesCamera turned on for the mapper.  This
will override any plane that you set manually.

If you are using SliceFacesCamera and SliceAtFocalPoint, then the way
to change the slice is by changing the camera's position and focal
point.

 - David


On Fri, Oct 12, 2012 at 6:01 PM, Debjit Ghosh <[hidden email]</user/SendEmail.jtp?type=node&node=5716628&i=0>> wrote:
> I have been facing an issue where I called the SetSlicePlane(vtkPlane*) with
> a normal and/or an origin but the visualization didn't change. I had called
> the interactor->Render(), called the Modified() on the ImageResliceMapper
> but neither made the difference.
>
> It would be great if someone could tell me what I am missing here.
_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

________________________________
If you reply to this email, your message will be added to the discussion below:
http://vtk.1045678.n5.nabble.com/SetCutPlane-not-working-in-vtkImageResliceMapper-tp5716627p5716628.html
To unsubscribe from SetCutPlane not working in vtkImageResliceMapper, click here<http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5716627&code=ZGdob3NoQGNobGEudXNjLmVkdXw1NzE2NjI3fDEyODQ5NDU0MTA=>.
NAML<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>


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

---------------------------------------------------------------------





--
View this message in context: http://vtk.1045678.n5.nabble.com/SetCutPlane-not-working-in-vtkImageResliceMapper-tp5716627p5716653.html
Sent from the VTK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121015/c20acc47/attachment.htm>


More information about the vtkusers mailing list