Hi all,
I am wondering if I could do a modification of vtkMRMLSliceLogic::FitSliceToVolume to add a Boolean to avoid recenter and only adjust de FOV. Would it sounds good to you?
The final objective is to have it exposed in vtkMRMLSliceLogic::FitSliceToAll
Pierre
I do not plan to change the current slicer behavior, so this option would be by default activated.
Isn’t FitSliceToVolume inherently a centering action because it is attempting to fit the extent of the volume into the current slice view? Fitting both width and height to the view is like centering FOV.
Or are you just trying to select the volume as the background volume to show in the slice views?
We could also see it as an adjustment of the FOV without changing the origins of the slices.
example: part of your image is hidden because of a zoom in. Now you want to see the full image at the exact same slice offset (without changing the origins) for now it is not possible except by zooming out manually.
I’ve felt the need for this feature a few times, too (center the view but not change the slice offset). It would be nice if you could implement this extra flag in vtkMRMLSlicerLogic. An extra flag in vtkMRMLSliceLogic::Fit* methods would be suitable. The implementation is not completely trivial, as you would need to intersect the bounding box with the transformed volume node. I’m not sure how (if) I would expose this feature on the GUI.
thanks, Andreas & James, I will work on it and keep you posted.