Hi John.
I successfully ran dartel on several data sets I have. Thanks again
for the code below.
As I want to report findings in MNI coordinates I followed your
guidelines in dartel_guide.pdf and generated a composite of the
Dartel flow field and the sn.mat file containing the affine
transformation of the template6.nii to the apriori grey.nii and
applied it to the c1*.nii files.
The next thing I want to do is to modulate the resulting spatial
normalized files. I would preferably be able to modulate "Affine+
nonlinear" warps and "non-linear" warps only as I would like to look
at the effects of using different schemes for correcting global size
differences. How would I do this??
vh
William
P.S. My attempt to generate a jacobian determinant image based on the
y_ * image using spm2_def2det_ui failed as it could not load the 2nd
and third volume. Looking at the "y" image using fslview, I could only
see the first volume. Any idea what might be wrong?
On Feb 6, 2008, at 2:59 PM, John Ashburner wrote:
> Hi Wim,
>
>> I decided to experiment with DARTEL. At the import stage I would like
>> to re-use the segmentations I created using the VBM5 toolbox, which
>> are somewhat nicer than those created at the DARTEL import stage (see
>> attached picture, lower image is DARTEL output). The latter is partly
>> because I included a 3d T2 weighted image to automatically
>> generated a
>> brain mask in my setup. What would be the easiest way to do this?
>
> The following piece of code (along with the attached file) will
> apply the
> required rigid-body transforms to the images, creating r_*.nii files
> that
> DARTEL can work with. These should all be approximately aligned
> with each
> other. Note that the headers of these files contain two different
> affine
> transform matrices. The main one ensures that the rigidly aligned
> images
> appear to be rigidly aligned, whereas the other encodes a mapping that
> theoretically enables the images to be put back into alignment with
> the
> originals.
>
> mat = spm_select(1,'_seg_sn\.mat','Select the segmentation
> parameters');
> P=spm_select(Inf,'image','Select the nice image segments');
> odir = '.';
> bb = NaN*ones(2,3);
> vx = 1.5;
> import_for_dartel(mat,P,odir,bb,vx)
>
> It may be an idea to script it all by:
>
> mat = spm_select(Inf,'_seg_sn\.mat','Select the segmentation
> parameters');
> K=3;
> P=cell(1,K);
> for k=1:K,
> P{k}=spm_select(size(mat,1),'image','Select the nice image
> segments');
> end
> odir = '.';
> bb = NaN*ones(2,3);
> vx = 1.5;
> for i=1:size(mat,1),
> PP = '';
> for k=1:3, PP = strvcat(PP,P{k}(i,:)); end
> import_for_dartel(mat(i,:),PP,odir,bb,vx)
> end
>
>
>
>>
>> Also as I have quite ok CSF segmentions, would DARTEL benefit from
>> including them (in principle)?
>
> It could, providing they are equally nice for all subjects.
>
> All the best,
> -John
> <import_for_dartel.m>
====================================================
William Baaré Ph.D. Senior Researcher
Danish Centre for Magnetic resonance
MR-department, 340
Kettegaard AllÈ 30
Hvidovre Hospital tel: 00 45 3632 2978/2885
University of Copenhagen fax: 00 45 3647 0302
2650 Hvidovre mail: [log in to unmask]
Denmark www: www.drcmr.dk/ www.cimbi.dk
====================================================
|