Fill Slice Views without Changing Image Spacing

Hi,

I am using slicer to look at nondestructive testing data where volumes are typically sampled much more sparsely in the z (axial) direction than other directions (roughly 10 to 1). Additionally, the axial dimension is usually much larger than the other dimensions (i.e. we perform very long scans of components with a very tight imaging region). The volumes we are dealing with are like if we imaged at 10 cm x 10 cm square over the length of a human body in a CT scanner. I would like to be able to fill all slice view panes effectively changing the aspect ratio of the displayed image without changing the image spacing so that the measurements and slice positions read the correct positions. Commercial softwares for this type of applications routinely display the data with aspect ratios in each slice view which are not 1:1. Is this possible in slicer either by extension or python script or the like?

Any help with this would be greatly appreciated!

Thanks,

  • Jon

You can change the field of view in a slice view, for example enlarge it by a factor of 10x along one axis:

sliceNode = getNode('vtkMRMLSliceNodeYellow')
fov = sliceNode.GetFieldOfView()
sliceNode.SetFieldOfView(fov[0], fov[1]*10.0, fov[2])

This is not officially supported, so you might run into unexpected situations - mostly that the FOV is reset when you do certain operations (that you may address by adding an observer to the slice node and set the FOV back to your preferred FOV).

1 Like

Thank you so much! Works like a charm!

1 Like

Mr. Lassoan,

I am wondering if a similar set of commands can be used to set the field of view per axis on the volume view?

Many thanks,

  • Jon

In 3D view, changing the view’s aspect ratio would not make sense (as the view’s aspect ratio is fixed in display space and the object can be rotated around). To display a deformed volume in 3D, you can apply a transform to it (Transforms module) or change its spacing (Volumes module).

Hi Andras,

I have done as you’ve suggested in the past and of course I can distort the volume by changing the spacing or applying and transform, the issue is that the rulers and cursor positions do not read their true values afterwards which is critical for our industry. The volume view is not actually required so I can get by using the tips for changing the field of view in the slice panes.

Thanks!

  • Jon

It would not be hard to add an option to markups to report measurements in the node’s coordinate system instead of the World coordinate system but yours would be the first use case. If we hear from many other users that they would need this, too, then we can add it to the plan. If you need this sooner then you can implement it yourself or contract Kitware or others to develop it for you.