[vtk-developers] [Urgent help] Construct a 3d nucleus surface using VTK

David Doria daviddoria at gmail.com
Sat Mar 3 11:19:50 EST 2012


On Sat, Mar 3, 2012 at 2:45 AM, mersa88 <melissagoh27 at gmail.com> wrote:
> 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();</i>

You should send this type of email to the users list, not the developers list.

David



More information about the vtk-developers mailing list