4D volume sequences cropping

I have been working on 4D volume sequences (.nrrd format) on 3D slicer. I use segmentation editor to crop some parts where after I crop some parts I wanted to save it as another new volume. But after saving this I couldn’t open it as a 4D volume. It shows as a 3D volume without any 4D supports.

Segment editor can be used to create and edit segments. How did you use it to crop something? Do you mean you masked out certain region of an image volume?

Would you like to mask out a certain region in all frames of a volume sequence (4D volume) and save the result as a volume sequence?

Yes, I masked out certain region of volume sequence.I might be wrong. What I need to do eliminate some area from my 4D volume and save the results as 4D volume (volume sequence )

You need to create a new 4D volume sequence and go through your 4D volume and apply cropping to each frame:

Create a new 4D volume:

  • In Segment Editor module, apply masking to the current frame of your volume (it’ll create a volume such as “CTP-cardio masked”)
  • Go to “Sequence Browser” module, in Synchronized nodes section, click “+” icon => this creates a new sequence (while “Create new sequence” is selected on the left) and a new row appears in the table below
  • In that new row, set the “Proxy node” to the masked volume (e.g., “CTP-cardio masked”) to associate the 3D volume with the 4D sequence, and check “Save changes” checkbox to automatically save modifications (when you mask the volume, the result will be saved in the sequence)

image

Apply masking to each frame:

  • Go to Segment Editor module
  • Click on Mask volume effect
  • Click Apply
  • Go to next frame by hitting Ctrl + Shift + Right-arrow key
  • Click Apply
  • … repeat the last 2 steps until you reach the end of your sequence

I know that the last two steps may be tedious (especially if you have hundreds of frames), but it can be automated using Python scripting. Let me know if you need this and I can describe how to do that.