Hi Varina,
That sounds like a memory issue. I'm sure you'll see similar reports on the forums when you look for the error. Either increase your RAM or resampling to a lower resolution (e.g., 3mm).
Generally speaking, I think it's fairly common to see some slight upsampling in fMRI studies (except for those employing MVPA). For most of my own work, I personally haven't noticed much of a difference between resampling to 2mm, 3mm, or 4mm.
The outside-the-brain results could be an issue with registration and/or BET. Using FNIRT will certainly improve the registration. It's main assumption is that you have two versions of the anatomical image in the same folder: one that has been BETed (anat_brain.nii.gz) and one that has not been BETed (anat.nii.gz).
Cheers,
David
On May 2, 2012, at 7:56 AM, Wolf, Varina Louise wrote:
> When I set Melodic to resample at 2mm, I get the following error during the Higher Level Melodic step:
>
> Melodic Version 3.10
> Melodic results will be in groupmelodic.ica
> Create mask ... done
> Reading data file /mnt/hgfs/melodicdesk/NiftiPatientData/A-AVW030912EL-nifti/A-A_Rest_13sub3gr_2mmResample_MO.ica/reg_standard/filtered_func_data ... done
> Estimating data smoothness ... done
> Removing mean image ... done
> Reading data file /mnt/hgfs/melodicdesk/NiftiPatientData/A-BVW050611-nifti/A-BVW050611_Rest_300_Last_13sub3gr_2mmResample_MO.ica/reg_standard/filtered_func_data ... done
> Removing mean image ... done
> Reading data file /mnt/hgfs/melodicdesk/NiftiPatientData/A-CVW071511-nifti/A-C_Rest_13sub3gr_2mmResample_MO.ica/reg_standard/filtered_func_data ... done
> Removing mean image ...terminate called after throwing an instance of 'std::bad_alloc'
> what(): St9bad_alloc
>
> My original voxel size in my data is 3.4 x 3.4 x 4 mm, and the standard MNI 152 is 2mm^3. First, I don't know why I am getting this error (I've run this twice now), and it seems to work fine for the first few subjects then the error occurs at a different subject. Secondly, are there implications to resampling below the original resolution? Should I lower my smoothing kernel to help with this?
>
> I guess I should refer to my original goal of this line of questioning. When I overlay my statistic images over the registered standard, at first I was not able to do this. When I performed the following command to the standard, I was able to overlay, but still saw areas outside the brain, as if the standard were about 5 mm to small circumferentially (flirt -ref MNI152_T1_2mm_brain -in MNI152_T1_2mm_brain -out MNI152_T1_4mm_brain -applyisoxfm 4). So I looked back at my original registration results and see that the linear registration with full search from functional to standard leaves a layer just outside the nice red line of the standard on some of the subjects in some of the areas. I wondered if this might be the cause of the statistic image problem described above and if it would be improved with nonlinear registration to the standard. But, when I select the Warp/Nonlinear option, Melodic tells me something about the need for the original non_brain image to be seen. I know the MNI_152_T1 and T1_brain are in the standards folder, so am not sure why it can't see this, so am not able to try this out.
>
> What do you recommend?
>
> Thanks for your kind attention to this matter, as I have spent now several days trying to sort this out,
> Varina
>
>
> -----Original Message-----
> From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf Of David V. Smith
> Sent: Tuesday, May 01, 2012 1:46 PM
> To: [log in to unmask]
> Subject: Re: [FSL] Group Melodic transform matrix
>
> Hi Varina,
>
> Yes -- setting the resampling to 2mm would help you avoid this step in the future. However, note that the the memory demands and processing time would also increase (maybe by a factor of 8 considering the increase in resolution).
>
> Cheers,
> David
>
>
> On May 1, 2012, at 11:20 AM, Wolf, Varina Louise wrote:
>
>> David,
>>
>> Thank you so much for the help below!
>>
>> For future reference, would resampling to 2 mm avoid having to do this step? Or what would work here to avoid this step?
>>
>> Cheers back at ya,
>> Varina
>> ________________________________________
>> From: FSL - FMRIB's Software Library [[log in to unmask]] On Behalf Of David V. Smith [[log in to unmask]]
>> Sent: Monday, April 30, 2012 9:28 PM
>> To: [log in to unmask]
>> Subject: Re: [FSL] Group Melodic transform matrix
>>
>> Ah, ok -- you probably resampled to 4mm during your group ICA. The easiest thing to do would be to overlay the results onto the bg_image.nii.gz in your *.gica folder. Alternatively, you could take the standard brain you used during registration and then downsample it to the appropriate resolution with flirt:
>> flirt -ref MNI152_T1_2mm_brain -in MNI152_T1_2mm_brain -out MNI152_T1_4mm_brain -applyisoxfm 4
>>
>> Cheers,
>> David
>>
>>
>>
>> On Apr 30, 2012, at 5:37 PM, Wolf, Varina Louise wrote:
>>
>>> Yes, fslview says "dimension is not compatible" between stat image and standard MNI152_T1_brain (the standard used in Melodic registration step). Fslinfo says stat image dim 1,2,3,4 is 45,54,45,1 - respectively. I tried and extra flirt between the stat and MNI image, but this did not work, and the stat image looks like it is from a bigger head on top of the standard. Strangely, the IC_stat images from Melodic and registration look perfect to me, no junk outside brain.
>>>
>>> Help!
>>> -Varina
>>>
>>> -----Original Message-----
>>> From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf Of David V. Smith
>>> Sent: Monday, April 30, 2012 3:59 PM
>>> To: [log in to unmask]
>>> Subject: Re: [FSL] Group Melodic transform matrix
>>>
>>> Hi Varina,
>>>
>>> The dr_stage3_ic# files are already in standard space (or whatever you chose as the reference image in the group ICA). Are you getting an error when you overlay those stat maps onto the MNI image?
>>>
>>> Cheers,
>>> David
>>>
>>>
>>>
>>>
>>> On Apr 30, 2012, at 4:49 PM, Varina Wolf wrote:
>>>
>>>> Hello Experts,
>>>>
>>>> In order to overlay the stat images (after Concat ICA, dual regression with randomise) onto an MNI image, I think that I need to transform the stat matrix such that it has the same dimensions as the standard.
>>>>
>>>> I am familar with the single subject transform matrix example_func2standard.mat, but not sure where to find the transform matrix for this group data.
>>>>
>>>> I believe then the next step would be:
>>>>
>>>> flirt -in dr_stage3_ic#_tfce_corrp_tstat1.nii -ref MNI_2mm_brain.nii -out stattostandard -init TRANSFORMMATRIX -applyxfm
>>>>
>>>> Thanks for your teaching,
>>>> Varina
|