Hello!
I’m back at it again trying to perform image processing on volumetric data; the output from MRI scans. My intent is to perform a 3D image subtraction to determine what has changed between the two scans. To do this, however, the two volumes need to be image registered. This is where the ImageAlign routine comes into play…
I’m back at it again trying to perform image processing on volumetric data; the output from MRI scans. My intent is to perform a 3D image subtraction to determine what has changed between the two scans. To do this, however, the two volumes need to be image registered. This is where the ImageAlign routine comes into play…
This notebook shows my attempts to make this process work. For the first case: day 0 to day 1, ImageAlign performs as expected. The problem arises for the day 0 to day 4 case, however. For some reason, ImageAlign performs a 45º rotation during its operation. Any idea as to why this is happening, and more importantly how to correct it?
Thanks for your consideration.
Thanks for your consideration.
Sample T2
Data Input
Data Input
Read the various data files…
day0Data1=Import[FileNameJoin[{"Day 0 2023 May 11","WOOD_20230511.MR.Richman_Leko.3.1.2023.05.11.13.39.55.500.52970723.dcm"}]];day1Data1=Import[FileNameJoin[{"Day 1 2023 May 12","WOOD_20230512.MR.Richman_Leko.4.1.2023.05.12.13.26.21.621.70005601.dcm"}]];day4Data1=Import[FileNameJoin[{"Day 4 2023 May 15","WOOD_20230515.MR.Richman_Leko.5.1.2023.05.15.14.09.55.291.50043957.dcm"}]];
ImageAlign on 3-D Objects
ImageAlign on 3-D Objects
T2 Sample: Day 0 - Day 1
T2 Sample: Day 0 - Day 1
Checking that ImageAlign performs as expected. Note the day 1 sample is rotated to achieve the same orientation as the day 0 sample. Initially, I expected the ImageAlign routine to handle this, but was disappointed to learn (from experience) that it was not. So, I now perform this step manually. Maybe someone can explain why this is the case?
{day0T2,ImageRotate[day1T2,{Pi,{0,1,0}}]}
Out[]=
,
Image register rotated day 1 sample to day 0.
ImageAlign[day0T2,ImageRotate[day1T2,{Pi,{0,1,0}}]]
Out[]=
ImageAlign performs as anticipated.
T2 Sample: Day 0 - Day 4
T2 Sample: Day 0 - Day 4
Now, onto the problem case…
Show the day 0 and day 4 image volumes for comparison. No rotation is required in this case.
Show the day 0 and day 4 image volumes for comparison. No rotation is required in this case.
{day0T2,day4T2}
Out[]=
,
Perform image registration: align the day 4 sample to the day 0 sample
RemoveAlphaChannel[ImageAlign[day0T2,day4T2]]
This result is incomprehensible! It appears to be rotating the day 4 image by 45º around the y-axis!
What happens if the day 0 sample is aligned to the day 4 sample?
What happens if the day 0 sample is aligned to the day 4 sample?
RemoveAlphaChannel[ImageAlign[day4T2,day0T2]]
Out[]=
The day 0 sample is rotated 45º in the opposite direction to the previous result.
I don't understand what is causing this behaviour!
I don't understand what is causing this behaviour!