help > RE: Unzip Freesurfer files through BATCH.New?
Oct 15, 2022  08:10 PM | Daniel Berge - Hospital del Mar Medical Research Institute (IMIM)
RE: Unzip Freesurfer files through BATCH.New?
Hi all,
 I have been trying to import .mgz structurals and aseg files using batch script in conn21 and conn_importaseg without success. When running the script, everything seems to work, and when I look into the CONN_x.Setup.rois.files, the c1.img images are there. However, when openning through the GUI the segmentation images are gone. Any suggestions about what is going wrong are highly appreciated.

Thanks in advance.

Dani
Originally posted by Alfonso Nieto-Castanon:
Hi Stephen,

That is a good point, there is no specific batch command yet to import the white/csf masks from the freesurfer .aseg segmentation files. I will see if I can easily add that. In the meantime you could:

a) for the structural volumes you may simply point the batch.structurals field to the .mgz files directly (CONN should handle those files without an issue)
b) to have CONN import the white/csf masks from the associated .aseg files, simply run the command:

  conn_importaseg;

In practice, in your batch script, have the batch.Setup field run without the batch.Setup.Done option first to load all of the experiment info, then run the "conn_importaseg" command to fill-in the grey/white/csf ROIs info, and then continue by running the Setup step and the rest of the steps normally. For example something along the lines of:

clear batch;
batch.Setup.functionals = ...
batch.Setup.structurals = ...
...
batch.Setup.done=0;
conn_batch(batch);

conn_importaseg;

clear batch;
batch.Setup.done=1;
batch.Setup.overwrite=1;
conn_batch(batch);

Hope this helps
Alfonso
Originally posted by Stephen Bailey:
Hey all --

I have a number of subjects with processed Freesurfer files, and I would like to do a subject-space analysis on them. What is the best way for unzipping/converting MGZ to NII, and pulling out the c1_T1... etc. files? I know this can be done automatically through the GUI -- is there a way to do this via the BATCH.New functions?

Thanks!
Stephen Bailey

Threaded View

TitleAuthorDate
Stephen Bailey Aug 26, 2015
Alfonso Nieto-Castanon Aug 28, 2015
RE: Unzip Freesurfer files through BATCH.New?
Daniel Berge Oct 15, 2022