Pleae resmaple your mask or ROI definition file first!

Submitted by YAN Chao-Gan on
Hi, Cleofé Peña Gómez!
     1. You need to resample your mask or ROI file to the dimension of your functional images.
          There were three ways: (1) use SONG Xiao-Wei's program, from http://restfmri.net/forum/node/78                              
                                                 (2) use my program, from http://restfmri.net/forum/node/81   (the third one)
                                                 (3) use SPM5:
                                                                       a. Click "Coregister"
                                                                       b. Click "New "Coreg: Reslice""
                                                                       c. "Image Defining Space": choose one of your functional image. e.g. your normalized functional image or image after Detrend and Filter.
                                                                       d. "Images to Reslice": choose the mask file or ROI definition file. e.g. BrainMask_05_61x73x61.img
                                                                       e. "Reslice Options" -> "Interpolation": choose "Nearest neighbour"
                                                                       f. Just click "Run". Then you will get the resmapled mask or ROI file with a surfix of "r".
      

      2. This warning does not matter. By the way, The latest release is  REST V1.3 Reslese 090422, please download it from restfmri.net. And you can post your further questions there.
       Best wishes!
                                                                                YAN Chao-Gan

2009/5/18 Cleofé Peña Gómez <cleofe.p.g@hotmail.com>
- Hide quoted text -

 
 
Hi Chaogan,
 
Im triying to perfom a functional conectivity analysis. But I have a problem with mask brain. It always show me the same error message:
 
 

 ROI time course retrieving through "F:\IMATGES\RESTINGS\CLEO\DLPFC.img".
Exception occured. ()
 Error using ==> rest_loadmask

 Mask does not match.
 Mask size is 181x217x181, not same with required size 53x63x46
 61#line,  rest_loadmask, in "C:\Users\Cleofé\Desktop\spm5\toolbox\REST2007V1.2_090101\rest_loadmask.m"
 138#line,  fc, in "C:\Users\Cleofé\Desktop\spm5\toolbox\REST2007V1.2_090101\fc.m"
 1323#line,  btnComputeFC_Callback, in "C:\Users\Cleofé\Desktop\spm5\toolbox\REST2007V1.2_090101\fc_gui.m"
 75#line,  gui_mainfcn, in "C:\Program Files\MATLAB\R2006a\toolbox\matlab\uitools\gui_mainfcn.m"
 35#line,  fc_gui, in "C:\Users\Cleofé\Desktop\spm5\toolbox\REST2007V1.2_090101\fc_gui.m"

 
 
I've tried the option default mask, user defined mask (chosing a mask of the requiered size), even No mask. In any case there is always the same problem!!!! However, I performed correctly  Reho and AlFF analysis.
 
And, before this error message in command window  appers this warnings:
 
 
Warning: Conversion rounded non-integer floating point value to nearest uint16 value.
> In rest_to4d at 44
  In fc at 29
  In fc_gui>btnComputeFC_Callback at 1323
  In gui_mainfcn at 75
  In fc_gui at 35
Warning: Out of range value converted to intmin('uint16') or intmax('uint16').
> In rest_to4d at 44
  In fc at 29
  In fc_gui>btnComputeFC_Callback at 1323
  In gui_mainfcn at 75
  In fc_gui at 35

 
Thank you in advance for your help. Any suggestion will be really appreciate.

 
Cleofé Peña Gómez

hi yan,

i have detrended filtered images in a subject directory within the FunImgNormalizedDetrendedFiltered directory, and am trying to run ReHo from the DPARSF GUI. i have followed your multimedia tutorial for creating the resliced mask from the default mask (image dim 61x73x61, voxel dim: 3x3x3).  the resliced mask matches that of my normalized detrended filtered images, and has the following dimensions (image dim:91x109x91 voxeldim:2x2x2).  in spite of this, i am getting the error about mask size  (copied below).

i realised that the resampled mask has a data type uint8, while the EPI images have data type 32 bit float. i was wondering if this is responsible for the observed differences?

interestingly, i tried to run ReHo from the REST GUI as well, and was coming up with the same error about masks. if i chose the no mask option, then the ReHo ran fine - but the images that it produced were very strange, with blobs all across the bounding box, and not just within the brain (as expected). a broader question is whether you recommend the REST or the DPARSF GUI for ReHo calculations, or are they using the same programs?

i would * really * appreciate your help!
many thanks,
bhisma

p.s. i am running Matlab 2009a on a Fedora Core 10 Linux 64 bit Intel machine

     Read these 3D EPI functional images.    wait...
     Read 3D EPI functional images: "/shared/ExptData/AIMSrsfMRI/mike_preprocessed/FunImgNormalizedDetrendedFiltered/22001".............................................................................................................................
??? Error using ==> rest_loadmask at 37
There are no appropriate default mask file:
    Volume size=79*95*69 ,Voxel size=2*2*2;
    Volume size=53*63*46, Voxel size=3*3*3;
    Volume size=91*109*91, Voxel size=2*2*2;
    Volume size=61*73*61, Voxel size=3*3*3;
 Please set bMask = 0.

Error in ==> reho at 63
mask=rest_loadmask(nDim1, nDim2, nDim3, AMaskFilename);

Error in ==> DPARSF_run at 511
        reho(         [AutoDataProcessParameter.DataProcessDir,filesep,FunImgDir,filesep,AutoDataProcessParameter.SubjectID{i}], ...

Error in ==> DPARSF>pushbuttonRun_Callback at 806
    [Error]=DPARSF_run(handles.Cfg);

Error in ==> gui_mainfcn at 96
        feval(varargin{:});

Error in ==> DPARSF at 31
    gui_mainfcn(gui_State, varargin{:});
 
??? Error while evaluating uicontrol Callback

Hi!
If you have resampled your mask file, please click the radio box "user's defined mask", and choose your resampled mask (also refer to the multimedia tutorial). If you still click the "default mask" button, you will meet that error.
Since your linux is 64 bit, you may need to recompile some files as I answered in another topic.
DPARSF and REST run the same ReHo program.
Best wishes!

bhisma

Wed, 08/26/2009 - 20:06

In reply to by YAN Chao-Gan

 hi yan,

the 64 bit version runs fine on my fedora core 10 machine, but even after using the resampled mask (done according to your tutorial), i can't get the ReHo analysis to run all the way through. here is the error i am getting.

i have checked that the dimensions of the mask file that i am specifying in the GUI and the images in my FunImgNormalizedDetrendedFiltered directory have the same dimensions (91x109x91), though the data type is different in the mask file and the processed EPI file (one is a 8 bit and another is a 32 bit float).

would be grateful for any help!

bhisma

  Read these 3D EPI functional images. wait...
  Read 3D EPI functional images: "/shared/ExptData/AIMSrsfMRI/FunImgNormalizedDetrendedFiltered/22001".............................................................................................................................
??? Error using ==> rest_loadmask at 37
There are no appropriate default mask file:
 Volume size=79*95*69 ,Voxel size=2*2*2;
 Volume size=53*63*46, Voxel size=3*3*3;
 Volume size=91*109*91, Voxel size=2*2*2;
 Volume size=61*73*61, Voxel size=3*3*3;
 Please set bMask = 0.

Error in ==> reho at 63
mask=rest_loadmask(nDim1, nDim2, nDim3, AMaskFilename);

Error in ==> DPARSF_run at 511
  reho(
  [AutoDataProcessParameter.DataProcessDir,filesep,FunImgDir,filesep,AutoDataProcessParameter.SubjectID{i}],
  ...

Error in ==> DPARSF>pushbuttonRun_Callback at 806
  [Error]=DPARSF_run(handles.Cfg);

Error in ==> gui_mainfcn at 96
  feval(varargin{:});

Error in ==> DPARSF at 31
  gui_mainfcn(gui_State, varargin{:});
 
??? Error while evaluating uicontrol Callback


Hi!
The info in the command window seems like you did not specify your own resampled mask but use the default mask.
But you said you have specified it, it's very strange. Could you paste some picture of the parameters here?
Best wishes!
Forums