[vtkusers] connecting points in from vtkPoints

siqi chen siqichensc at gmail.com
Fri Jan 29 11:41:58 EST 2010


By the way, it can only deal with one curve problem. If you have multiple
curves and you want to reorder them at the same time, the current code needs
some modification.

Siqi

On Fri, Jan 29, 2010 at 11:28 AM, siqi chen <siqichensc at gmail.com> wrote:

>
> The reason is that the points from the vtkContourFilter are not ordered.
> You need to reorder these points.  I can share with you one function I wrote
> yesterday which solves exactly the same problem.
> The input is the vtkpolydata you extract from contourfilter or
> marchingsquares. The output is a vector which stores the ordered index of
> the original points. For example, if the output vector is {1, 3, 5, 2, 4},
> which means you can connect points 1 3 5 2 4 and they are in ordered. Of
> course there are two ways of connection, clockwise or counter-, you can
> change it in the function also. I have a comment there you can find.
>
> http://www.rpi.edu/~chens/download/connectivityDetermine.cpp<http://www.rpi.edu/%7Echens/download/connectivityDetermine.cpp>
>
> I can't guarantee if will work on your data set, since it is still very
> preliminary,  just give it a try.
>
> Siqi
>
>
> On Fri, Jan 29, 2010 at 5:30 AM, Rakesh Patil <rakeshthp at in.com> wrote:
>
>> Hello,
>>
>> I have 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!<http://mail.in.com/mails/new_reg.php?utm_source=invite&utm_medium=outgoing>
>>
>> _______________________________________________
>> 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
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100129/f867283b/attachment.htm>


More information about the vtkusers mailing list