Question about the visualization of displacement vector fields

Hi all,

I am doing image registration between two 3D CTs and have already got the dispalcement vector fields in MHA format with shape (224, 224, 96, 3), where first three dimensions represents the 3D image size.

Once I load my displacement field into Slicer, I can see a 3D color image and the vaule for each voxel is a 3-length vector representing the space shift along three directions, which also make sense. However, when I try to turn on the color legend for this image, it only gives me the grey color legend.

I tried to change the lookup table for my displacement field but it seems the lookup table doesn’t work for this vector image. No matter which table I’m using, the real visualization result would not change. I know I can use the ‘Vector to Scalar Volume’ module to covert my vector image to some scalar image, but I’m just curious how the 3D Slicer deal with the visualization of a vector image by default or how does Slicer choose a specific color for a vector with multiple scalar values.

Appreciate for any help. Thank you.


There’s no infrastructure to display scale bars for color (vector) volumes. You can explore loading the data as a Transform and use the various visualization options which are quite powerful for this application.

1 Like

Thank you for your quick reply. Loading the data as a ‘Transform’ rather than ‘Volume’ makes things reasonable!

Since it seems like Slicer can still handle the vector volume (like the wrong case I was using, loading displacement as Volume), do you have any idea about how Slicer visualize such vector image please? Using the magnitude of vector or something else?

Thanks again!

You’re welcome :+1:

Probably the transform visualization is what you want. But if you want a volume of vector magnitudes you can use the Vector To Scalar module as you mentioned earlier.

Got it. Thank you again!