I want to merge sub-MRI images of a patient to one bigger file.
I noticed that neither MITK nor ITK-Snap are suitable to merge images.
C3d also fails because the sub-images have different sizes.
Is it possible to merge MRI images anyhow?
It takes a couple of steps but it is certainly possible.
First you need to create an image that is large enough to contain the merged image. To achieve this, create a large enough ROI that contains all the images and use Crop Volume module grow the first image to the size of this ROI (you need to enable Interpolated cropping to allow an image to grow beyond its original size).
You can merge these images by simply adding them using Add scalar volumes module. If the images overlap then you can blank out overlapping region in one of the image using Segment Editor module's Mask Volume effect (available in SegmentEditorExtraEffects extension).
Most likely you’ll see seams at the boundary of the two image. You can reduce that by image registration (if there is enough image overlap; using SlicerElastix extension), but for a seamless image you need to blending with gradually changing weight (alpha channel). To get this seamless image, create a binary mask by thresholding (Threshold scalar volume module) then smooth it (Gaussian blur image filter). You can then write a few-line Python script that appends alpha channel to your scalar volume and blends the images (using vtkImageBlend and (using vtkImageAppend filter). It may sound complicated but all these steps can all be done fully automatically by a few ten lines of Python script.
I haven’t used slicer 3D before, because I used MITK. I was just reading that slicer may have the possibility to do so. However, I am not sure where to define ROIs in 4.8. Using google sends me to a version 3 documentation.
Hi Lassoan,
I have merged the two volumes with Crop Volume-SegmentEditor-Add scalar Volumes modules with your advice. After the two volumes of the same patient were combined together, the result had different HU in bone or brain tissue.
What the problem about this? Is there any error in the steps?
Thanks!
Hi Lassoan,
The scalar range of one volume is -1024~1947 and the other is -1024~3071. Before combination, the Window/Level of them were all set to CT-brain in Volume module. But the superior part and the inferior part were shown in different intensity(superior in CT- brain, inferior in CT-bone).
Thanks,
Dr.Xie
Hi Lassoan,
I have solved the issue with Crop Volumes and Add Scalar Volumes module. Maybe the problem about the different intensity is the improper size of the ROI.
Thanks,
Dr.Xie
Just in case somebody comes across this topic now: @mikebind recently contributed the Stitch Volumes module for stitching multiple volumes into one. It is available in Sandbox extension.