Hello, is there a way to easily download frames separately when using MultiVolume? I am using retrospectively gated CTs with about 20 frames (one at each 5% of the cardiac cycle). I would like to download as 20 separate files, each representing some % of the cardiac cycle… is there a way to do this?
One workaround I have used is to load the multivolume as a Sequence (I’m not sure if that’s what you’ve done or not), then clone each frame of the sequence to save separately. The process for this is:
- Right-click on the multivolume/sequence node in the “Data” module and click “Clone”. A copy of this volume will appear below. Then right click on that new cloned volume and click “Export to file…” and save in your desired format
- Advance to the next frame using the sequence browser’s “next frame” button and then repeat Step 1.
At the end of this process you would have the 20 separate volumes in your scene (21 if you count the original sequence). If you don’t see the Sequence Browser, you can show it in the toolbar by checking the following box:
It could be nicer to avoid splitting up a 4D volume sequence into separate 3D volume files, because you would lose some context and metadata, such as order and timestamp of each volume. You may find that you don’t need to split up the volume sequence into separate files:
- You can easily access the voxels of each volume as a numpy array in Slicer’s Python environment.
- You can iterate through the sequence, the volumes one by one - as it is done in Sequence Registration and Crop Volume Sequence modules.
- If you need to process the volume sequence outside Slicer’s Python environment, then you can save the volume sequence as a 4D nrrd file and load it in any Python environment using pynrrd.