[vtkusers] Ordering wrong when convert vtkImageData to vtkPolyData
Summer Sun
sunxiasx at foxmail.com
Fri Mar 17 01:13:18 EDT 2017
Thank you so much David,
I have tried your method but the result I use vtkStripper is exactly the
*same*...
I saw the vtk documents below that might be help but I don't quite get it:
---
*Warning*
If triangle strips or poly-lines exist in the input data they *will be
passed through to the output data*. This filter will only construct triangle
strips if triangle polygons are available; and will only construct
poly-lines if lines are available.
---
*Here's my related code:*
...
/// get marching squares of image data/
vtkSmartPointer<vtkMarchingSquares> segContour =
vtkSmartPointer<vtkMarchingSquares>::New();
segContour->SetInputData(segmentation); /// segmentation is my image data/
segContour->SetValue(0, 255);
segContour->Update();
/// use vtkStripper to process marching squares data/
vtkSmartPointer<vtkStripper> segPolyStripper =
vtkSmartPointer<vtkStripper>::New();
segPolyStripper->SetInputData(segContour->GetOutput());
segPolyStripper->Update();
/// draw the contour/
contourWidget->Initialize(segPolyStripper->GetOutput());
...
Thanks for your help
Summer
--
View this message in context: http://vtk.1045678.n5.nabble.com/Ordering-wrong-when-convert-vtkImageData-to-vtkPolyData-tp5742492p5742502.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list