[vtkusers] connecting points in from vtkPoints

Bill Lorensen bill.lorensen at gmail.com
Tue Feb 2 00:02:30 EST 2010


You could fit the lines with parametric splines and resample them uniformly.

On Tue, Feb 2, 2010 at 12:00 AM, Rakesh Patil <rakeshthp at in.com> wrote:
>
>
> Well, thanks a lot for your help and support...
>
> I got the output what i wanted... Now a small modification required..
> Is there any class in VTK to redistribute points equally spaced..??
> The output which i get has points which are unequally spaced..
> But i want them to be equally spaced..
>
> Thanks
>
> ---------- Original message ----------
> From:Bill Lorensen< bill.lorensen at gmail.com >
> Date: 02 Feb 10 02:14:28
> Subject: Re: [vtkusers] connecting points in from vtkPoints
> To: Rakesh Patil
>
> This example
> http://vtk.org/Wiki/VTK/Examples/ExtractPolyLinesFromPolyData#ExtractPolyLinesFromPolyData.cxx
> shows you how to extract the polylines from vtkCutter followed by
> vtkStripper.
>
> On Mon, Feb 1, 2010 at 1:29 PM, Bill Lorensen wrote:
>> You can get the number of lines with:
>>
>> yourPolyData->GetNumberOfLines();
>>
>> You can get the li nes with something like:
>>
>> vtkIdType npts;
>> vtkIdType *indx;
>>
>> cells = yourPolyData->GetLines();
>>
>> for (cells->InitTraversal(); cells->GetNextCell(npts,indx); )
>> ....
>> indx is an index into the points.
>>
>> On Mon, Feb 1, 2010 at 12:16 PM, Rakesh Patil wrote:
>>>
>>>
>>> Hi.
>>>
>>> I guess vtkStripper produces vtkPolydata as its output.. so How can be
>>> the
>>> polyline extracted from vtkstripper?
>>> As u said, i'm using the points from stripper and producing polyline of
>>> my
>>> own..
>>>
>>> Thanks
>>>
>>> ---------- Original message ----------
>>> From:Bill Lorensen< bill.lorensen at gmail.com >
>>> Date: 01 Feb 10 19:19:48
>>> Subject: Re: [vtkusers] connecting points in from vtkPoints
>>> To: Rakesh Patil
>>>
>>> Are you using the polyline generated by the stripper or creating your
>>> own? You must use the one produced by the stripper.
>>>
>>>
>>> On Mon, Feb 1, 2010 at 4:14 AM, Rakesh Patil wrote:
>>>>
>>>> Yes it does changes ... I get the points.. But when i connect these
>>>> points
>>>> using polyline, again i get a zigzag lines...
>>>>
>>>> ---------- Original message ----------
>>>> From:David Doria< daviddoria+vtk at gmail.com >
>>>> Date: 31 Jan 10 01:22:41
>>>> Su bject: Re: [vtkusers] connecting points in from vtkPoints
>>>> To: rakeshthp at in.com
>>>>
>>>> Thanks,
>>>>
>>>> David
>>>>
>>>>
>>>>
>>>> On Sat, Jan 30, 2010 at 12:25 PM, Rakesh Patil wrote:
>>>>> I need to store the points in an array.. but vtkStripper is not
>>>>> returning
>>>>> the point s.. i tried implementing it as follows
>>>>>
>>>>> vtkStripper *sp = vtkStripper::New();
>>>>>
>>>>> sp->SetInputConnection( contFilter->GetOutputPort());
>>>>>
>>>>> vtkPoints *pt = sp->GetPoints();
>>>>>
>>>>> Here pt is not showing any values.. It is all empty..
>>>>>
>>>>> ---------- Original message ----------
>>>>> From:Bill Lorensen< bill.lorensen at gmail.com >
>>>>> Date: 3 0 Jan 10 18:44:20
>>>>> Subject: Re: [vtkusers] connecting points in from vtkPoints
>>>>> To: Rakesh Patil
>>>>>
>>>>> Use vtkStripper to order the line segments output from
>>>>> vtkContourFilter.
>>>>>
>>>>> On Fri, Jan 29, 2010 at 5:30 AM, Rakesh Patil wrote:
>>>>>> Hello,
>>>>>>
>>>>>> I h ave a scatter data, (xyz file), where x and y are long, and lat
>>>>>> resp
>>>>>> and
>>>>>> z is depth. I need to extract a zero contour from this xyz data. I use
>>>>>> vtkContourFilter to extract the points for zero contour.
>>>>>>
>>>>>> I get the points what i require correctly.. But if i connect them
>>>>>> serially,
>>>>>> it shows that points are connected in a zig-zag form. I get points
>>>>>> directly
>>>>>> from contuorfilter. i.e.
>>>>>>
>>>>>> vtkPoints *pts = contFilter->GetOutput()->GetPoints();
>>>>>>
>>>>>> What and how do i do, so that when i connect the points, i get a
>>>>>> decent
>>>>> > connected line, instead of zig zag ..?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>>
>>>>>> Dear vtkusers ! Get Yourself a cool, short @in.com Email ID now!
>>>>>> _______________________________________________
>>>>>> 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
>>>>>>
>>> > ;>>
>>>>>
>>>>> _______________________________________________
>>>>> 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.vt k.org/mailman/listinfo/vtkusers
>>>>>
>>>>>
>>>>
>>>> Try updating the stripper:
>>>>
>>>> vtkSmartPointer stripper =
>>>> vtkSmartPointer::New();
>>>> st ripper->SetInputConnectio n( contFilter->GetOutputPort());
>>>> stripper->Update();
>>>> vtkPoints *pt = stripper->GetPoints();
>>>>
>>>> Does that change anything?
>>>>
>>>> Dave
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Please keep messages on-topic an d 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
>>>>
>>>>
>>>> Get Yourself a cool, short @in.com Email I D now!
>>>> _______________________________________________
>>>> 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
>>>>
>>>>
>>>
>>
>



More information about the vtkusers mailing list