There is any number of things that you could be doing wrong, so it's a
bit hard to tell. The spm_klaff routine is only for aligning tissue
probablility maps, so may not be applicable to your data. The
spm_maff8 function is probably the one you want. You need to run
spm_load_priors8 first in order to get the tissue probability maps
into a suitable form. I'd suggest checking to see how the function is
called in spm_preproc_run.m.
Best regards,
-John
On 19 July 2011 01:22, Aaryani Tipirneni <[log in to unmask]> wrote:
> Hi John,
>
> I used spm_maff8 and spm_klaff scripts for registering the 3D data sets to the atlas so that I could use mutual information as the cost function instead of least squares. But I get the output as an array of Nan in the affine transformation matrix. Please tell me if I'm doing something wrong.
>
> Thanks
> Aaryani
>
>
>
> ----- Original Message -----
> From: "Aaryani Tipirneni" <[log in to unmask]>
> To: "John Ashburner" <[log in to unmask]>
> Sent: Monday, July 18, 2011 3:49:26 PM
> Subject: Re: [SPM] Cost function used in the affine regularization
>
> Hi John,
>
> Is spm_get_closest_affine(X,Y) the function you are talking about that gives both affine and rigid body transforms? I have seen in the program (X,Y) are floats representing the coordinates, could you please tell me what it means?
>
>
> Many thanks!
> Aaryani
>
> ----- Original Message -----
> From: "John Ashburner" <[log in to unmask]>
> To: "Aaryani Tipirneni" <[log in to unmask]>
> Cc: [log in to unmask]
> Sent: Friday, July 15, 2011 4:15:33 PM
> Subject: Re: [SPM] Cost function used in the affine regularization
>
> If your aim is to obtain the closest rigid-body alignment to MNI space
> (ie affine registration with the scaling and shearing removed), then
> maybe take a look at some of the code that is part of the new segment.
> Within the function that writes various output files
> (spm_preproc_write8.m), the code that writes out "imported images"
> calls a routine for doing procrustes analysis. This step will take a
> deformation and determine the closest rigid alignment. Maybe this is
> what you want, although you'll have to do a little bit of extra
> coding.
>
> Best regards,
> -John
>
> On 14 July 2011 22:12, Aaryani Tipirneni <[log in to unmask]> wrote:
>> Hi John,
>>
>> Thank you so much! I really appreciate your detailed explanation.
>>
>> Actually, I'm working on affine registration of the MR 3D data sets to the atlas template (T1 or T2). I would like to do only rigid body registration so that there would be no scaling and shearing, but rigid body to atlas is not as robust as affine. Sometimes, it is good and sometimes it is not. I would like to use cost functions like mutual information, normalised mutual information, cross correlation as you mentioned in the affine registration instead of mean square difference. Could you please tell me how to tweak the coreg option to include affine registration.
>>
>> Also, as a last step I would like to remove the scaling and shearing from the registered data sets and adjust the other paramters accordingly (i.e translations, rotations) so that they produce the same results with unscaling and unshearing. Could you please help me if you have any suggestions on this as well.
>>
>> Thank you so much for your time and patience,
>> Aaryani
>>
>>
>>
>> ----- Original Message -----
>> From: "John Ashburner" <[log in to unmask]>
>> To: "Aaryani Tipirneni" <[log in to unmask]>
>> Cc: [log in to unmask]
>> Sent: Thursday, July 14, 2011 12:50:32 PM
>> Subject: Re: [SPM] Cost function used in the affine regularization
>>
>> Affine registration, or affine regularization? There are a few affine
>> registration options in SPM8 and a couple of different regularization
>> approaches.
>>
>> The initial affine registration under the Normalize button uses mean
>> squares difference as an objective function. This one is quite old,
>> and a bit primative, but probably still the more appropriate method
>> for aligning PET the the PET template.
>>
>> The Coreg option can be tweaked to make it do affine registration, and
>> this allows various objective functions to be used - as long as they
>> can be computed from joint intensity histograms. These include mutual
>> information, normalised mutual information and a few others.
>>
>> For the segmentation, there area couple of very slightly different
>> cost functions. The older segmentation maximises the mutual
>> information between the image and tissue probability maps (after
>> approximately excluding background). New segment does its initial
>> affine registration using essentially the same objective function as
>> the segmentation itself, except that it models intensity distributions
>> with histograms (instead of mixtures of Gaussians), and does not
>> include the bias correction part.
>>
>> There's also the affine registration for aligning population average
>> tissue probability maps to MNI space. This one minimises the KL
>> divergence between the tissue probabilities.
>>
>> As for regularisation, the main one is based on decomposing the affine
>> transform into rigid-body transform and a matrix that encodes zooms
>> and shears. The matrix logarithm of the the zooms and shears matrix
>> is penalised.
>>
>> Best regards,
>> -John
>>
>> On 13 July 2011 20:18, Aaryani Tipirneni <[log in to unmask]> wrote:
>>> Hi SPM experts,
>>>
>>> Could anyone please tell me what is the cost function used in the affine regularization in SPM? I did not find in the manual what exactly is used, I read somewhere that it uses least squares, is that true?
>>>
>>> Thanks
>>> Aaryani
>>>
>>
>
|