4D reconstruction left ventrcle from cineMRI

Good evening,
I am trying to reconstruct a 4D view of a ventricle given some medicals cineMRI.
The files are in a DICOM format.
I have 14 different slices each one containing 30 frames but they are separated in 14 different groups (1 for each slice).
My idea is to perform a segmentation for each time frame, but in order to do that, I need images to be grouped in space for each time instance. By the way, the files are grouped in time for each space location.
Moreover, in a previous discussion, the different slices of a cineMRI were grouped all together in a unique file, while in my case they are not. Is it possible to group them? If so, how?

About the 4D reconstruction, I don’t know if there are more efficient method to perform the desired task. I am open to any suggestion.
Thank you in advance for your time

You could look at the logic of the loader and see how that maps to your data. You can right-click in the dicom browser to look at the dicom headers for your data to see what tags are changing.

Thank you very much for your help.
There is a way to change how they are stored (I was thinking to take from each of the 14 slices the frame at the same time and collect them together in order to be able then, to do a reconstruction in space for each time instant)

There are many ways that dicom files may be organized so the slices form volumes and timepoints. If your data doesn’t match the current heuristics you may need to either write a pydicom script like the dicom patcher module to set the headers according to the current heuristic or maybe tweak the sequence loader to recognize your data.