Creating a sequence of Volumes and labelmap overlaid

Hello, slicers!

Firstly, I am sorry if this is a naive question.

I want to create a 3-Dimensional Time Lapse of 3D volumes with label maps overlaid at each time point.

I have tried the following:

  • I have a 4D (x,y,z,n frames) matrix that I converted into a .nrrd file. I can sucessfully load it into Slicer as a sequence and display a 3D+time movie for the n=50 frames

  • I have n=50 3D volumes which are label maps. These volumes are n individual .nrrd files (I can save them as.mhd files as wel) and I can load them into Slicer as labelmaps.
    They are named as L_frame1.nrrd … L_frame50.nrrd

  • 3D volumes and each 3D volume of my 4D matrix have same size and same spacing.
    So if V is my 4D matrix (x,y,z,time), size(V(:,:,:,t)) = size(L_framei) and same for spacing

Objectives :

  • I would like to link each frame of the sequence to the corresponding 3D labelmap matrices.

I guess, I can overlay manually each frame and each labelmap volume and record the volume rendering scene in a sequence but it will be long to do it for my 50 frames.


  • Slicer : 4.11.0
  • Computer : Windows 10

Thank you for your help

Best wishes

You can load your individual 3D volumes into the scene and add them to a sequence in Sequences module. For 50 volumes you need to click the mouse 50 times, so it should take about 30 seconds.

You can write a for loop in Python to automate this but if your are new to Slicer then probably it will take tens of minutes to implement it. You can find here examples that could help:

1 Like

Great thank you ! it works

1 Like