[vtkusers] How to insert points to construct a 3d object

Jothybasu Selvaraj jothybasu at gmail.com
Tue Mar 6 09:52:08 EST 2012


vtkSurfcaeReconstructionFilter docs say that the neighborhood size and
sample spacing should be set if desired. Can you try varying those?

Jothy

On Tue, Mar 6, 2012 at 2:50 PM, Jothybasu Selvaraj <jothybasu at gmail.com>wrote:

> How is your xyz calculated?
>
> Do you read it from afile or calculate manually?
>
> Jothy
>
> On Tue, Mar 6, 2012 at 2:45 PM, Melissa Goh <melissagoh27 at gmail.com>wrote:
>
>> Hi David,
>>
>> I have attached a screenshot of the 3d object. Below is my code snippets:
>>
>> *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]);
>> }
>> strip.SetPoints(points);
>>
>> vtkSurfaceReconstructionFilter surface = new
>> vtkSurfaceReconstructionFilter();
>> surface.SetInput(strip);
>> vtkContourFilter cf = new vtkContourFilter();
>> cf.SetInputConnection(surface.GetOutputPort());
>> cf.SetValue(0,0.0);
>>
>> vtkReverseSense reverse = new vtkReverseSense();
>> reverse.SetInputConnection(cf.GetOutputPort());
>> reverse.ReverseCellsOn();
>> reverse.ReverseNormalsOn();
>> reverse.Update();
>>
>> vtkPolyDataMapper map = new vtkPolyDataMapper();
>> map.SetInput(reverse.GetOutput());
>> map.ScalarVisibilityOff();
>> *
>> Appreciate your help! :)
>>
>> Thanks,
>> Melissa
>>
>> On Tue, Mar 6, 2012 at 8:22 PM, David Doria <daviddoria at gmail.com> wrote:
>>
>>> On Mon, Mar 5, 2012 at 11:05 PM, Melissa Goh <melissagoh27 at gmail.com>
>>> wrote:
>>> > Hi David,
>>> >
>>> > I am using vtkPolyData to create a 3d nucleus surface based on the set
>>> of
>>> > data points. The structure doesn't seems right. I am not sure of how to
>>> > insert the points in correct order.
>>> >
>>> > Melissa
>>>
>>> You'll have to give us more information. *Why* does it not seem right?
>>> What is wrong with the order you are using? Can you provide some
>>> screenshots? Or the data? Or your code?
>>>
>>> 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
>>
>>
>
>
> --
> Jothy
>
>


-- 
Jothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120306/8a22ab1d/attachment.htm>


More information about the vtkusers mailing list