Display vectors (arrows) to represent a velocity field on a section plane using python

Operating system: Windows
Slicer version: 5.0.2
Expected behavior: Display of a set of vectors
Actual behavior: None

Hello,
I would be interested in showing vectors reporting the velocity on a cutting plane of a blood vessel. In particular, let’s suppose I have 100 points p=[p_1,…p_i,…,p_100] and on each point a vector v_i=[v_i_x,v_i_y,v_i_z]. How can I display those vectors in Slicer?

Thank you.

Leonardo

You need to use an arrow filter and a glyph filter

Hope it helps

Hello Mauro,
thanks for your answer.
How to define the orientation of the arrows? That’s not clear to me.

Leonardo

I think some of the available glyph filters let’s ypu do that. Please check on the vtk code class brief

You can visualize vector fields using the Transforms module. The visualization feature is mostly used for transforms, but you can use it for visualization of any kind of vector fields.

No programming is needed. You can load your vector field from a .nrrd file as a transform by choosing “Description” → “Transform” when you add the data file for loading.

1 Like