[vtkusers] How to construct a 3d nucleus surface using VTK

mersa88 melissagoh27 at gmail.com
Sun Mar 4 10:41:14 EST 2012


I am trying to construct a three-dimensional nucleus surface in VTK but it
doesn't seems right. Can anyone please advise? Thanks a lot!


/vtkPolyData strip = new vtkPolyData();
vtkPoints points = new vtkPoints();

for (int i=0; i<xyz.length; i++)
        points.InsertNextPoint(xyz[i][0], xyz[i][1], xyz[i][2]); //in terms
of x, y, z  

strip.SetPoints(points);

vtkSurfaceReconstructionFilter surface = new
vtkSurfaceReconstructionFilter();
surface.SetInput(strip);
vtkContourFilter cf = new vtkContourFilter();
cf.SetInputConnection(surface.GetOutputPort());

vtkReverseSense reverse = new vtkReverseSense();
reverse.SetInputConnection(cf.GetOutputPort());
reverse.ReverseCellsOn();
reverse.ReverseNormalsOn();
reverse.Update();

vtkPolyDataMapper map = new vtkPolyDataMapper();
map.SetInput(reverse.GetOutput());
map.ScalarVisibilityOff();&lt;/i>

http://vtk.1045678.n5.nabble.com/file/n5535393/training_pattern.jpg 

--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-construct-a-3d-nucleus-surface-using-VTK-tp5535393p5535393.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list