Create a mask of multi-DICOM images from CBCT to CT
Show older comments
Hello all,
I want to create a DICOM image CBCT binary mask of the body region that has 20 slices and then apply it to the registered CT DICOM image that has 20 slices with all pixels outside the body region set to air (-1000HU).
I can do a single-pair CBCT-CT image, but I didn't know how to do it with multiple image pairs.
BW = createMask(cbct1);
BW = uint16(BW);
J = ct1.*BW;
figure,imagesc(J);
Could you please show how to make a DICOM image CBCT binary mask of the body region with 20 slices and then apply it to a registered CT DICOM image with 20 slices with all pixels outside the body region set to air (-1000HU)?
Answers (1)
aditi bagora
on 20 Oct 2023
0 votes
Hello Tipaporn,
Based on my understanding, you are interested in generating an image for each slice in a pair of images. You would like to apply the same operation to all 20 slices. Here are the steps you can follow to achieve this:
- Read both images using the “dicomread()” function:
CBCT = dicomread("filename");
CT = dicomread("filename");
- For each slice in the image pair:
1. Create a mask for the ith slice of the CBCT image.
2. Convert the mask into uint16 data type.
3. Apply the mask to the ith slice of the CT image and store the result.
- Display the stored image using the volshow() function.
Hope this helps!
Regards,
Aditi
Categories
Find more on DICOM Format in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!