Hi Manasi,

To answer your second question:

Let's assume a vessel with a single bifurcation. Before the bifurcation,
the two centerlines will indeed follow approximately the same path. In
other words, nearby points on CL1 and CL2 should have approximately the
same abscissa. 'Approximately', because the exact path depends on the
sampling of the centerline.

To answer your first question:

Let's assume the sampling of the two centerlines is exactly the same (it
seems that the standard output of vmtkcenterlines is such). Sort the
points by abscissa in ascending order (for example in Paraview's
Spreadsheet View). You'll see that at first the points on row 2n and 2n+1
are the same (n = 0,1,2,...). Once CL1 and CL2 start to deviate, the points
will be different.

But... this approach is pretty ugly. Not knowing your goal I can't be sure,
but I actually doubt the point you'll find is very meaningful (correct me
if I'm wrong :-) ). It's not unlikely that there is a more appropriate
solution readily available in VMTK. To familiarize yourself with the
possibilities, I would recommend you to go through the tutorials "Computing
Centerlines", "Branch Splitting", and "Geometric Analysis".

Hope this helps,

Arjan

On Wed, May 2, 2012 at 11:55 PM, Ramachandran, Manasi <
manasi-ramachand...@uiowa.edu> wrote:

>  Hi Arjan,
>
>
>
> Thank you so much for your reply. I liked the idea of using centerline
> attributes to use L and D.
>
>
>
> Along the same lines, I was hoping I could also discuss the possiblility
> of locating the same point on 2 different centerlines. For example, say I
> have CL1 which is a straight line and say CL2 which turns to 90 deg at some
> point. I want to locate the point where the CL2 turns and find the same
> point on CL1. Can I do this using D and L also?
>
>
>
> To elaborate a little more, let us assume that both centerlines start at
> the same point (x,y,z). Then, if I calculate L at one point (x2,y2,z2) in
> CL2 and then find the same L and pick the corresponding point
> (x1,y1,z1) on CL1, will (x1,y1,z1) and (x2,y2,z2) be approximately the same
> in physical space?
>
>
>
> Thank you again for your time and support,
>
> Manasi
>
> ------------------------------
>
>  *From:* Arjan Geers [ajge...@gmail.com]
> *Sent:* Thursday, April 26, 2012 5:46 PM
>
> *To:* Ramachandran, Manasi
> *Cc:* vmtk-users@lists.sourceforge.net
> *Subject:* Re: [vmtk-users] Problem with VMTKcenterlinegeometry
>
>   Hi Manasi,
>
>  If you save the output as *.vtp and open it in Paraview, you'll see that
> both tortuosity and length are cell data. They only have one value per
> cell, i.e. centerline. All other variables are point data, defined at each
> point of the centerline.
>
>  From the looks of it, cell data is not written to *.tec or *.dat. If
> your goal is to obtain either the length or tortuosity of a centerline, I'd
> recommend using *.vtp.
>
>  Alternatively, you could run vmtkcenterlineattributes and obtain the
> length in Tecplot by picking the abscissa value at the outlet (L), assuming
> the abscissa at the inlet is 0. From the start/end coordinates of the
> centerline you could calculate the Euclidean distance between the in- and
> outlet (D). The tortuosity (Chi) would then be Chi = L/D - 1 (Piccinelli
> TMI 2009).
>
>  Hope this helps,
>
>  Arjan
>
>
>
> On Thu, Apr 26, 2012 at 11:46 PM, Ramachandran, Manasi <
> manasi-ramachand...@uiowa.edu> wrote:
>
>>  Hi Arjan,
>>
>>
>>
>> Thank you for the reply. I ran this command:
>>
>>
>>
>> *vmtkcenterlinegeometry -ifile
>> C:/Users/manasi.ramachandran/Documents/30677/stented/Negative20/stented_Series5_Negative20_levelsets_cl_CL.vtp
>> -smoothing 1 -iterations 10 -outputsmoothed 1 -ofile
>> C:/Users/manasi.ramachandran/Documents/30677/stented/Negative20/stented_Series5_Negative20_levelsets_cl_CLGM.tec
>> *
>>
>>
>>
>> I can now get data printed on the tec file. There is no length or
>> Tortuosity information though. Here are first few lines of my tec file:
>>
>>
>>
>> *VARIABLES =
>> X,Y,Z,MaximumInscribedSphereRadius,EdgeArray0,EdgeArray1,EdgePCoordArray,Curvature,Torsion,FrenetTangent0,FrenetTangent1,FrenetTangent2,FrenetNormal0,FrenetNormal1,FrenetNormal2,FrenetBinormal0,FrenetBinormal1,FrenetBinormal2
>> *
>>
>> *ZONE N=805,E=0,F=FEPOINT,ET=TRIANGLE*
>>
>> *375.212860107 127.314727783 -840.130249023 4.43752339446 5774.0 5774.0
>> 0.0 0.0 0.0 -0.794417157975 0.0212929549817 -0.606999167366 0.581361416428
>> 0.315991613505 -0.749778769827 0.1758416407 -0.948523015147 -0.263408062013
>> *
>>
>> *375.533172607 127.303581238 -839.876281738 4.56642718039 1163.0 1163.0
>> 0.0 0.106633669157 0.0 -0.794417157975 0.0212929549817 -0.606999167366
>> 0.581361416428 0.315991613505 -0.749778769827 0.1758416407 -0.948523015147
>> -0.263408062013*
>>
>>
>>
>>
>>
>>  What am I doing wrong? Why am I not getting Length and Tortuosity to
>> print into the file.
>>
>>
>>
>> Thank you for your help,
>>
>> Manasi
>>
>>
>>
>>
>>  ------------------------------
>> *From:* Arjan Geers [ajge...@gmail.com]
>> *Sent:* Thursday, April 26, 2012 11:44 AM
>> *To:* Ramachandran, Manasi
>> *Cc:* vmtk-users@lists.sourceforge.net
>> *Subject:* Re: [vmtk-users] Problem with VMTKcenterlinegeometry
>>
>>    Hi Manasi,
>>
>>  The not-so-elegant solution to your problem may be here:
>> http://sourceforge.net/mailarchive/message.php?msg_id=28032510
>>
>>  Open the file .\vmtk 0.9.0\lib\vmtk\vmtk\vmtkcenterlinegeometry.py in a
>> text editor and add the following lines near the end of the file:
>>
>>  centerlineGeometry.SetLengthArrayName('Length')
>> centerlineGeometry.SetTortuosityArrayName('Tortuosity')
>>
>>  Run the following in PypePad to get the desired output:
>>
>>  vmtkcenterlinegeometry -ifile cl.vtp -smoothing 1 -iterations 10
>> -outputsmoothed 1 -ofile clgm.tec
>>
>>  Notice that you should leave out of your script "-lengtharray Length"
>>  and "-tortuosityarray Tortuosity",because those array names are now
>> hard-coded. Otherwise, you will receive again the error message: 
>> "vmtkcenterlinegeometry
>> error: unknown option -lengtharray"
>>
>>  Optionally, you could leave out "-curvaturearray Curvature", because
>> the default value is 'Curvature'.* *And you could leave out "-i
>> Centerlines", because you already specify the centerline with "-ifile
>> cl.vtp".
>>
>>  Hope this helps,
>>
>>  Arjan
>>
>> On Thu, Apr 26, 2012 at 3:04 PM, Ramachandran, Manasi <
>> manasi-ramachand...@uiowa.edu> wrote:
>>
>>>  Hi,
>>>
>>>
>>>
>>> I am using VMTK0.9 on windows 7 (64 bit). I have some problem using
>>> vmtkcenterlinegeometry.
>>>
>>>
>>>    I ran this command:
>>> *vmtkcenterlinegeometry -i Centerlines -ifile
>>> stented_Series5_Negative20_levelsets_cl_CL.vtp -lengtharray Length
>>> -curvaturearray Curvature -tortuosityarray Tortuosity -smoothing 1
>>> -iterations 10 -outputsmoothed 1 -ofile
>>> stented_Series5_Negative20_levelsets_cl_CLGM.tec*
>>>
>>> And it will not detect most parameters. Here is the message I get:
>>>
>>> *Creating vmtkCenterlineGeometry instance.**
>>> Automatic piping vmtkcenterlinegeometry**
>>> Parsing options vmtkcenterlinegeometry**
>>> vmtkcenterlinegeometry error: unknown option -lengtharray**
>>> vmtkcenterlinegeometry : compute the local geometry of centerlines in**
>>>  terms of curvature and torsion**
>>>   Input arguments:**
>>>    -id Id (str,1); default=0: script id**
>>>    -handle Self (self,1): handle to self**
>>>    -disabled Disabled (bool,1); default=0: disable execution and**
>>>      piping**
>>>    -i Centerlines (vtkPolyData,1): the input centerlines**
>>>    -ifile CenterlinesInputFileName (str,1): filename for the default**
>>>      Centerlines reader**
>>>    -curvaturearray CurvatureArrayName (str,1); default=Curvature: name**
>>>      of the array where curvature values have to be stored**
>>>    -torsionarray TorsionArrayName (str,1); default=Torsion: name of**
>>>      the array where torsion values have to be stored**
>>>    -frenettangentarray FrenetTangentArrayName (str,1);**
>>>      default=FrenetTangent: name of the array where tangent vectors of**
>>>      the Frenet reference system have to be stored**
>>>    -frenetnormalarray FrenetNormalArrayName (str,1);**
>>>      default=FrenetNormal: name of the array where normal vectors of**
>>>      the Frenet reference system have to be stored**
>>>    -frenetbinormalarray FrenetBinormalArrayName (str,1);**
>>>      default=FrenetBinormal: name of the array where binormal vectors**
>>>      of the Frenet reference system have to be stored**
>>>    -smoothing LineSmoothing (bool,1); default=0**
>>>    -outputsmoothed OutputSmoothedLines (bool,1); default=0**
>>>    -iterations NumberOfSmoothingIterations (int,1) >= 0; default=100**
>>>    -factor SmoothingFactor (float,1) >= 0.0; default=0.1**
>>>    -ofile CenterlinesOutputFileName (str,1): filename for the default**
>>>      Centerlines writer**
>>>   Output arguments:**
>>>    -id Id (str,1); default=0: script id**
>>>    -handle Self (self,1): handle to self**
>>>    -o Centerlines (vtkPolyData,1): the output centerlines**
>>>    -curvaturearray CurvatureArrayName (str,1); default=Curvature: name**
>>>      of the array where curvature values are stored**
>>>    -torsionarray TorsionArrayName (str,1); default=Torsion: name of**
>>>      the array where torsion values are stored.*
>>>
>>> And when I try running the basic command with only -ifile and -ofile, I
>>> get an empty .tec file. I dont know if it has anything to do with running
>>> VMTK on windows. I am able to run vmtkcenterlineattributes
>>> successfully. Please let me know if anyone else has had the same problem
>>> and how you tried to fix it.
>>>
>>> Thanks,
>>> Manasi
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> vmtk-users mailing list
>>> vmtk-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/vmtk-users
>>>
>>>
>>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
vmtk-users mailing list
vmtk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vmtk-users

Reply via email to