How to write recursive script to run ‘crop volume’ (like attached screenshot) on all 3D volumes (3D volumes extracted from 4D nifti)? I have ‘UtBox.acsv’ ROI file already.
(Am I supposed to, OR, ) how to make function call ‘slicer.modules.cropvolume’ in built-in Python console to crop 3D volumes with ROI (instead of using GUI).
The documentation seems to be very limited.
You could start by looking at the SlicerCaseIterator. Once you can iterate through your volumes you could add some code to do the cropping. I agree it’s not well documented but the building blocks are there and you can see example scripts.
Thanks!
I think I should be able to figure out iteration method.
My main concern is how to call cropvolume function with input ROI being UtBox ROI file (like the screenshot).