Not able to obtain centerline

208 views
Skip to first unread message

Verónica García Vázquez

unread,
Apr 11, 2020, 9:22:28 AM4/11/20
to vmtk-users
Hi everyone,

Just starting with VMTK. I am trying to obtain the centerline of an easy 3D model but I cannot. I have checked that the 3D model has no mesh defects. When I run

vmtkcenterlines -ifile Vessel.vtp -ofile Vessel_centerlines.vtp

placing one target point at one end or at both ends of the vessel I do not obtain any centerline. What am I doing wrong?

Thank you so much!

Veronica
Vessel.vtp
Message has been deleted

Ramtin Gharleghi

unread,
Apr 11, 2020, 10:52:22 AM4/11/20
to vmtk-users
I'm not sure what would be gong wrong, it seems to work fine when I tried using the same command (center line file attached).
What version of VMTK are you using? You can try subdividing the surface with vmtksurfacesubdivision to be sure - sometimes the surface resolution isn't quite enough.
Vessel_centerlines.vtp

Verónica García Vázquez

unread,
Apr 12, 2020, 8:20:47 AM4/12/20
to vmtk-...@googlegroups.com
Thank you so much Ramtin. 

I installed the executable installer for Windows 7/8/10 with Python 3.6 (http://www.vmtk.org/download/). 

I have removed one part of the surface but nothing.  What it is weird is that you can obtain the centerline with the same vtp file and in my case not. Maybe the problem is the version...

Below you can see where I place the target point (just one).

image.png

The log file...

image.png

And the vtp that I have obtained attached.

Do you have any other suggestion?

Thanks a lot,

Veronica

Libre de virus. www.avast.com

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/vmtk-users/e1f6e6cf-699e-4acf-a83b-69358285ba7f%40googlegroups.com.
Vessel_centerlines.vtp

Verónica García Vázquez

unread,
Apr 12, 2020, 8:22:57 AM4/12/20
to vmtk-...@googlegroups.com
The installer is VMTK-1.4.0-Python3.6-Windows-x86_64.exe so I think that the version of VMTK is 1.4.0

Libre de virus. www.avast.com

Ramtin Gharleghi

unread,
Apr 12, 2020, 9:15:59 AM4/12/20
to vmtk-users
Okay, so we're both using 1.4.0 on windows, the only difference I can think of is that I'm running it using the windows command line rather than PypePad. Can you try running it from the command line and see if there's any difference?
To unsubscribe from this group and stop receiving emails from it, send an email to vmtk-...@googlegroups.com.

Verónica García Vázquez

unread,
Apr 12, 2020, 12:32:18 PM4/12/20
to vmtk-...@googlegroups.com
Hi Ramtin,

I have also tried using the windows command line (see below) but nothing, the same Vessel_centerlines.vtp with no centerline. I have also tried using another computer but nothing.

Could you send me a screenshot to see where you place the target or targets? Just in case I am doing wrong. Please, could you also try with this new 3D model (see attachment)?

Thanks a million for your help!

Best,

Veronica

image.png



Libre de virus. www.avast.com

To unsubscribe from this group and stop receiving emails from it, send an email to vmtk-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vmtk-users/a13137e9-15d5-4c5c-9626-11ac4872c72b%40googlegroups.com.
Vessel2.vtp

Verónica García Vázquez

unread,
Apr 12, 2020, 3:28:34 PM4/12/20
to vmtk-...@googlegroups.com
Hi Ramtin,

I found what I was doing wrong, it was the way of placing the targets. I placed one target at one side with SPACE and then 'q'. This target disappeared, so I placed another target close to that previous target with SPACE, and after that I pressed 'q' (I thought that one target was enough).  Now what I do is when the first target disappears, I go to the other side of the vessel and I place another target and now I have the centerline (see below).

image.png

Thanks a lot for your support!

Best,

Veronica

Libre de virus. www.avast.com

Andras Lasso

unread,
Apr 12, 2020, 5:42:24 PM4/12/20
to vmtk-...@googlegroups.com
Note that you can also use VMTK directly in 3D Slicer (in VMTK Slicer extension). All VMTK classes are available in the Python interactor and for Python scripts/modules. There are also 3 scripted modules: for vessel ess filtering, vessel edge detection, and centerline extraction.

Andras

From: Verónica García Vázquez
Sent: Sunday, April 12, 2020 3:28 PM
To: vmtk-...@googlegroups.com
Subject: Re: [vmtk-users] Re: Not able to obtain centerline

Verónica García Vázquez

unread,
Apr 13, 2020, 6:44:54 AM4/13/20
to vmtk-...@googlegroups.com
Thank you so much for your suggestion, Andras.

I also tried it in 3D Slicer (attached 3D model of the vessel) with more or less the same positions of the two targets but I had some problems. I could see the centerline when pressing Preview (see below).

image.png

However,  the final centerline (after pressing Start) was not good (see below). CenterlineComputationModel has no points and Centerline endpoints has 1 point.

image.png

Which version of VMTK is included in 3D Slicer? Just in case, I have reinstalled Slicer using Slicer-4.11.0-2020-04-12-win-amd64.exe and also reinstalled the extension SlicerVMTK (Created April 13, 2020, Revision df945a4) but I obtained the same results (none CenterlineComputationModel and one point for Centerline endpoints).

If I run vmtkcenterlines -ifile Vessel.vtp -ofile Vessel_centerlines.vtp directly on VMTK I obtained better results. Do you know why? Is 3D Slicer doing any preprocessing of the mesh or including other parameters when calling vmtlcenterlines?

Thank you so much again, Andras.

Best regards,

Veronica

Libre de virus. www.avast.com

Vessel.vtp

Alireza Abdollahi

unread,
Jan 25, 2022, 4:56:41 AM1/25/22
to vmtk-users
I have the same problem as you had. How do you solve it?
I do the same as the structure but nothing happens.
model.vtp

Verónica García Vázquez

unread,
Jan 25, 2022, 1:02:19 PM1/25/22
to vmtk-...@googlegroups.com
Hi Alireza 

I did it with VMTK, not with 3D Slicer since it did not work in my case. Which software are you using?

Best,

Veronica

Alireza Abdollahi

unread,
Jan 25, 2022, 1:04:10 PM1/25/22
to vmtk-...@googlegroups.com

Verónica García Vázquez

unread,
Jan 25, 2022, 1:06:35 PM1/25/22
to vmtk-...@googlegroups.com
Have you done as follows?

"I found what I was doing wrong, it was the way of placing the targets. I placed one target at one side with SPACE and then 'q'. This target disappeared, so I placed another target close to that previous target with SPACE, and after that I pressed 'q' (I thought that one target was enough).  Now what I do is when the first target disappears, I go to the other side of the vessel and I place another target and now I have the centerline (see below)."

Best,

Veronica

Alireza Abdollahi

unread,
Jan 25, 2022, 1:14:17 PM1/25/22
to vmtk-...@googlegroups.com
Yes, I did,
first step: I choose the input, then press 'q'
second step: I choose different points for output, and then press 'q'.
And after that It types computing but nothing happens after that.

Verónica García Vázquez

unread,
Jan 26, 2022, 2:31:25 AM1/26/22
to vmtk-...@googlegroups.com
Hi Alireza,

Are you using the same version of VMTK that I used? In that version, if I do not remember wrong, I placed one point at one end of the vessel pressing SPACE and after that I pressed q. Then I go to the other end  to add another point pressing SPACE and after that I pressed q.

Best,

Veronica 

Alireza Abdollahi

unread,
Jan 26, 2022, 11:46:58 AM1/26/22
to vmtk-...@googlegroups.com
Hi Veronica,
I did according to the VMTK site's instructions.
At the first step, I run "vmtkcenterlines -ifile foo.vtp -ofile foo_centerlines.vtp", when I choose the points and press 'q' nothing happens. then I run the second instruction, which is shown in the figure below.
Bests,
Alireza

1.JPG
3.JPG
2.JPG

Alireza Abdollahi

unread,
Jan 26, 2022, 11:49:15 AM1/26/22
to vmtk-...@googlegroups.com
And also this figure too.

4.JPG

Verónica García Vázquez

unread,
Jan 26, 2022, 12:34:49 PM1/26/22
to vmtk-...@googlegroups.com
Hi Alireza 

Maybe you can try first with a vessel without bifurcations and placing just two points (one at each end of the vessel).

In my VMTK version I needed to press the space to place the point (I could see the point) and then q. Could you see the points with your version of VMTK? Just in case you would like to try, the installer I used was VMTK-1.4.0-Python3.6-Windows-x86_64.exe

Best,

Veronica

Alireza Abdollahi

unread,
Jan 26, 2022, 12:38:27 PM1/26/22
to vmtk-...@googlegroups.com
Hi Veronica
I have the same version as you have and did as you say. Do you have any recommendations that what can I do? 
Bests,
Alireza

--
You received this message because you are subscribed to a topic in the Google Groups "vmtk-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vmtk-users/xYSWahhrON8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vmtk-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vmtk-users/CAEuVChPr6qdfydNc-5F0ODUjs5cKPU8%2B6oaBfi0q0mbppAC_9g%40mail.gmail.com.

Verónica García Vázquez

unread,
Jan 26, 2022, 12:55:15 PM1/26/22
to vmtk-...@googlegroups.com
Hi Alireza,

Yes, one idea (written on my previous email) is to try with an easier vessel (for example, not having any bifurcations).

By the way, if you are using the same version I used, do you have instructions like those show on my attached figure ("please position the mouse and press space...")?

Are 1.png, 2.png and 3.png obtained with vmtksurfacereader command? Could you send me a screenshot when you run vmtkcenterlines to see the instructions you have?

Best,

Veronica



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 view this discussion on the web visit https://groups.google.com/d/msgid/vmtk-users/CAMivsmgs18LaN1Gte3ePnyHNE0u8qBtRfbQQWrN%3DV-p1YGLyBw%40mail.gmail.com.
image.png

Alireza Abdollahi

unread,
Jan 26, 2022, 1:30:33 PM1/26/22
to vmtk-...@googlegroups.com
Hi Veronica
I used your file.
figure 1: I write the code then run it.
figure 2: that page appears.
figure 3: I choose the first point by space and then press 'q'.
figure 4: I choose the second point and then press 'q'.
And then nothing happens and the vessel page disappears.
Bests,
Alireza


2.JPG
1.JPG
4.JPG
3.JPG
5.JPG

Verónica García Vázquez

unread,
Jan 26, 2022, 1:56:43 PM1/26/22
to vmtk-...@googlegroups.com
In your vessel folder on the desktop, apart from vessel.vtp, do you have another vtp file (specifically vessel_centerlines.vtp) after pressing the second q?

Alireza Abdollahi

unread,
Jan 26, 2022, 1:58:19 PM1/26/22
to vmtk-...@googlegroups.com

Verónica García Vázquez

unread,
Jan 27, 2022, 2:04:08 PM1/27/22
to vmtk-...@googlegroups.com
Hi Alireza,

Try adding the whole path to -ofile (VMTK command) on PypePad. For example:

vmtkcenterlines -ifile
C:/Users/veron/Desktop/aorta/RigidAorta_OneBranchRepaired.vtp -ofile
C:/Users/veron/Desktop/aorta/Vessel_centerlines.vtp

If you do not add the full path, I think that it saves it on Documents folder.

Repeat the same process as you did yesterday:

- choose the first point by space and then press 'q'.
- choose the second point and then press 'q'.

I hope it works now... It does in my case. If not, please send me your
vtp file and I will try it on my computer

Best,

Veronica
> To view this discussion on the web visit https://groups.google.com/d/msgid/vmtk-users/CAMivsmiNY7CRZ-mYvq0kKPKNx88NJRRp6rLKFwZTK%3D-T6qfC%3DQ%40mail.gmail.com.

Alireza Abdollahi

unread,
Jan 28, 2022, 1:09:58 PM1/28/22
to vmtk-...@googlegroups.com
Thank you so much Veronica.
By doing what you said, by using your file, the answer can be reached, but I will not get the answer in my own file. and I don't know why.
I want to cut the branches and have a part of vessel but at the first step, I stopped.
Thank you again so much Veronica
Bests
Alireza

Verónica García Vázquez

unread,
Jan 28, 2022, 1:19:33 PM1/28/22
to vmtk-...@googlegroups.com
Great that it works with the easy vessel. 

If you do not find why it is not working with the complex vessel, send me the vtp file with screenshots of where you place the points and I will try it.

Best,

Veronica


Alireza Abdollahi

unread,
Jan 28, 2022, 1:22:34 PM1/28/22
to vmtk-...@googlegroups.com
Thank you again, Veronica. I will try again about it and if it doesn't work again, I will send it to you.
Thanks.

Ali Mokhtari

unread,
Aug 3, 2023, 1:39:59 PM8/3/23
to vmtk-users
Hello
 I try to follow what is explained here, when I choose the first point and press space, then press q, when the new render window opens, it freezes and I can't do anything in it
Can you help me with that?

Best,
Ali

Andras Lasso

unread,
Aug 3, 2023, 9:33:56 PM8/3/23
to vmtk-...@googlegroups.com
I don't think there is anyone who supports or maintains these old interactive compnents. They were always very limited and inconvenient. Instead, a nice GUI is available for the most commonly needed VMTK features (vessel segmentation, centerline extraction, metrics computation, exploring of cross-sections). See https://github.com/vmtk/SlicerExtension-VMTK for some more details. 


You can also create GUI for other VMTK features quite easily (and if needed you can get help for that at the 3D Slicer forum - https://discourse.slicer.org).

Andras 




From: Ali Mokhtari
Sent: Thursday, August 3, 2023 1:39 p.m.
To: vmtk-users

Subject: Re: [vmtk-users] Re: Not able to obtain centerline
Reply all
Reply to author
Forward
0 new messages