# Question on using decimated model in VMTK plugin

**URL:** <https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054>\
**Category:** Support\
**Tags:** vmtk, centerlines\
**Created:** [June 16, 2020, 11:55am UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054 "2020-06-16T11:55:52Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Deepa](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepa/32/5634_2.png) [@Deepa](https://discourse.slicer.org/u/Deepa)\
**Post date:** [June 27, 2020, 7:06am UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/41 "2020-06-27T07:06:19Z")

</div>

If my understanding is right, in the network model, a segment is the vessel that lies between two junctions or a junction and a free end. So I am not sure why the curves have to be split. Could you please explain why curves have to be split and the downside of not splitting?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 27, 2020, 1:54pm UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/42 "2020-06-27T13:54:54Z")

</div>

The fact is that in network extraction result, curve segments are not split at branching points. If it is a problem for you (I would guess it is), then you need to split them. VMTK has lots of great tools, so maybe the solution is to simply apply a processing filter.

---

<div class="post-metadata">

**Author:** ![Deepa](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepa/32/5634_2.png) [@Deepa](https://discourse.slicer.org/u/Deepa)\
**Post date:** [June 27, 2020, 2:41pm UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/43 "2020-06-27T14:41:36Z")

</div>

When you say,

> [@lassoan](#):
>
> The fact is that in network extraction result, curve segments are not split at branching points

could you please let me know if you mean curves split like the following?

 ![Untitled](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/4/f4f7776296691c756855d6512e52cab1e3364b5e.png)

> [@lassoan](#):
>
> maybe the solution is to simply apply a processing filter.

Sorry for the naive question, may I know how the processing filter will be useful here?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 27, 2020, 2:54pm UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/44 "2020-06-27T14:54:31Z")

</div>

> [@Deepa](#):
>
> could you please let me know if you mean curves split like the following?

I mean what I wrote in the picture above "… curve would need to be split here.

Difference between network and branch extraction is a different story. Network can have loops, while I think branch extraction always produces a tree.

> [@Deepa](#):
>
> may I know how the processing filter will be useful here

From VMTK documentation, tutorials, source code, and mailing list.

---

<div class="post-metadata">

**Author:** ![Deepa](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepa/32/5634_2.png) [@Deepa](https://discourse.slicer.org/u/Deepa)\
**Post date:** [June 27, 2020, 3:06pm UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/45 "2020-06-27T15:06:12Z")

</div>

> [@lassoan](#):
>
> I mean what I wrote in the picture above "… curve would need to be split here.

Thanks, I think now I understand what you are pointing to. I got a little confused, sorry.  
Could you please explain a bit on how the coloring has been done?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 27, 2020, 3:31pm UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/46 "2020-06-27T15:31:53Z")

</div>

You can choose which point/cell data array to use for coloring in Models module Scalars section.

---

<div class="post-metadata">

**Author:** ![Deepa](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepa/32/5634_2.png) [@Deepa](https://discourse.slicer.org/u/Deepa)\
**Post date:** [June 27, 2020, 3:57pm UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/47 "2020-06-27T15:57:09Z")

</div>

Thanks @lassoan

In summary, from what I understand, I think the size of celldata array is not equal to the number of segments (a segment is the vessel that lies between two junctions or a junction and a free end) in the network. And this is the question that I have raised in vmtk mailing list.

For small model, I could visually check for the number of segments and size of cell array. Both were equal.

I could check the celldata array’s size for the large model but I am not sure how to get the number of segments.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 27, 2020, 7:33pm UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/48 "2020-06-27T19:33:55Z")

</div>

I’ve checked and tou are right, cells are indeed segments between branching points. So, I can add a quantification result table for them very easily.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 27, 2020, 11:53pm UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/49 "2020-06-27T23:53:03Z")

</div>

I’ve implemented curve node export and properties computation for extracted networks. It’ll be available in tomorrow’s Slicer Preview Release.

---

<div class="post-metadata">

**Author:** ![Deepa](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepa/32/5634_2.png) [@Deepa](https://discourse.slicer.org/u/Deepa)\
**Post date:** [June 28, 2020, 3:48am UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/50 "2020-06-28T03:48:58Z")

</div>

> [@lassoan](#):
>
> I’ve checked and tou are right, cells are indeed segments between branching points

Glad to know that . I hope the coloring would also work fine now using cell data.

Thanks a lot for your wonderful support.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 8, 2020, 4:43am UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/51 "2020-07-08T04:43:28Z")

</div>

A post was merged into an existing topic: [Issues running latest preview on macOS/Windows 10](https://discourse.slicer.org/t/issues-running-latest-preview-on-macos-windows-10/12424/3)

---

<div class="post-metadata">

**Author:** ![Alice](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@Alice](https://discourse.slicer.org/u/Alice)\
**Post date:** [August 20, 2020, 2:20am UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/52 "2020-08-20T02:20:06Z")

</div>

I utilized module “VMTK” to compute the centerline of lung airways, which need a long time to run.In addition,the result is not good.The airway tree is out of order and the centerlines line incorrectly.

And I installed other versions,like 4.11.0(2020-06-24) which doesn’t have the function “Centerline Compute”, 4.11.0(2020-05-14) which doesn’t have the option “Curve tree root” and can’t create the airway tree,those versions all can’t draw the tree.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/d/7d6d8b380361ecdf36a1448d5a9dca9d7c852cf0.png)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 20, 2020, 2:23am UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/53 "2020-08-20T02:23:51Z")

</div>

In recent Slicer-4.11 version we hugely improved the module and renamed to “Extract centerline” to make it more consistent with module naming conventions. It has built-in automatic decimation to make centerline extraction 10x-100x faster without impacting accuracy, can work directly with segmentation input, export curves, compute statistics, etc.

---

<div class="post-metadata">

**Author:** ![Alice](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@Alice](https://discourse.slicer.org/u/Alice)\
**Post date:** [August 20, 2020, 3:38am UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/54 "2020-08-20T03:38:13Z")

</div>

I just installed the version 4.11.0(2020-08-18),but it doesn’t have the module “centerline compute”, so how can I get the centerline?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 20, 2020, 3:38am UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/55 "2020-08-20T03:38:52Z")

</div>

In recent Slicer-4.11 version we hugely improved the module and renamed to “Extract centerline” to make it more consistent with module naming conventions.

---

<div class="post-metadata">

**Author:** ![Alice](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@Alice](https://discourse.slicer.org/u/Alice)\
**Post date:** [August 20, 2020, 7:58am UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/56 "2020-08-20T07:58:25Z")

</div>

Sorry，I am new here.I clicked the “Apply”,but it seemed that nothing has happened.I can’t find the centerline in the module “Data”,and the “Table\_1” is empty,as well as “PlotSeries\_1”.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/8/e814aa13b30289171adff30ddc78fe164cf0f9ba.jpeg)

---

<div class="post-metadata">

**Author:** ![Alice](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@Alice](https://discourse.slicer.org/u/Alice)\
**Post date:** [August 20, 2020, 8:07am UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/57 "2020-08-20T08:07:05Z")

</div>

And what confused me is that the input of the module “centerline metrics” is “centerline”,but my purpose is to compute the centerline,which is really strange.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/0/3056d7b62993ddbfeb27f32cbb7908a4e4a0f680.png)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [August 20, 2020, 8:54am UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/58 "2020-08-20T08:54:06Z")

</div>

From your screenshot is seems possible to me that you created an empty model node called Model\_1 and did the processing on that. If so, then it’s no surprise that the output is empty. Choose “Airway Label” instead.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [August 20, 2020, 9:10am UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/59 "2020-08-20T09:10:45Z")

</div>

> [@Alice](#):
>
> my purpose is to compute the centerline

Use ‘Extract centerline’ to compute a centerline.

‘Centerline metrics’ is meant to plot the diameter distribution around an existing centerline.

---

<div class="post-metadata">

**Author:** ![Alice](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@Alice](https://discourse.slicer.org/u/Alice)\
**Post date:** [August 20, 2020, 10:27am UTC](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054/60 "2020-08-20T10:27:47Z")

</div>

Thank you! I have ran the ‘Extract centerline’ following the video on Youtube.But there is nothing in the result ‘Centerline curve’ .  
Do you know why?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/8/3826cbdf2042810adf9457632265595074f668a4.png)

[Previous page](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054.md?page=2)

[Next page](https://discourse.slicer.org/t/question-on-using-decimated-model-in-vmtk-plugin/12054.md?page=4)
