Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract global measures in addition to shape-specific measures #148

Open
satra opened this issue Mar 19, 2018 · 11 comments
Open

extract global measures in addition to shape-specific measures #148

satra opened this issue Mar 19, 2018 · 11 comments

Comments

@satra
Copy link
Member

satra commented Mar 19, 2018

in the mindboggle output none of the global measures/stats evaluated by the underlying tools are extracted. while it's possible to go back and extract them separately, it would nice to have them in the mindboggled output.

@binarybottle
Copy link
Member

I agree. Which global measures would you like to include in the mindboggled output?

By the way, this issue is related to issue #108.

@satra
Copy link
Member Author

satra commented Mar 20, 2018

every measure that's in the header of aseg.stats + corpus callosum + ventricular stats. i don't think the latter two are present in the current output.

# Measure BrainSeg, BrainSegVol, Brain Segmentation Volume, 1078355.000000, mm^3             
# Measure BrainSegNotVent, BrainSegVolNotVent, Brain Segmentation Volume Without Ventricles, 1069223.000000, mm^3                                                                         
# Measure BrainSegNotVentSurf, BrainSegVolNotVentSurf, Brain Segmentation Volume Without Ventricles from Surf, 1068195.198727, mm^3                                                       
# Measure VentricleChoroidVol, VentricleChoroidVol, Volume of ventricles and choroid plexus, 6563.000000, mm^3                                                                            
# Measure lhCortex, lhCortexVol, Left hemisphere cortical gray matter volume, 209722.015864, mm^3                                                                                         # Measure rhCortex, rhCortexVol, Right hemisphere cortical gray matter volume, 206510.220266, mm^3                                                                                        
# Measure Cortex, CortexVol, Total cortical gray matter volume, 416232.236130, mm^3          
# Measure lhCerebralWhiteMatter, lhCerebralWhiteMatterVol, Left hemisphere cerebral white matter volume, 229086.228129, mm^3
# Measure rhCerebralWhiteMatter, rhCerebralWhiteMatterVol, Right hemisphere cerebral white matter volume, 229672.734468, mm^3
# Measure CerebralWhiteMatter, CerebralWhiteMatterVol, Total cerebral white matter volume, 458758.962597, mm^3                                                                            
# Measure SubCortGray, SubCortGrayVol, Subcortical gray matter volume, 56030.000000, mm^3    
# Measure TotalGray, TotalGrayVol, Total gray matter volume, 576053.236130, mm^3
# Measure SupraTentorial, SupraTentorialVol, Supratentorial volume, 940561.198727, mm^3      
# Measure SupraTentorialNotVent, SupraTentorialVolNotVent, Supratentorial volume, 933998.198727, mm^3                                                                                    
 # Measure SupraTentorialNotVentVox, SupraTentorialVolNotVentVox, Supratentorial volume voxel count, 931987.000000, mm^3                                                                   
# Measure Mask, MaskVol, Mask Volume, 1487053.000000, mm^3                                   
# Measure BrainSegVol-to-eTIV, BrainSegVol-to-eTIV, Ratio of BrainSegVol to eTIV, 0.978773, unitless
# Measure MaskVol-to-eTIV, MaskVol-to-eTIV, Ratio of MaskVol to eTIV, 1.349730, unitless
# Measure lhSurfaceHoles, lhSurfaceHoles, Number of defect holes in lh surfaces prior to fixi
ng, 24, unitless
# Measure rhSurfaceHoles, rhSurfaceHoles, Number of defect holes in rh surfaces prior to fixi
ng, 16, unitless
# Measure SurfaceHoles, SurfaceHoles, Total number of defect holes in surfaces prior to fixin
g, 40, unitless
# Measure EstimatedTotalIntraCranialVol, eTIV, Estimated Total Intracranial Volume, 1101741.3
16128, mm^3

@binarybottle
Copy link
Member

After running recon-all I see the following in a subject's stats/ folder:

aseg.stats
lh.aparc.a2009s.stats
lh.aparc.DKTatlas.stats
lh.aparc.pial.stats
lh.aparc.stats
lh.BA_exvivo.stats
lh.BA_exvivo.thresh.stats
lh.curv.stats
lh.w-g.pct.stats
rh.aparc.a2009s.stats
rh.aparc.DKTatlas.stats
rh.aparc.pial.stats
rh.aparc.stats
rh.BA_exvivo.stats
rh.BA_exvivo.thresh.stats
rh.curv.stats
rh.w-g.pct.stats
wmparc.stats

FreeSurfer generates a lot of interesting information, and it's not obvious to me which of the above files would be good to include. If someone runs mindboggle123 (or recon-all as a preprocessing step to mindboggle) they will generate all of the above and have access to them. I don't think that copying these tables into Mindboggle's output tables/ directory is a good idea because they are not in a consistent format. Adding FreeSurfer's volume stats to Mindboggle's output tables might be a mistake as well, because many regions are redefined by the hybrid segmentation with ANTs...

@satra
Copy link
Member Author

satra commented Mar 27, 2018

run asegstats2table returns a list of specific subcortical and whole brain stats for a subject. i would suggest including those only.

@binarybottle
Copy link
Member

Why do I have a syntax error?:

asegstats2table --subjects bert

File "/Applications/freesurfer/bin/asegstats2table", line 195
    print 'ERROR: subjects are not specified (use --subjects SUBJECTS)'
SyntaxError: invalid syntax

And why not aparcstats2table as well?...

@satra
Copy link
Member Author

satra commented Mar 27, 2018

asegstats2table --subjects bert

needs python2, not updated yet to use python 3 ( there is a version in their dev repo which would likely run on python3, but the script itself forces a python2 interpreter).

And why not aparcstats2table as well?...

because in general you do extract those in the freesurfer table. i'm mostly thinking of things like ventricle volume, etiv, brain vol, which are not present in mindboggle output, but can be useful for normalizing, predicting, etc.,.

@satra
Copy link
Member Author

satra commented Mar 27, 2018

given the python situation it would be best to perhaps just parse the aseg.stats directly using pandas.

@binarybottle
Copy link
Member

I won't be able to get to a pandas parsing for some time, unfortunately...

@binarybottle
Copy link
Member

@satra -- you didn't tackle whole-brain measures when you introduced LabelGeometry, did you?

@satra
Copy link
Member Author

satra commented Aug 26, 2018

no - i tackled the pieces necessary to create this table. we are working on a nidmification of the outputs from freesurfer and ants. once that's ready i'll add that in to the code.

@PeerHerholz
Copy link
Contributor

re pandas parsing: @ltirrell already did a great job here. If that's okay for you/sufficient/what you're looking for, I would give it a try, that is packing that functionality in one or a few nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants