c++ vmtk centerlines

512 views
Skip to first unread message

Jesse Ross-Jones

unread,
Feb 5, 2015, 6:26:57 AM2/5/15
to vmtk-...@googlegroups.com
Dear VMTKrs

I am writing a c++ program to compute centerlines given a starting and target point. I have using the vmtkcenterlines python script as an example : https://github.com/vmtk/vmtk/blob/master/vmtkScripts/vmtkcenterlines.py


I am able to compute the centerlines using VMTK from pypad, however when I try with the c++ program I get the following errors at centerlineFilter->Update();

Generic Warning: In ..\..\VTK-src\Common\vtkMath.cxx, line 522
Unable to factor linear system

Warning: In ..\..\VTK-src\Graphics\vtkDelaunay3D.cxx, line 487
vtkDelaunay3D (174D2480): 3562 degenerate triangles encountered, mesh quality suspect

ERROR: In ..\..\VMTK-src\ComputationalGeometry\vtkvmtkSteepestDescentLineTracer.cxx, line 338
vtkvmtkSteepestDescentLineTracer (2CDB8700): Seed id invalid or exceeds input number of points.

First-chance exception at 0x0f5aae07 (vtkCommon.dll) in vmtkcenterline.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x0f5aae07 (vtkCommon.dll) in vmtkcenterline.exe: 0xC0000005: Access violation reading location 0x00000000.


I am using vtkPointLocator to find the pointIDs for the starting and ending points. Is this function returning invalid ids?

I have attached the code, in case this helps to identify the source of this error.



The command used is:
vmtkcenterline.exe 6_leg_vessels_surface.vtp vmtkcenterline102.vtp 144 204 931 196 230 1053

the volume is located here https://drive.google.com/open?id=0B3GC7RyqALF-VFNNTEhBaHJ2QTg&authuser=1

Many thanks
Jesse
vmtkcenterline.cxx
CMakeLists.txt

Luca Antiga

unread,
Feb 14, 2015, 6:22:59 PM2/14/15
to vmtk-...@googlegroups.com
Hi Jesse,
the code looks correct, except that you should be passing the output of the surface capper into the locator, not the output of the surface triangle filter. The capper adds one extra point per cap which is not there in the triangle filter output.
In any case, you can check that the locator returns a valid point by checking if the point id is -1 or it exceeds surface->NumberOfPoints()-1. 
Hope this helps

Luca

--
You received this message because you are subscribed to the Google Groups "vmtk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmtk-users+...@googlegroups.com.
To post to this group, send email to vmtk-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Luca Antiga, PhD
Co-founder and Principal Scientist, OROBIX Srl
via Gabriele Camozzi 144, 24121 Bergamo, Italy

twitter: @lantiga
mobile: +39.347.43.16.596
office: +39 035.027.37.86

"This message originates from OROBIX Srl and its contents and attachments are privileged and confidential and are intended only for the individual(s) or entity(ies) named above. This message should not be forwarded, distributed or disclosed. Any unauthorized use, dissemination and duplication is strictly prohibited and may be unlawful. All personal messages express views solely of the sender, which are not to be attributed to OROBIX Srl, and may not be copied or distributed without this disclaimer. If you are not the intended recipient or received this message in error, please delete this message and notify the sender by reply e-mail. Opinions, conclusions and other information in this message that do not relate to the official business of OROBIX Srl shall be understood as neither given nor endorsed by it."
Reply all
Reply to author
Forward
0 new messages