Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about set QInteractorStyleVesselSegmentation save to vtkPolygon #36

Open
wuzhuobin opened this issue Dec 2, 2016 · 9 comments
Open

Comments

@wuzhuobin
Copy link
Owner

save contour to close loop vtkPolygon instead of vtkPolyLine can have better performance in the fill polygon part

@alabamagan
Copy link
Collaborator

alabamagan commented Dec 6, 2016 via email

@wuzhuobin
Copy link
Owner Author

anyway, even though
polygon cell -> vtkVoxelContoursToSurfaceFilter -> vtkPolyDataToImageStencil -> vtkImageStencil -> overlay Image
above pipeline works fine( because i mix up with the vtkImage Origin and spacing between polydata and vtkImageData).

But it didn't works when there is one slice whose neighbor slice has not contour. it only works in the situation that all contours are successive.

@wuzhuobin
Copy link
Owner Author

decide to use old method to fill with animation. wtf.
or using different interpolation method to generate spline like polygon to do filling slice by slice.
but the original interpolation method is vtkBezierContourLineInterpolator, which is only used in contour

@wuzhuobin
Copy link
Owner Author

dont use //spline->ClosedOn();l
this is a trick, which make the first point(0) and the last point merge
if a polygon which has a same point with 2 point id
if polygon->findPointsInPolygon will get wrong

@alabamagan
Copy link
Collaborator

alabamagan commented Dec 8, 2016 via email

@wuzhuobin
Copy link
Owner Author

anyway, now i using the vtkParametricSpline function for interpolating contour point, although the splines are not perfectly the same as the contour line which interpolate by vtkBezierContourLineInterpolator, but it is supposed enough for coarse filling. And it is extremely fast. 55 slices take about a few seconds in release.

@alabamagan
Copy link
Collaborator

WOW, that's pretty amazing improvements!

@wuzhuobin
Copy link
Owner Author

image
it might be wrong in this situation...

future improvement: vtkBezierSpline. maybe do it one day

@alabamagan
Copy link
Collaborator

lol, leave it to user la

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants