[vtkusers] How to get the points belonging to a loop

fengfenghsy fengfenghsy at 163.com
Mon Apr 18 01:39:58 EDT 2005


Hello everyone,
     I am now input an gray scale Image, and I used vtkContourFilter to get the isolines of a certain value. The isolines I got are all loops which has no any intersection one after another , but some smaller one ,sometimes, is possibly encircled by a bigger one. Now I could got all the points  belonging to the isolines. My problem is how could I got the points that only belong to only a certain loops. My code is list below:
        ......
		vtkContourFilter * contourfilter = vtkContourFilter::New();
		contourfilter->SetInput((vtkDataSet *)reader->GetOutput());
		contourfilter->SetValue(0,200);

		vtkStripper *Strips = vtkStripper::New();
		Strips->SetInput(contourfilter->GetOutput());
		Strips->Update();

		vtkPolyData *Poly = vtkPolyData::New();
		Poly->SetPoints(Strips->GetOutput()->GetPoints());
		Poly->SetLines(Strips->GetOutput()->GetLines());
        .....


       Thanks a lot!

         	

        fengfenghsy
        fengfenghsy at 163.com
          2005-04-18


More information about the vtkusers mailing list