[vtkusers] How to enable a user to pick points from a (3D) mesh and show those points
Ruby Shamir
rubke at cs.huji.ac.il
Wed Apr 28 08:45:29 EDT 2004
Hello,
I would like to enable the user to pick points using the mouse from a
(3D) mesh (as vtkActor) (for user rough point based registration).
I tried to implement it using getZ, and transformations from view to
world but it gave me back garbage.
How can I do it?
Regards,
Ruby Shamir
------------------------------------------------------------------------
---------------
Some more information which might be usefull:
* The implementation is in MFC and I am not using the interactor.
* I copied the interface, the registration should be between the right
and left windows
* I copied the part of code which extracts the slices to a 3D mesh.
skinExtractor = vtkContourFilter::New();
skinExtractor->SetInput((vtkDataSet *) v16->GetOutput());
skinExtractor->SetValue(0, 500); // for skin
skinNormals = vtkPolyDataNormals::New();
skinNormals->SetInput(skinExtractor->GetOutput());
skinNormals->SetFeatureAngle(60.0);
skinStripper = vtkStripper::New();
skinStripper->SetInput(skinNormals->GetOutput());
skinMapper = vtkPolyDataMapper::New();
skinMapper->SetInput(skinStripper->GetOutput());
skinMapper->ScalarVisibilityOff();
skin = vtkActor::New();
skin->SetMapper(skinMapper);
skin->GetProperty()->SetDiffuseColor(1, .49, .25);
skin->GetProperty()->SetSpecular(.3);
skin->GetProperty()->SetSpecularPower(20);
skin->GetProperty()->SetOpacity(1.0);
skin->SetOrigin(126,126,0.5);
------------------------------------------------------------------------
----------------
----------------------------------------------------------
Ruby Shamir,
School of Engineering and Computer Science
The Hebrew University, Givat Ram
Jerusalem, Israel
URL : http://www.cs.huji.ac.il/~rubke/
Email : rubke at cs.huji.ac.il
Phones:
CAS Lab +972-2-6585371
CS Fax: +972-2-658-5439
----------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040428/1ddfa0d9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 23798 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040428/1ddfa0d9/attachment.jpeg>
More information about the vtkusers
mailing list