How to register multi-DICOM images between CBCT and CT?
4 views (last 30 days)
Show older comments
Hello,
I try to do preprocessing in step DICOM image registration between CBCT and CT before training synthetic CT model.
My file source are C:\Users\Desktop\CBCT and C:\Users\Desktop\CT
% My dicom CBCT image; a total of 20 images, starting with 66 and ending at 85.
A1= dicomread('CT.620013316.Image 67');
A2= dicomread('CT.620013316.Image 68');
A3= dicomread('CT.620013316.Image 69');
A4= dicomread('CT.620013316.Image 70');
A5= dicomread('CT.620013316.Image 71');
A6= dicomread('CT.620013316.Image 72');
A7= dicomread('CT.620013316.Image 73');
...
% My dicom CBCT image; a total of 20 images, starting with 53 and ending at 72.
B1 = dicomread('CT.620013316.Image 54');
B2 = dicomread('CT.620013316.Image 55');
B3 = dicomread('CT.620013316.Image 56');
B4 = dicomread('CT.620013316.Image 57');
B5 = dicomread('CT.620013316.Image 58');
B6 = dicomread('CT.620013316.Image 59');
B7 = dicomread('CT.620013316.Image 60');
...
Then, I used the resigration estimator to register a pair of images of the first CT and CBCT, but this app does not provide the ability to register multiple images.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/941149/image.png)
This CT resigrator result.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/941154/image.png)
So, I tried to run this code, but I got a magenta-green colored image instead of a CT image that registers with CBCT.
% For one-pair image registration
optimizer.InitialRadius = 0.005;
optimizer.Epsilon = 1e-5;
optimizer.GrowthFactor = 1.01;
optimizer.MaximumIterations = 1500;
movingRegistered = imregister(B1, A1, 'affine', optimizer, metric);
fusedpair = imfuse(movingRegistered, A1);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/941159/image.png)
Would you mind demonstrating to me how to do the loop code for registering multi-dicom image pairs?
Answers (1)
aditi bagora
on 17 Jan 2024
Hello Tipaporn,
I understand that you are trying to register multiple DICOM image pairs. Since, you have 20 image pairs, you can try the following approach:
1. Read 20 CBCT images in an array (A).
2. Read 20 CT images in another array (B).
3. Initialize fusedpair array.
4. Initialize the optimizer as you mentioned.
5. Then, run a loop for 20 iterations:
a. Perform “imregister()” followed by “imfuse()” on the ith index of A and B arrays.
b. Store the ith image-pair at ith index in fusedpair array as shown below.
movingRegistered = imregister(B(i), A(i), 'affine', optimizer, metric);
fusedpair(i) = imfuse (movingRegistered, A(i));
Hope this helps!
Regards,
Aditi
0 Comments
See Also
Categories
Find more on Geometric Transformation and Image Registration 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!