# How to get the parameters of a segment with python?

**URL:** <https://discourse.slicer.org/t/how-to-get-the-parameters-of-a-segment-with-python/21230>\
**Category:** Development\
**Tags:** segmentation\
**Created:** [December 27, 2021, 8:58am UTC](https://discourse.slicer.org/t/how-to-get-the-parameters-of-a-segment-with-python/21230 "2021-12-27T08:58:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![YuXiaofeng](https://avatars.discourse-cdn.com/v4/letter/y/c68b51/32.png) [@YuXiaofeng](https://discourse.slicer.org/u/YuXiaofeng)\
**Post date:** [December 27, 2021, 8:58am UTC](https://discourse.slicer.org/t/how-to-get-the-parameters-of-a-segment-with-python/21230/1 "2021-12-27T08:58:46Z")

</div>

Hi everyone,  
I’m using a Slicer version 4.13.0-2021-12-01 for Ubuntu18.04.  
I want to get the Maximum slicer, length and short diameter, CT value and maximum surface area of a segment with python. But I have no idea about that.

Thank you very much for your support!

---

<div class="post-metadata">

**Author:** ![Juicy](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@Juicy](https://discourse.slicer.org/u/Juicy)\
**Post date:** [December 27, 2021, 10:32pm UTC](https://discourse.slicer.org/t/how-to-get-the-parameters-of-a-segment-with-python/21230/2 "2021-12-27T22:32:37Z")

</div>

I don’t understand exactly what you want to calculate for the segment using python but there are some examples in the [script repository](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#quantifying-segments) which may be similar to what you are trying to do.

Let me know if you need any more specific help and I may be able to figure it out
