No, I'm almost positive that was something after fnirt was applied to a brain with lots of neck  and other non-brain included.  Joelle would have to answer that, since I couldn't reproduce that image, exactly.  The original T1 has a lot of neck with a little shoulder, which is why brain extraction was difficult.

I got something like this with a bad brain extraction (after fnirt)
Inline image 1
With a better brain extraction I got this (again, fnirt)
Inline image 2


Cheers,
Jeanette

On Fri, Jun 5, 2015 at 3:45 PM, Andreas Bartsch <[log in to unmask]> wrote:
Hi,

but the screenshot did not look like any affine transformation.
Was this really flirt?
Cheers,
Andreas

Von: Jeanette Mumford <[log in to unmask]>
Antworten an: FSL - FMRIB's Software Library <[log in to unmask]>
Datum: Freitag, 5. Juni 2015 16:14
An: <[log in to unmask]>
Betreff: Re: [FSL] Registration of 4D time series to MNI standard

Just to update the list, so far the culprit was bad skull stripping, but adding the -R flag to bet improved skull stripping and then the resulting flirt registration. 

Cheers,
Jeanette

On Thu, Jun 4, 2015 at 4:04 PM, Jeanette Mumford <[log in to unmask]> wrote:
Hi Joelle,

This is the flirt output?  That's a 12DOF linear transform, so I wouldn't think the front of the brain would look like that unless it did in the original image.  Also, a skull stripped image should be used with flirt.

Off the list (email me directly), can you email me your original T1 structural (with skull) and I'll have a look.

Cheers,
Jeanette

On Thu, Jun 4, 2015 at 3:30 PM, Joelle Zimmermann <[log in to unmask]> wrote:
Hi Jeanette,

First of all, thanks for your help. That's very nice of you. Yes, I think the first flirt step (in email above) is already giving the wrong output. I am attaching a screenshot, just of the output - the highres2standard.

You can see that it is sort of leaking from the top.

I think the orientation of the T1 is correct, it looks like it's centered on the field of view. The brain.nii itself looks fine to me, but I'm no expert. 

Do you have any ideas of what to do to correct this first flirt step? I'm really new to this, I've been struggling with this whole registration process - didnt realize it was such an art! :-P

Thanks,
Joelle

On Thu, Jun 4, 2015 at 3:24 PM, Jeanette Mumford <[log in to unmask]> wrote:
Hi Joelle,

I'll start here, since if this step doesn't work the others likely won't either.  I'm unsure why they are shifted, I haven't encountered this before.  Is the orientation of your T1 correct before registration?  Is it basically centered in the field of view?  Also, is this a typical adult brain?

Cheers,
Jeanette

On Thu, Jun 4, 2015 at 3:13 AM, Joelle Zimmermann <[log in to unmask]> wrote:
Thanks very much Jeanette. That's very kind of you. I notice that after I run the flirt step:

flirt -in bet_highres -ref $FSLDIR/data/standard/MNI152_T1_2mm_brain -out highres2standard -omat highres2standard.mat -cost corratio -dof 12 -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -interp trilinear 

And I overlay the MNI152_T1_2mm_brain standard over the highres2standard output, it doesn't give me a good fit. Which I think it should. They are a bit shifted from each other. Do you have any suggestions of how to fix this?

Thanks,
Joelle




On Wed, Jun 3, 2015 at 5:36 PM, Jeanette Mumford <[log in to unmask]> wrote:
See my responses within yours below....

fslroi bold_data example_func 124 1

McFlirt:  Motion correction (skip this if you already ran it)
mcflirt -in bold_data -out bold_data_mcf -mats -plots -reffile example_func  -spline_final

is the -in bold_data the 4D functional time series?

Yes, it is.
 

Flirt: Register EPI to Subject's structural.
epi_reg --epi=example_func --t1=your_highres_with_skull --t1brain=highres_no_skull --out=example_func2highres
# This will create many files, but you only need to keep a file called example_func2highres.mat. 

Flirt/Fnirt combo:  Structural to MNI
flirt -in bet_highres -ref $FSLDIR/data/standard/MNI152_T1_2mm_brain -out highres2standard -omat highres2standard.mat -cost corratio -dof 12 -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -interp trilinear 

The -in bet_highres parameter, is that really the same as the highres_no_skull from the previous step? bet_highres is just the high res T1 with the skull removed, right?

Yes, sorry I was inconsistent, bet_highres it is the highres without skull. 

fnirt --iout=highres2standard_head --in=your_highres_with_skull --aff=highres2standard.mat --cout=highres2standard_warp --iout=highres2standard --jout=highres2highres_jac --config=T1_2_MNI152_2mm --ref=$FSLDIR/data/standard/MNI152_T1_2mm --refmask=standard_mask --warpres=10,10,10

is there a mistake or should there really be two iouts? (highres2standard_head and highres2standard). 
I grabbed this command directly from a FEAT log and it does have two --iout flags.  This flag is simply the name of the output image.  I'm unsure why it is in there twice, but presumably it will work fine.  If you run it this way, you can see if it creates 2 output files or simply uses the last name

what is the --refmask=standard_mask? I suppose it would be the MNI152_T1_2mm_brain_mask_dil.nii that is supplied by fsl?

It is $FSLDIR/data/standard/MNI152_T1_2mm_brain_mask_dil 

Hope that does the trick!  If you want you can run a "prestats only" Feat analysis via the GUI and look in the log file to see the commands that were used.  For the most part you can simply reuse them.  

Cheers,
Jeanette