# How can I extract the radius of the tubes in Paraview?

**URL:** https://discourse.paraview.org/t/how-can-i-extract-the-radius-of-the-tubes-in-paraview/5071
**Category:** ParaView Support
**Tags:** python
**Created:** [August 10, 2020, 9:59pm UTC](https://discourse.paraview.org/t/how-can-i-extract-the-radius-of-the-tubes-in-paraview/5071 "2020-08-10T21:59:37Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Xinyu\_Li](https://discourse.paraview.org/user_avatar/discourse.paraview.org/xinyu_li/32/4610_2.png) [@Xinyu\_Li](https://discourse.paraview.org/u/Xinyu_Li)
#### Post date: [August 10, 2020, 9:59pm UTC](https://discourse.paraview.org/t/how-can-i-extract-the-radius-of-the-tubes-in-paraview/5071/1 "2020-08-10T21:59:37Z")

</div>

Hi everyone,

I plotted hundreds of tubes in Paraview and select ‘vary radius by vector’. Now I want to know the relationship between the radius of the tube and the magnitude of the vector. Therefore how can I extract the radius of different part of the tube?

Thanks a lot,  
Xinyu Li

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 11, 2020, 9:03am UTC](https://discourse.paraview.org/t/how-can-i-extract-the-radius-of-the-tubes-in-paraview/5071/2 "2020-08-11T09:03:47Z")

</div>

Where is this option located, how do you access it ?

How are you plotting tubes ?

---

<div class="post-metadata">

### Author: ![aquanaut](https://discourse.paraview.org/user_avatar/discourse.paraview.org/aquanaut/32/1302_2.png) [@aquanaut](https://discourse.paraview.org/u/aquanaut)
#### Post date: [August 11, 2020, 9:50am UTC](https://discourse.paraview.org/t/how-can-i-extract-the-radius-of-the-tubes-in-paraview/5071/3 "2020-08-11T09:50:00Z")

</div>

I also have this question.How to extract point data from a circle polyline?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 11, 2020, 9:56am UTC](https://discourse.paraview.org/t/how-can-i-extract-the-radius-of-the-tubes-in-paraview/5071/4 "2020-08-11T09:56:30Z")

</div>

Unrelated question, please open your own thread.

---

<div class="post-metadata">

### Author: ![Xinyu\_Li](https://discourse.paraview.org/user_avatar/discourse.paraview.org/xinyu_li/32/4610_2.png) [@Xinyu\_Li](https://discourse.paraview.org/u/Xinyu_Li)
#### Post date: [August 11, 2020, 1:38pm UTC](https://discourse.paraview.org/t/how-can-i-extract-the-radius-of-the-tubes-in-paraview/5071/5 "2020-08-11T13:38:31Z")

</div>

Hi Mathieu,

I used the streamtracer filter first and then used tube filter. Select vary radius by vector and the final plot is like this.

 ![截屏2020-08-11下午2.29.23](https://discourse.paraview.org/uploads/default/original/2X/8/81431a8d40fdf6c4ed261473484b1f0bc8e7b680.png)

I realised that the radius of blue tubes is larger than that of red tubes and I want to quantify this relationship. All I know now is to extract the coordinate of every point of the tube by using spreadsheet.

 ![截屏2020-08-11下午2.37.04](https://discourse.paraview.org/uploads/default/original/2X/3/3b069c1ec2af47ab05779685a678e30c5eb14c2a.png)

Therefore is it possible to extract the radius of different part of the tube and do that for every single tube?

Thanks a lot,  
Xinyu Li

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 11, 2020, 1:43pm UTC](https://discourse.paraview.org/t/how-can-i-extract-the-radius-of-the-tubes-in-paraview/5071/6 "2020-08-11T13:43:14Z")

</div>

Well, this information is already present in your data, in the vector you are choosing to vary radius with, so I’m unsure about your question.

---

<div class="post-metadata">

### Author: ![Xinyu\_Li](https://discourse.paraview.org/user_avatar/discourse.paraview.org/xinyu_li/32/4610_2.png) [@Xinyu\_Li](https://discourse.paraview.org/u/Xinyu_Li)
#### Post date: [August 11, 2020, 2:35pm UTC](https://discourse.paraview.org/t/how-can-i-extract-the-radius-of-the-tubes-in-paraview/5071/7 "2020-08-11T14:35:12Z")

</div>

Hi Mathieu,

The data is the coordinate of the point and the magnitude of the vector. What I want to proof now is that the square of the radius(the cross sectional area of the tube) is inversely proportional to the magnitude of the vector. As the magnitude of the vector varies along the tube, I want to the the exact radius of the tube.

Cheers,  
Xinyu

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 11, 2020, 2:38pm UTC](https://discourse.paraview.org/t/how-can-i-extract-the-radius-of-the-tubes-in-paraview/5071/8 "2020-08-11T14:38:18Z")

</div>

Here is the code computing the radius :  
[https://gitlab.kitware.com/vtk/vtk/-/blob/master/Filters/Core/vtkTubeFilter.cxx#L452](https://gitlab.kitware.com/vtk/vtk/-/blob/master/Filters/Core/vtkTubeFilter.cxx#L452)

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [August 11, 2020, 4:58pm UTC](https://discourse.paraview.org/t/how-can-i-extract-the-radius-of-the-tubes-in-paraview/5071/9 "2020-08-11T16:58:34Z")

</div>

I have to admit, I was really surprised that the radius of the tubes was not proportional to the magnitude of the vector. I had to dig a bit to discover that when you vary the radius by a vector, it adjust the tube to preserve mass flux, which is totally different. I think most users will have the same assumption as myself and @Xinyu_Li, so I raised [an issue for it](https://gitlab.kitware.com/paraview/paraview/-/issues/20143).

Anyway, just to wrap up the conversation, if you want the radius of the tubes to be proportional to the magnitude of the vector, it looks like you first have to use the `Calculator` filter to compute the magnitude. (For the data shown above, the `Calculator` expression would be `mag(f_59)`.) Then when the `Tube` filter is set to `Vary Radius` `By Scalar` for this value, it should do what you expect.
