External Email - Use Caution        

Dear Douglas,

Thank your for your reply.
I already knew the label files, but when I saw the images on through freeview and load ROI, I could just see border of motor cortex.
I don't think that they were the masks.
So, could you help me how to get the masks from the labels?
I have had tough time because of that and couldn't process my analysis.
I think that it is better to get the masks from freesurfer pacellation, but while I have waited for your reply, I found out two method to get the masks.

My steps are as follows,

I am getting tractography between sensorimotor striatum and premotor & motor cortex.
At first, I completed 'recon-all -all' through freesurfer for brain parcellation and mask.
(SHINui-iMac:~ shinsangho$ recon-all -s NOR82_PJI -i ~/sangho/NOR82_PJI/NOR82_PJI_T1/coT1.nii –all)
I got the results(label, mri, scripts, stats, surf, tmp, touch, trash folders).
But though I tried to get the mask of premotor & motor cortex,  I couldn't get the masks.

FreeSurferColorLUT
Premotor - 9002 ctx_lh_premotor, 9502 ctx_rh_premotor
Primary motor - 9001 ctx_lh_primary motor, 9501 ctx_rh_primary motor

or,
Bordmann area : Premotor 406 BA6, primary motor 404 BA4a, 405 BA4p

The command lines are follows.
SHINui-iMac:dti_analysis_kings shinsangho$ mri_binarize --i nor82_pji/nor82_pji_fs/mri/aparc.a2009s+aseg.mgz --match 404 --o nor82_pji/nor82_pji_dlpfc/NOR82_PJI_LH_PREMOTOR.nii.gz

Even though I replaced aparc.a2009s+aseg.mgzn with any other atlases(aparc.DKTatlas+aseg.mgz, aparc+aseg.mgz...) & matching number(9001, 9002, and ..)I couldn't get the masks. The results are as follows.
--------------------------------------------
$Id: mri_binarize.c,v 1.43 2016/06/09 20:46:21 greve Exp $

cwd /Users/shinsangho/sangho/DTI_analysis_kings

cmdline mri_binarize.bin --i nor82_pji/nor82_pji_fs/mri/aparc.a2009s+aseg.mgz --match 404 --o nor82_pji/nor82_pji_dlpfc/NOR82_PJI_PREMOTOR.nii.gz 

sysname  Darwin

hostname SHINui-iMac.local

machine  x86_64

user     shinsangho


input      nor82_pji/nor82_pji_fs/mri/aparc.a2009s+aseg.mgz

frame      0

nErode3d   0

nErode2d   0

output     nor82_pji/nor82_pji_dlpfc/NOR82_PJI_PREMOTOR.nii.gz

Binarizing based on matching values

nMatch 1

 0   404

binval        1

binvalnot     0

fstart = 0, fend = 0, nframes = 1

Found 0 values in range

Counting number of voxels in first frame

Found 0 voxels in final mask

Count: 0 0.000000 16777216 0.000000

mri_binarize done

----------------------------------------

So,

I used two different methods to get masks of the premotor & motor cortex

Firstly,

I got masks of 'the GM Primary motor cortex BA4a L, GM Primary motor cortex BA4a R, GM Primary motor cortex BA4b L, GM Primary motor cortex BA4b R, GM Premotor cortex BA6 L, and GM Premotor cortex BA6 R' in Juelich Histological Atlas on atlas panel(on standard space of avg152T_bain.nii.gz)FSLeyes.

To transform masks from on standard space of avg152T_bain.nii.gz to the individual image, I tried to get the mat file.

flirt -in /usr/local/fsl/data/standard/avg152T1_brain.nii.gz -ref /Users/shinsangho/sangho/DTI_analysis_kings/NOR82_PJI/NOR82_PJI_FS/mri/brain.nii.gz -out /Users/shinsangho/sangho/DTI_analysis_kings/NOR82_PJI/st2ind -omat /Users/shinsangho/sangho/DTI_analysis_kings/NOR82_PJI/st2ind.mat -bins 256 -cost mutualinfo -searchrx -180.0 180 -searchry -180 180 -searchrz -180 180 -dof 12  -interp trilinear


(question: I used brain.nii.gz on 'mri' folder as a reference image, but the brain.nii.gz is from the results of recon-all on freesurfer space automatically(including skull ripening). Can I use the image as a reference? Otherwise, should I use original T1 image(after skull ripening 'BET' or before skull ripening using  as a reference image?)


And then,


flirt -ref nor82_pji/nor82_pji_fs/mri/brain.nii.gz -in motor_crotex/premotor_l.nii -applyxfm -init nor82_pji/st2ind.mat -out nor82_pji/nor82_pji_premotor_l.nii.gz


I got the mask of premotor on individual image space.


Secondary,

After I got the masks the same way above.
(I got the GM Primary motor cortex BA4a L, GM Primary motor cortex BA4a R, GM Primary motor cortex BA4b L, GM Primary motor cortex BA4b R, GM Premotor cortex BA6 L, and GM Premotor cortex BA6 R in Juelich Histological Atlas on atlas panel(on standard space of avg152T_bain.nii.gz)FSLeyes)

To transform masks from on standard space of avg152T_bain.nii.gz to the individual image, 

mri_convert motor_crotex/premotor_l.nii --apply_inverse_transform ./NOR82_PJI_FS/mri/transforms/talairach.m3z nor82_pji_premotor_l.nii.gz

I got the masks on individual image space.

Because I couldn't get the masks of premotor & motor cortex through freesurfer parcellation(recon-all -all),
I tried to get the masks through two methods. But the masks on individual image from two methods are not same, slightly different .

I am wondering if two methods to get premotror & motor cortex are right or not and if right, I can use the masks of premotor & motor cortex as target masks in analysis of tractography.

While I have found how to get the masks of premotor & motor cortex all the week searching and reading articles and command lines online , I couldn't get them at all.

I appreciate so much if you can help me. Have a nice day!😊


Best regards,
Sangho



2019년 10월 7일 (월) 오후 6:01, Greve, Douglas N.,Ph.D. <DGREVE@mgh.harvard.edu>님이 작성:
when you look in the label file, do you see
lh.BA1_exvivo.label
lh.BA2_exvivo.label
lh.BA3a_exvivo.label
lh.BA3b_exvivo.label
lh.BA44_exvivo.label
lh.BA45_exvivo.label
lh.BA4a_exvivo.label
lh.BA4p_exvivo.label
lh.BA6_exvivo.label


On 10/7/2019 11:50 AM, sang ho shin wrote:

        External Email - Use Caution        

Dear Douglas,

Thank you for your reply.😊
I already ran the full recon-all and I got the results(label, mri, scripts, stats, surf, tmp, touch, trash).
But though I tried to get the mask of both brodmann area 4 and 6, I couldn't get the masks.
(404BA4a, 405BA4p, 406BA6)

The command lines are follows.

SHINui-iMac:dti_analysis_kings shinsangho$ mri_binarize --i nor82_pji/nor82_pji_fs/mri/aparc.a2009s+aseg.mgz --match 404 --o nor82_pji/nor82_pji_dlpfc/NOR82_PJI_LH_PREMOTOR.nii.gz

Even though I replaced aparc.a2009s+aseg.mgzn with any other atlases(aparc.DKTatlas+aseg.mgz, aparc+aseg.mgz...)I couldn't get the mask. Could you help me how to get the Brodmann area 4 & 6?

Best regards,
Sangho

=============
$Id: mri_binarize.c,v 1.43 2016/06/09 20:46:21 greve Exp $

cwd /Users/shinsangho/sangho/DTI_analysis_kings

cmdline mri_binarize.bin --i nor82_pji/nor82_pji_fs/mri/aparc.a2009s+aseg.mgz --match 404 --o nor82_pji/nor82_pji_dlpfc/NOR82_PJI_PREMOTOR.nii.gz 

sysname  Darwin

hostname SHINui-iMac.local

machine  x86_64

user     shinsangho


input      nor82_pji/nor82_pji_fs/mri/aparc.a2009s+aseg.mgz

frame      0

nErode3d   0

nErode2d   0

output     nor82_pji/nor82_pji_dlpfc/NOR82_PJI_PREMOTOR.nii.gz

Binarizing based on matching values

nMatch 1

 0   404

binval        1

binvalnot     0

fstart = 0, fend = 0, nframes = 1

Found 0 values in range

Counting number of voxels in first frame

Found 0 voxels in final mask

Count: 0 0.000000 16777216 0.000000

mri_binarize done

========================



2019년 10월 7일 (월) 오후 4:20, Greve, Douglas N.,Ph.D. <DGREVE@mgh.harvard.edu>님이 작성:
You can to run the full recon-all on a given subject's data, and it will create the broadmann areas

On 10/5/2019 1:31 AM, sang ho shin wrote:

        External Email - Use Caution        

Dear Freesurfer Developers,

I am trying to get the seed mask of premotor and motor cortex. Because I can't get it through 'recon-all -all', I tried to find brodmann area ('recon-all -s subjid -ba-labels')

But I received ERROR message. Can you tell me how to get Brodmann area through recon-all or freesurfer parcellation? And I appreciate if you can help me to solve this error message as follows,

=================================================================

sinsanghoui-MBP:~ shinsangho$ export SUBJECTS_DIR=~/freesurfer_subjects

sinsanghoui-MBP:~ shinsangho$ echo $SUBJECTS_DIR

sinsanghoui-MBP:~ shinsangho$ recon-all -s NOR82_PJI -i ~/DTI_analysis/nor82_pji_t1/coT1.nii -ba-labels

Subject Stamp: freesurfer-Darwin-OSX-stable-pub-v6.0.0-2beb96c

Current Stamp: freesurfer-Darwin-OSX-stable-pub-v6.0.0-2beb96c

INFO: SUBJECTS_DIR is /Users/shinsangho/freesurfer_subjects

Actual FREESURFER_HOME /Applications/freesurfer

Darwin sinsanghoui-MBP 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64

/Users/shinsangho/freesurfer_subjects/NOR82_PJI

\n mri_convert /Users/shinsangho/DTI_analysis/nor82_pji_t1/coT1.nii /Users/shinsangho/freesurfer_subjects/NOR82_PJI/mri/orig/001.mgz \n

mri_convert.bin /Users/shinsangho/DTI_analysis/nor82_pji_t1/coT1.nii /Users/shinsangho/freesurfer_subjects/NOR82_PJI/mri/orig/001.mgz 

$Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $

reading from /Users/shinsangho/DTI_analysis/nor82_pji_t1/coT1.nii...

TR=1670.00, TE=0.00, TI=0.00, flip angle=0.00

i_ras = (0.000121244, -1, 0)

j_ras = (-0.0235518, -2.85817e-06, 0.999723)

k_ras = (0.999723, 0.000121211, 0.0235518)

writing to /Users/shinsangho/freesurfer_subjects/NOR82_PJI/mri/orig/001.mgz...

/Users/shinsangho/freesurfer_subjects/NOR82_PJI/label

#--------------------------------------------

#@# BA_exvivo Labels lh Fri Oct  4 17:43:23 BST 2019

\n mri_label2label --srcsubject fsaverage --srclabel /Users/shinsangho/freesurfer_subjects/fsaverage/label/lh.BA1_exvivo.label --trgsubject NOR82_PJI --trglabel ./lh.BA1_exvivo.label --hemi lh --regmethod surface \n

 

srclabel = /Users/shinsangho/freesurfer_subjects/fsaverage/label/lh.BA1_exvivo.label

srcsubject = fsaverage

trgsubject = NOR82_PJI

trglabel = ./lh.BA1_exvivo.label

regmethod = surface

 

srchemi = lh

trghemi = lh

trgsurface = white

srcsurfreg = sphere.reg

trgsurfreg = sphere.reg

usehash = 1

Use ProjAbs  = 0, 0

Use ProjFrac = 0, 0

DoPaint 0

 

SUBJECTS_DIR    /Users/shinsangho/freesurfer_subjects

FREESURFER_HOME /Applications/freesurfer

Loading source label.

Found 4129 points in source label.

MRISread(/Users/shinsangho/freesurfer_subjects/NOR82_PJI/surf/lh.white): could not open file

Starting surface-based mapping

Reading source registration 

 /Users/shinsangho/freesurfer_subjects/fsaverage/surf/lh.sphere.reg

Rescaling ...  original radius = 100

Reading target surface 

 /Users/shinsangho/freesurfer_subjects/NOR82_PJI/surf/lh.white

No such file or directory

ERROR: could not read /Users/shinsangho/freesurfer_subjects/NOR82_PJI/surf/lh.white

Darwin sinsanghoui-MBP 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64

 

recon-all -s NOR82_PJI exited with ERRORS at Fri Oct  4 17:43:25 BST 2019

 

For more details, see the log file /Users/shinsangho/freesurfer_subjects/NOR82_PJI/scripts/recon-all.log

To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting

==================================================



Best wishes,

Sangho

 


_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer