# How to change the radius of the label (.tre file) in TubeTK

**URL:** https://discourse.itk.org/t/how-to-change-the-radius-of-the-label-tre-file-in-tubetk/4590
**Category:** Beginner Questions
**Tags:** itk, python
**Created:** [November 17, 2021, 3:14pm UTC](https://discourse.itk.org/t/how-to-change-the-radius-of-the-label-tre-file-in-tubetk/4590 "2021-11-17T15:14:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![noteless](https://discourse.itk.org/letter_avatar_proxy/v4/letter/n/5fc32e/32.png) [@noteless](https://discourse.itk.org/u/noteless)
#### Post date: [November 17, 2021, 3:14pm UTC](https://discourse.itk.org/t/how-to-change-the-radius-of-the-label-tre-file-in-tubetk/4590/1 "2021-11-17T15:14:59Z")

</div>

Using the TubeTK example: ‘Demo-ConvertTubesToImage.ipynb’ and the dataset of ‘100 Healthy Normal MRIs and MRAs from UNC’’ ([https://data.kitware.com/#collection/591086ee8d777f16d01e0724/folder/58a372e38d777f0721a64dc6](https://data.kitware.com/#collection/591086ee8d777f16d01e0724/folder/58a372e38d777f0721a64dc6)). I’ve trained a model and built a baseline in Python. But now, I want to double the radius of labels (in term of .tre files) as the extended label, how to realise that in Python? what i know is that there is the function .SetUseRadius()

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [November 17, 2021, 3:19pm UTC](https://discourse.itk.org/t/how-to-change-the-radius-of-the-label-tre-file-in-tubetk/4590/2 "2021-11-17T15:19:02Z")

</div>

@Stephen_Aylward should be able to answer that.

---

<div class="post-metadata">

### Author: ![Stephen\_Aylward](https://discourse.itk.org/user_avatar/discourse.itk.org/stephen_aylward/32/654_2.png) [@Stephen\_Aylward](https://discourse.itk.org/u/Stephen_Aylward)
#### Post date: [November 17, 2021, 7:19pm UTC](https://discourse.itk.org/t/how-to-change-the-radius-of-the-label-tre-file-in-tubetk/4590/3 "2021-11-17T19:19:43Z")

</div>

I just committed made a pull request for a demo that does exactly what you requested (I hope 🙂). It reads a .tre file, shows how to convert base spatial objects to their specialized type (e.g., to tubes) so that their specialized member functions (e.g., Get/SetRadiusInObjectSpace()) can be called. This demo doubles the radius of tubes in a .tre file.

> <https://github.com/InsightSoftwareConsortium/ITKTubeTK/pull/91>
>
> Shows how to convert base spatial objects to specialized type (e.g., tubes) so t…hat you can then access their member functions.
> 
> This demo show how to double the radius of tubes in a .tre file and then save the results to a new file.

---

<div class="post-metadata">

### Author: ![noteless](https://discourse.itk.org/letter_avatar_proxy/v4/letter/n/5fc32e/32.png) [@noteless](https://discourse.itk.org/u/noteless)
#### Post date: [November 17, 2021, 8:27pm UTC](https://discourse.itk.org/t/how-to-change-the-radius-of-the-label-tre-file-in-tubetk/4590/4 "2021-11-17T20:27:51Z")

</div>

Thanks!!! The demo perfectly solved my problem. 😃
