[vtkusers] Problem with vtkContourTriangulator and vtkPlaneCutter

Jeffery Lewis jlewis at accuray.com
Fri Mar 2 17:57:44 EST 2018


I have a prototype that generates a super toroid surface model. A cut plane is defined to be orthogonal to the camera line of sight, and cuts through the middle of the surface model. The cut contour (generated by vtkCutter), and filled cut contour (generated by vtkContourTriangulator) is rendered with the surface model. The surface model is shown transparent as it is only a reference. The rendering of interest is the cut contour (shown as red contour) and filled cut contour (shown as green). Moving the mouse rotates the surface model. The cut plane stays orthogonal to the camera while the surface model rotates. By rotating the surface model, you can see the cut contour and filled cut contour get updated interactively as it slices through the middle of the surface model.

Unfortunately, the filled cut contour does not look right and I can't seem to figure it out. If I change the surface model to something simpler like a cone, then everything looks fine.

Also of note is that if I switch out the vtkCutter with a vtkPlaneCutter, the program crashes. I would like to use the vtkPlaneCutter since from its documentation seems to indicate that it will get better performance. The vtkPlaneCutter crashes using either the super toroid or cone.

Attached is the source code. The stuff between "// Setup a slider widget for each varying parameter BEGIN" and "// Setup a slider widget for each varying parameter END" can be ignored as this only involves setting up sliders to manipulate the super toroid, which comes from the ParametricSuperToroidDemo example. The setup of the pipleline for the cut contour and filled cut contour is near the bottom.

Also attached is a sample screen shot of the incorrect filled cut contour.



[cid:image013.png at 01D3B236.CFCA0DE0]

             [cid:image014.png at 01D3B236.CFCA0DE0] <https://www.facebook.com/AccurayIncorporated>  [cid:image015.png at 01D3B236.CFCA0DE0] <http://www.twitter.com/accuray>  [cid:image016.png at 01D3B236.CFCA0DE0] <https://www.linkedin.com/company/accuray>  [cid:image017.png at 01D3B236.CFCA0DE0] <https://www.youtube.com/user/AccurayIncorporated>







Jeffery Lewis
Staff Software Engineer, Treatment Planning Systems

1310 Chesapeake Terrace
Sunnyvale, CA 94089
USA
Tel: 1.408.789.4367
jlewis at accuray.com




-- WARNING - CONFIDENTIAL INFORMATION: The information contained in the e-mail may contain confidential and privileged information and is intended solely for the use of the intended recipient(s). Access for any review, re-transmission, dissemination or other use of, or taking of any action in regard and reliance upon this e-mail by persons or entities other than the intended recipient(s) is unauthorized and prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180302/80552bbb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image013.png
Type: image/png
Size: 12364 bytes
Desc: image013.png
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180302/80552bbb/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image014.png
Type: image/png
Size: 1447 bytes
Desc: image014.png
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180302/80552bbb/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image015.png
Type: image/png
Size: 1625 bytes
Desc: image015.png
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180302/80552bbb/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image016.png
Type: image/png
Size: 1612 bytes
Desc: image016.png
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180302/80552bbb/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image017.png
Type: image/png
Size: 1344 bytes
Desc: image017.png
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180302/80552bbb/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image018.jpg
Type: image/jpeg
Size: 831 bytes
Desc: image018.jpg
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180302/80552bbb/attachment-0001.jpg>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: VOISlicePrototype.cpp
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180302/80552bbb/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SuperToroidWithIncorrectFilledCutContour.png
Type: image/png
Size: 90337 bytes
Desc: SuperToroidWithIncorrectFilledCutContour.png
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180302/80552bbb/attachment-0011.png>


More information about the vtkusers mailing list