How to create 3 channel image from different DICOMs?

Hi, is there a way to combine different DICOMS into a single image in Slicer? I have several examinations, and I want to reproduce this AI segmentation: U-Net for brain MRI | PyTorch However, It asks for specific input images:
“Input image is a 3-channel brain MRI slice from pre-contrast, FLAIR, and post-contrast sequences, respectively.”

Is there any way to export DICOM or TIF that has different examination per channel?

You probably can, you would have to load three series (pre-contrast, FLAIR and postcontrast), then access pixel arrays from your loaded volumes, and then stack them with e.g. numpy.stack or torch.stack to get your three channels matrix. I’m not sure why you would necessarily need Slicer for this specific task, though, this is probably easier to do with some scripting using SimpleITK or Pydicom (maybe even directly in your PyTorch DataLoader).

1 Like