centerline cross-sectional area sampling issues

452 views
Skip to first unread message

Stephanie

unread,
Mar 2, 2015, 4:15:05 PM3/2/15
to vmtk-...@googlegroups.com
Hi,

I was successfully able to obtain centerlines along my geometry. I'd like to sample the cross sectional areas long these centerlines and obtain a number of measurements from these. I followed this thread and tried the following commands, first I broke them up as Yimeng suggested

vmtkcenterlineresampling -ifile <original_centerline> -length 0.01 -ofile <resampled_centerline> 
vmtkcenterlinesections -ifile <surface_file> -centerlinesfile <resampled_centerline> -ofile <sections_along_centerline> 
vmtksurfaceviewer -ifile <sections_along_centerline> 

and then used the single command: vmtkcenterlines -ifile XX.stl -lenfth 0.01 --pipe vmtkcenterlineresampling --pipe vmtkcenterlinesections -i @vmtkcenterline.i -centerlines @vmtkcenterlineresampling.o --pipe vmtksurfaceviewer -i @vmtkcenterlinesections.o

The first method gives me an unbounded local error as follows:
Input vmtkcenterlineresampling members:
    Id = 0
    Disabled = 0
    Centerlines = None
    CenterlinesInputFileName = XXNOin.dat
    Length = 0.01
    CenterlinesOutputFileName = centerline_resampled.vtp
Reading Tecplot surface file.
Traceback (most recent call last):
  File "/usr/bin/vmtk", line 16, in <module>
    pipe.Execute()
  File "/usr/lib/pymodules/python2.7/vmtk/pype.py", line 258, in Execute
    scriptObject.IORead()
  File "/usr/lib/pymodules/python2.7/vmtk/pypescript.py", line 512, in IORead
    reader.Execute()
  File "/usr/lib/pymodules/python2.7/vmtk/vmtksurfacereader.py", line 206, in Execute
    self.ReadTecplotSurfaceFile()
  File "/usr/lib/pymodules/python2.7/vmtk/vmtksurfacereader.py", line 98, in ReadTecplotSurfaceFile
    self.PrintLog("Reading " + str(numberOfNodes)+" nodes.")
UnboundLocalError: local variable 'numberOfNodes' referenced before assignment


It is a problem that Centerlines = None? Using the single command above gave me a Runtime Error. I tried adding in scaling as well, since these vessels are quite small, to no avail. Any suggestions would be much appreciated.

Thank you,

Stephanie
Screenshot from 2015-03-02 15:31:00.png
XXNOin.dat

Luca Antiga

unread,
Mar 9, 2015, 6:36:01 AM3/9/15
to Stephanie, vmtk-...@googlegroups.com
Hi Stephanie,
can you please try the following?

vmtksurfacereader -ifile XX.stl —pipe vmtkcenterlines --pipe vmtkcenterlineresampling -length 0.01 --pipe vmtkcenterlinesections --pipe vmtksurfaceviewer -i @vmtkcenterlinesections.o

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

Stephanie

unread,
Mar 10, 2015, 10:31:30 PM3/10/15
to vmtk-...@googlegroups.com
Hi Luca,

That did work. Thank you! I see I hastily misspelled length and added it in the wrong place when posting the command below.The real difference seems to be using surface reader before computing the centerlines. I'm noting this technique for other operations. Though I can see cross-sections were taken along all of my vessels, there are some additional lines overlaid in certain parts. Is this simply a rendering error? Is there a way I can clean this up?

Thank you for your help!

Best,

Stephanie
XXsections.png
XXsections2.png

Luca Antiga

unread,
Mar 17, 2015, 4:52:39 AM3/17/15
to Stephanie, vmtk-...@googlegroups.com
Hi Stephanie,
this is not a rendering error, I think these are sections that cut large portions of the model obliquely due to the orientation of the centerline. They are legitimate sections, normal to the centerline, but they happen to be seeping in other connected branches.
There is a way to avoid this: use vmtkbranchsections, which requires you to first split the model into branches and then generate sections from the individual branches. 
To learn how to split a model, follow this tutorial: http://www.vmtk.org/tutorials/BranchSplitting.html
Best,

Luca

massimiliano mercuri

unread,
Apr 26, 2017, 4:50:15 AM4/26/17
to vmtk-users, sel...@cornell.edu
Hi Luca
I am trying to exctract surface area from an stl file following your suggestions about before splitting the surface into different branches.
I wrote down a code like this

vmtksurfacereader -ifile C:\Users\Max\Desktop\coarctation_model\VESSELWALL.stl --pipe vmtkcenterlines -endpoints 1 -seedselector profileidlist -sourceids 1 -targetids 2 0 3 4 --pipe vmtkbranchextractor --pipe vmtkbranchclipper -ofile C:\Users\Max\Desktop\coarctation_model\coarctation_model_branches.vtp  --pipe vmtkbranchsections  -distancespheres 5 -ofile C:\Users\Max\Desktop\coarctation_model\coarctation_branch_areas.dat

what I would like to have is an output file with all the section area and position on the centerline or distance between these areas on the centerline, also is it possible to sampling these area in order to have like 100 maximum or 10 per each branch?

Thanks a lot

Massimiliano
Message has been deleted

Yong He

unread,
Dec 8, 2017, 7:02:40 PM12/8/17
to vmtk-users
vmtkcenterlinesections does this. You can use vmtkcenterlineresampling to set the interval and control how many sections you want. You need to do this for each branch, not once for the branches of a bifurcation.
Reply all
Reply to author
Forward
0 new messages