> A) is there a way to coregister the datasets using a weighting volume?
There is no easy way of doing this.
I suspect that it's probably finding a local optimum. Try manually
repositioning one of the images so that they are almost in register before
you begin (tending towards moving the image so that it is less likely to find
that particular optimum).
>
> B) if not, how can I make spm_coreg ignore the data outside the ROI
> properly?
Try tweaking the joint histogram so that H(:,1)=0 and H(1,:)=0;
>
> C) is the gaussian output of spm_hist2 a bug or feature (caused by, for
> instance, the interpolation step in there) or is the joint distribution of
> two noise datasets supposed to be gaussian after all?
This is the central limit theorem in action. To avoid periodic patterns in
the mutual information (that occur if you translate one image by a series of
subvoxel amounts), the sampling of points is dithered slightly so that
instead of sampling at the voxel centres, it samples at pseudo-random points
between the voxel ventres. This uses trilinear interpolation, which is a
weighted average of the 8 neighbouring values. This averaging causes the
more Gaussian distribution you see in the histogram.
x = 255*rand(50,50,50);
subplot(2,1,1); hist(x(:),50);
x = spm_conv(x,1.5);
subplot(2,1,2);hist(x(:),50);
Best regards,
-John
On Wednesday 30 August 2006 16:37, Peter Koopmans wrote:
> Dear list members,
>
> I'd like to coregister two high resolution (0.75 mm cubed) MRI brain
> datasets of different modalities to one another using spm5. However, the
> coregistration keeps matching the non-brain material (fat rim of the skull)
> instead of the brain. Therefore I'd like to use a weighting volume as in
> the realignment approach. Because I couldn't figure out where and how to do
> this, I decided to try to coregister after masking the images. (These masks
> I would create by performing skull stripping on each set, so keep in mind
> that they're likely to differ a bit.)
>
> I'm affraid however that the spm_coreg (normalized mutual information)
> routine tries to fit the masks instead of the DATA within the masks. A test
> using a simple test volume seems to show that the routine indeed suffers
> from the amount of zeros outside the ROIs of both images. (I think because
> the zeros have of course a lot in common, (a large peak in the lower corner
> of the joint histogram), forcing the masks on top of eachother with such
> strength that the information within the masks simply cannot overcome.)
>
> So I thought I could remove the influence of the data outside the mask in
> the joint histogram, by replacing the zeros in the data by noise, uniformly
> distributed over the dataset's entire intensity range. Instead of the data
> outside the mask showing up as a peak in the joint histogram I expect it to
> be uniformly distributed over the entire histogram now. This is sadly not
> the case:
>
> If you make a joint histogram of two uniformly distributed noise datasets,
> the histogram looks like a 2D gaussian. I did not expect this at all. Is
> this an error/feature of spm_hist2 or was I expecting totally the wrong
> output in the first place and should it be gaussian after all?
>
> %%% example, this will show a 2D gaussian distribution:
> x = uint8(255*rand(50,50,50));
> y = uint8(255*rand(50,50,50));
> h = spm_hist2(x,y,eye(4),[1 1 1]);
> figure;imagesc(h);
> %%%
>
> To summarize:
> A) is there a way to coregister the datasets using a weighting volume?
>
> B) if not, how can I make spm_coreg ignore the data outside the ROI
> properly?
>
> C) is the gaussian output of spm_hist2 a bug or feature (caused by, for
> instance, the interpolation step in there) or is the joint distribution of
> two noise datasets supposed to be gaussian after all?
>
>
> Thanks for any help in solving this,
>
>
> Regards,
>
> Peter Koopmans
> Phd student MR
> FC Donders Centre for Cognitive Neuroimaging
> Nijmegen, The Netherlands
|