[vtkusers] How to obtain surface normals of 3D object as input to new vtk code?
Vidya Raghavan
vidya_raghavan at hotmail.com
Wed Sep 22 01:24:57 EDT 2004
Dear VTK Users,
I need the surface normals of a 3D object for some filtering code that I
will be writing in Tcl. I could display the normals using glyphs, but how do
I actually get the normals' values as input to the code that I need?
The code that I have below is to create a .vtp data file and displaying the
3d object from the.vtp file. I will really appreciate your help.
Thanks,
-vidya
----------------------------------------------------------------------------------------------------------------------------------------
foreach tissue {1} {
# write the models to file
selectTissue ThresholdBetween $tissue $tissue
writer SetFileName model$tissue.vtk
writer Write
#create readers, mappers, and actors
vtkXMLPolyDataReader reader$tissue
reader$tissue SetFileName model$tissue.vtk
vtkPolyDataMapper mapper$tissue
mapper$tissue SetInput [reader$tissue GetOutput]
vtkProperty prop$tissue
prop$tissue SetDiffuseColor [math Random] [math Random] [math Random]
prop$tissue SetSpecularPower 50
prop$tissue SetSpecular .5
prop$tissue SetDiffuse .8
vtkActor actor$tissue
actor$tissue SetMapper mapper$tissue
actor$tissue SetProperty prop$tissue
ren AddActor actor$tissue
ren AddActor hhogActor
}
_________________________________________________________________
All the news that matters. All the gossip from home.
http://www.msn.co.in/NRI/ Specially for NRIs!
More information about the vtkusers
mailing list