mattcieslak / easy_lausanne

Easy creation of Lausanne2008 atlases
Other
24 stars 11 forks source link

Skip re-running mris_volmask and use FreeSurfer's existing ribbon.mgz… #4

Closed kjamison closed 6 years ago

kjamison commented 6 years ago

… instead. When creating WM mask, test label values to determine if lh,rh WM labels are [2,41] or [20,120]

mattcieslak commented 6 years ago

Have you checked that the results look ok? The previous version was a verbatim copy from the connectome mapper toolkit before they switched to nipype. Thanks for contributing!

kjamison commented 6 years ago

Yes the resulting WM mask is identical.

For completeness:

FreeSurfer recon-all automatically runs this command to generate ribbon.mgz (and ?h.ribbon.mgz): ReconAllTableStableV6.0 (at least as far back as FreeSurer V4.0) mris_volmask --label_left_white 2 --label_left_ribbon 3 --label_right_white 41 --label_right_ribbon 42 --save_ribbon --save_distance <subjid>

easy_lausanne is calling: maskcreation.py: Line 170 runCmd( 'mris_volmask "%s"' % subject_id, log)

The latest nipype connectome mapper toolkit is still calling this (but just adding the subject directory): parcellation.py: Line 175 subprocess.check_call(['mris_volmask','--sd',subjects_dir,subject_id])

The defaults for mris_volmask itself (doc link) are lh=20 rh=120.

So:

  1. The ribbon.mgz file already exists
  2. easy_lausanne and CMT are overwriting it with a version that is identical in shape, but with different numerical labels than the original recon-all produces.
mattcieslak commented 6 years ago

Thanks for the edits!