[vmtk-users] Coordinates of a centerline

538 views
Skip to first unread message

Vikram Mehta

unread,
Oct 16, 2012, 1:58:28 PM10/16/12
to vmtk-...@lists.sourceforge.net, Luca Antiga
Dear VMTK users,

I have a surface reconstruction of a catheter within a coronary artery and have also generated the centerlines for it.
However, for further processing, I need the coordinates of the catheter centerline and was wondering if you all had any idea to do this ?
I tried using vmtkcenterlinegeometry but I might be doing something wrong,

vmtksurfacereader -ifile /home/vm308/catheter.vtp --pipe vmtkcenterlines -seedselector openprofiles --pipe  vmtkcenterlinegeometry -ofile catheter_clg.vtp

Ideally I would like a .txt file (basically a point cloud) - is this achievable ?

Please advise.

Looking forward to your replies

Thanks in advance,
Vikram.

Arjan Geers

unread,
Oct 16, 2012, 4:47:13 PM10/16/12
to Vikram Mehta, vmtk-...@lists.sourceforge.net
Hi Vikram, 

You could try this:

vmtksurfacereader -ifile /home/vm308/catheter.vtp --pipe vmtkcenterlines -seedselector openprofiles -ofile catheter_cl.dat

It should give you the coordinates of the centerline points in a human-readable format. 

Good luck with it, 

Arjan

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
vmtk-users mailing list
vmtk-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vmtk-users


Vikram Mehta

unread,
Nov 1, 2012, 2:40:28 PM11/1/12
to Arjan Geers, vmtk-...@lists.sourceforge.net
Hi Arjan,

Thanks alot for your response. I seem to have got all the data I needed.


On a separate note,

Does anyone know how to save your surface file as an ASCII STL and not a binary one.

Thanks alot !

Vikram.

Richard Downe

unread,
Nov 1, 2012, 3:19:51 PM11/1/12
to vmtk-...@lists.sourceforge.net
Personally, I write my stl files myself, because I build my surfaces in another program.  Attached is a perl script I've used for converting .off files to .stl -- should be trivial to adapt it to python/iterate over a vtkPolyData instead of .off input.
-rd
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
stlBuilder.pl

Luca Antiga

unread,
Nov 2, 2012, 5:31:27 AM11/2/12
to Richard Downe, vmtk-...@lists.sourceforge.net
Hi everyone,
 about the STL thing, the vtk writer used in vmtk supports ASCII files out of the box, only 
I haven't exposed that option at the script level until today.

I just pushed a commit on the source code repository to allow this:

... --pipe vmtksurfacewriter -ofile foo.stl -mode ascii

It works for stl, vtu, vtk, vtp, ply.

If you're in a rush, get these two files


and copy them over to your {installpath}/lib/vmtk/vmtk folder, replacing the old ones.
Note, it's the lib folder, not the bin folder (you'll find two files called vmtksurfacewriter 
and vmtkmeshwriter, without the py extension: they're not the right ones to replace).


Luca

PS: Richard, thanks a lot for sharing the script, very much appreciated.


<stlBuilder.pl>------------------------------------------------------------------------------

Teiv

unread,
Oct 28, 2014, 3:01:44 AM10/28/14
to vmtk-...@googlegroups.com, vmtk-...@lists.sourceforge.net
Hello Luca,

Could you please show me a way to output the result of the vmtkcenterlines command in the Ascii format so as it can be read by Gmesh.

I have used the following commands but it has not been successful:

$ vmtkcenterlines -ifile aorta.vtk --pipe vmtkmeshwriter -ofile foo.vtk -mode ascii

I really appreciate any help you can provide.

Best, Teiv.

Simone Manini

unread,
Oct 29, 2014, 4:29:30 AM10/29/14
to vmtk-...@googlegroups.com, vmtk-...@googlegroups.com, vmtk-...@lists.sourceforge.net
Dear Teiv,
try to use vmtksurfacewriter instead of vmtkmeshwriter.
The output of vmtkcenterlines is a polydata object.
Best Regards
Simone



Simone Manini, Eng
Project Manager, OROBIX Srl
via Camozzi 144, 24121 Bergamo, Italy

orobix:  www.orobix.com
web:     daron1337.github.io
twitter:  @daron1337
phone:  +39 035 0273786
             +39 035 0170561

"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."
--
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.

Teiv

unread,
Oct 30, 2014, 11:02:29 PM10/30/14
to vmtk-...@googlegroups.com, vmtk-...@lists.sourceforge.net
Dear Simone,

I am now able to output the result of the vmtkcenterlines command in the Ascii format by the following commands:

$ vmtkcenterlines -ifile aorta.vtk -ofile ctl-bin.vtk
$ vmtksurfacewriter -ifile ctl-bin.vtk -ofile ctl-ascii.vtk -mode ascii

Thank you very much,

Best, Teiv.
Reply all
Reply to author
Forward
0 new messages