centered transform when applying image registration

Hi,
I'm registering set of MR images (512x512x28) using imregister but it's not working well in my case because I want that the sets are registered based on the prostate (later I'll focus on prostate segmentation, so I need that they are aligned). So, I intend to use the center of the prostate in the fixed image as the rotation center and then use the vector between the fixed image center and the moving image center as the initial translation to be applied after the rotation. The issue is that I don't know how to do that by using imregister, can someone help me?
Thank you

7 Commenti

So to clarify: You know where the center of the prostate is in both images, or just the first?
just in the first
So what part isn't working? As I understand it you have the two images, you build the optimizer and then call imregister with the required inputs. Is imregister not converging? Please be as detailed as possible with code examples etc.
Matt J
Matt J il 24 Ott 2012
Modificato: Matt J il 24 Ott 2012
If you only know where the prostate is in one of the images, I don't see why it's relevant to view this as a rotation about the prostate. Your registration task would still be one of estimating a full 6 degree of freedom rigid transform. Even if you could tell IMREGISTER what to consider the center of rotation is, it still wouldn't influence the result.
sorry, maybe I didn't explain well my case. The point is that I have two set of data MR1 and MR2 with 28 slices. I need to aligne the two sets regarding to the prostate in MR1 where the center of the prostate is on: 21.0972 32.2536 -93.325.
Now I'm doing:
optimizer = registration.optimizer.RegularStepGradientDescent()
optimizer.MaximumStepLength = 6.25e-04 %because the default value was to big for stepsize
metric = registration.metric.MattesMutualInformation()
mr = imregister(MR2,MR1,'similarity',optimizer,metric,'DisplayOptimization',true);
result = MR1 - mr;
SliceBrowser(result) %for visualize the results
and then when I check the results I can see that the prostates are not aligned, I mean the 2 data sets are aligned in general but the thing that I want is that the MR2 will be aligned respect the prostate in MR1 because it's what I need for do my prostate segmentation after.
Why not do the prostate segmentation before? This will give it more weight in the optimizer.
because if I do the segmentation before the aligment how can I be sure that point number 1 (it's an example) in the prostate MR1 correspond to the same point in prostate MR2? because having the segmentation done I only have two volumes without not reference and I don't know how to assure then that the alignment is correctly.

Accedi per commentare.

 Risposta accettata

Matt J
Matt J il 24 Ott 2012
Modificato: Matt J il 24 Ott 2012
Basically, then you're saying you want the registration algorithm to give more priority to the prostate alignment than to the rest of the anatomy? The only thing I can think of is that you might try to crop MR1 and MR2 to a smaller general region of the prostate, if you know it. If the prostate anatomy dominates the images, it will obviously get a lot of priority.

2 Commenti

Exaclty Matt, this is what I pretend. Can I use imcrop for 3D images? or what is the better way for crop MR images?
Thank you very much, it's really helpful all your comments
The only way I can see to do a 3D crop is
Icrop=I(xmin:xmax,ymin:ymax,zmin:zmax)
or similar indexing schemes.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by