Pick point on vtkPlane

View: New views
4 Messages — Rating Filter:   Alert me  

Pick point on vtkPlane

by superzz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello
I am developping a volume rendering program.

I'm using vtkInteractorStyleTrackballCamera as InteractorStyle and vtkPlane to cut volume. When user click the screen, my program needs to calculate and output the 3D intersection point to vtkPlane.

I know how to do this in my XNA/directX program, but not familiar with the corresponding API of VTK. Googled for more than 3 hours but finally failed to find out what API should be used. Please help me.

Thanks

superZz

Re: Pick point on vtkPlane

by David Doria-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Nov 6, 2009 at 8:53 AM, superzz <jxdw_zlf@...> wrote:

Hello
I am developping a volume rendering program.

I'm using vtkInteractorStyleTrackballCamera as InteractorStyle and vtkPlane
to cut volume. When user click the screen, my program needs to calculate and
output the 3D intersection point to vtkPlane.

I know how to do this in my XNA/directX program, but not familiar with the
corresponding API of VTK. Googled for more than 3 hours but finally failed
to find out what API should be used. Please help me.

Thanks

superZz

This is a very good question. I believe you have to add an observer or something? Here is the shell of an example of this: http://www.vtk.org/Wiki/Plane_Picking

Can anyone make it output the coordinates of the point that is clicked?

Thanks,

David
 


_______________________________________________
Powered by 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

Re: Pick point on vtkPlane

by Anka Kochanowska-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!
Maybe this explanation written by Mark Wyszomierski (thanks Mark!) could help:
http://devsample.org/index.php?option=com_content&task=view&id=48&Itemid=27
Anka



On Fri, Nov 6, 2009 at 9:17 AM, David Doria <daviddoria%2Bvtk@...> wrote:
On Fri, Nov 6, 2009 at 8:53 AM, superzz <jxdw_zlf@...> wrote:

Hello
I am developping a volume rendering program.

I'm using vtkInteractorStyleTrackballCamera as InteractorStyle and vtkPlane
to cut volume. When user click the screen, my program needs to calculate and
output the 3D intersection point to vtkPlane.

I know how to do this in my XNA/directX program, but not familiar with the
corresponding API of VTK. Googled for more than 3 hours but finally failed
to find out what API should be used. Please help me.

Thanks

superZz

This is a very good question. I believe you have to add an observer or something? Here is the shell of an example of this: http://www.vtk.org/Wiki/Plane_Picking

Can anyone make it output the coordinates of the point that is clicked?

Thanks,

David
 


_______________________________________________
Powered by 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



_______________________________________________
Powered by 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

Re: Pick point on vtkPlane

by superzz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks. It seems that it is helpful. I will try it and will post here if the problem is fixed. Thanks again.

David Doria-2 wrote:
On Fri, Nov 6, 2009 at 8:53 AM, superzz <jxdw_zlf@yahoo.com.cn> wrote:

>
> Hello
> I am developping a volume rendering program.
>
> I'm using vtkInteractorStyleTrackballCamera as InteractorStyle and vtkPlane
> to cut volume. When user click the screen, my program needs to calculate
> and
> output the 3D intersection point to vtkPlane.
>
> I know how to do this in my XNA/directX program, but not familiar with the
> corresponding API of VTK. Googled for more than 3 hours but finally failed
> to find out what API should be used. Please help me.
>
> Thanks
>
> superZz
>

This is a very good question. I believe you have to add an observer or
something? Here is the shell of an example of this:
http://www.vtk.org/Wiki/Plane_Picking

Can anyone make it output the coordinates of the point that is clicked?

Thanks,

David

_______________________________________________
Powered by 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