Thanks Doug! That fixed it. But now I have two numbers in each file, which
do I use (see also attached file)?

    ColHeaders Index SegId NVertices Area_mm2 StructName Mean StdDev Min Max
Range  1 0 124241 81007.3 Seg0000 2.7306 0.6613 1.4985 4.4779 2.9795  2 1
3540 2225.6 Seg0001 2.4966 0.3254 2.0502 3.0296 0.9794










On Wed, Mar 5, 2014 at 5:07 PM, Douglas N Greve
<gr...@nmr.mgh.harvard.edu>wrote:

>
> Sorry, I gave you some bad advice. Only use --label-thresh with labels
> that have a statistic that is non-zero (this is the last column of the
> label file). Eg, in lh.V1.thresh.label, the stat is always 0 (but it is
> non-zero in lh.V1.label). The stat is the probability that the vertex is in
> the label, so you can choose the threshold based on that. The
> lh.V1.thresh.label is for when the stat is the max for V1 relative to the
> other labels (eg, V2). If you select thresh=.5, you may miss places where
> V1 is the most likely but still less than .5. I would probably use
> lh.V1.thresh.label (and then do not spec --label-thresh)
>
> doug
>
>
>
> On 03/05/2014 03:40 PM, krista kelly wrote:
>
>> Thanks Doug! I did that and it worked, but now here's another problem:
>> the values that I obtained for V1, V2, and cortex for each subject are all
>> the same. For example, BV20 left hemisphere values for V1, V2, and cortex
>> are all 2.7241 (same thing happens for the right hemisphere). Maybe I can
>> tell you what I did step by step to see  if you can find where I went wrong.
>>
>> First, I did a for loop to run mri_segstats for each participant for each
>> label per hemisphere (here is an example of V1):
>>
>> foreach s (BV20 BV21 BV22 BV23 BV24 BV25 BV26 BV27 BV28 BV29 BV30 BV31
>> BV32 BV33 BV34 BV35 BV36 BV37 BV38 BV39 BV40 BV41 BV43 BV44 BV47 MB07 MB08
>> MB09 MB10 MB11 MB12 MB13 MB14 MB15 MB16 MB17 MB18 MB19 MB20) <<hit enter>>
>> mri_segstats --label-thresh .5 --slabel $s lh
>> $SUBJECTS_DIR/$s/label/lh.V1.thresh.label --i
>> $SUBJECTS_DIR/$s/surf/lh.pial_lgi --sum 
>> $SUBJECTS_DIR/$s/stats/lh.V1.thresh.label.LGI.stats
>>  <<hit enter>>
>> end <<hit enter>>
>>
>> for left V2 I ran:
>>
>> foreach s (BV20 BV21 BV22 BV23 BV24 BV25 BV26 BV27 BV28 BV29 BV30 BV31
>> BV32 BV33 BV34 BV35 BV36 BV37 BV38 BV39 BV40 BV41 BV43 BV44 BV47 MB07 MB08
>> MB09 MB10 MB11 MB12 MB13 MB14 MB15 MB16 MB17 MB18 MB19 MB20) <<hit enter>>
>> mri_segstats --label-thresh .5 --slabel $s lh
>> $SUBJECTS_DIR/$s/label/lh.V2.thresh.label --i
>> $SUBJECTS_DIR/$s/surf/lh.pial_lgi --sum 
>> $SUBJECTS_DIR/$s/stats/lh.V2.thresh.label.LGI.stats
>>  <<hit enter>>
>> end <<hit enter>>
>>
>> and for left cortex I ran:
>> foreach s (BV20 BV21 BV22 BV23 BV24 BV25 BV26 BV27 BV28 BV29 BV30 BV31
>> BV32 BV33 BV34 BV35 BV36 BV37 BV38 BV39 BV40 BV41 BV43 BV44 BV47 MB07 MB08
>> MB09 MB10 MB11 MB12 MB13 MB14 MB15 MB16 MB17 MB18 MB19 MB20) <<hit enter>>
>> mri_segstats --label-thresh .5 --slabel $s lh 
>> $SUBJECTS_DIR/$s/label/lh.cortex
>> --i $SUBJECTS_DIR/$s/surf/lh.pial_lgi --sum $SUBJECTS_DIR/$s/stats/lh.
>> cortex.LGI.stats
>> end <<hit enter>>
>>
>>
>> This is where the problem must be occurring since all files created
>> during these commands show the same files per hemisphere. I've attached
>> three files created during mri_segstats (left V1, V2, cortex.stats) for one
>> participant. I've also attached files created during asegstats2table to
>> show how all values are the same for each label for all participants (V1,
>> V2, cortex.LGI.txt).
>>
>> If anyone has any insight into the problem, that would be great!
>>
>> Best,
>> Krista
>>
>>
>> On Wed, Mar 5, 2014 at 1:54 PM, Douglas N Greve <
>> gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>>
>>
>>     use asegstats2table (I know, it's confusing:)
>>     doug
>>
>>
>>
>>     On 03/05/2014 01:42 PM, krista kelly wrote:
>>
>>         Hi again,
>>
>>         My apologies for the barrage of emails! I was able to do
>>         mri_segstats on V1 labels for pial_lgi using the following:
>>
>>         mri_segstats --label-thresh .5 --slabel $s lh
>>         $SUBJECTS_DIR/$s/label/lh.V1.thresh.label --i
>>         $SUBJECTS_DIR/$s/surf/lh.pial_lgi --sum
>>         $SUBJECTS_DIR/$s/stats/lh.V1.thresh.label.LGI.stats
>>
>>         However, now I'm having trouble with bringing all of the data
>>         into one table using aparcstats2table. I found online how to
>>         get the data for aparc annotation
>>         (https://mail.nmr.mgh.harvard.edu/pipermail//freesurfer/
>> 2013-September/033069.html)
>>         and tried to adapt to the labels. Here is what I've tried:
>>
>>         aparcstats2table --subjects BV20 BV21 BV22 BV23 BV24 BV25 BV26
>>         BV27 BV28 BV29 BV30 BV31 BV32 BV33 BV34 BV35 BV36 BV37 BV38
>>         BV39 BV40 BV41 BV43 BV44 BV47 MB07 MB08 MB09 MB10 MB11 MB12
>>         MB13 MB14 MB15 MB16 MB17 MB18 --hemi lh --meas thickness
>>         --parc V1.thresh.label.LGI --tablefile lh.V1.thresh.label.LGI.txt
>>
>>         I get the following output when I do this:
>>
>>         SUBJECTS_DIR : /Applications/freesurfer/subjects
>>         Parsing the .stats files
>>         Traceback (most recent call last):
>>           File "/Applications/freesurfer/bin/aparcstats2table", line
>>         371, in <module>
>>             parc_measure_map = parsed.parse(options.meas)
>>           File "/Applications/freesurfer/bin/fsutils.py", line 207, in
>>         parse
>>             val = float(strlist[self.measure_column_map[measure]])
>>         ValueError: could not convert string to float: Seg0000
>>
>>         I've attached an example of the file created during
>>         mri_segstats in case that helps.
>>
>>         Thanks!
>>         Krista
>>
>>
>>         On Wed, Mar 5, 2014 at 1:21 PM, krista kelly
>>         <krista.kell...@gmail.com <mailto:krista.kell...@gmail.com>
>>         <mailto:krista.kell...@gmail.com
>>
>>         <mailto:krista.kell...@gmail.com>>> wrote:
>>
>>             Perfect, it works thanks!
>>
>>
>>             On Wed, Mar 5, 2014 at 11:35 AM, Douglas N Greve
>>             <gr...@nmr.mgh.harvard.edu
>>         <mailto:gr...@nmr.mgh.harvard.edu>
>>         <mailto:gr...@nmr.mgh.harvard.edu
>>         <mailto:gr...@nmr.mgh.harvard.edu>>> wrote:
>>
>>                 sorry, it is --slabel
>>                 btw, there is documentation. If you run it without
>>         options it
>>                 gives you a list of arguments as well as examples
>>                 doug
>>
>>                 On 03/05/2014 11:32 AM, krista kelly wrote:
>>
>>                     Thanks Doug, but when I try this I get the following
>>                     error: Option --label unknown
>>
>>
>>                     On Wed, Mar 5, 2014 at 11:21 AM, Douglas N Greve
>>                     <gr...@nmr.mgh.harvard.edu
>>         <mailto:gr...@nmr.mgh.harvard.edu>
>>                     <mailto:gr...@nmr.mgh.harvard.edu
>>         <mailto:gr...@nmr.mgh.harvard.edu>>
>>                     <mailto:gr...@nmr.mgh.harvard.edu
>>         <mailto:gr...@nmr.mgh.harvard.edu>
>>
>>                     <mailto:gr...@nmr.mgh.harvard.edu
>>         <mailto:gr...@nmr.mgh.harvard.edu>>>> wrote:
>>
>>
>>                         try
>>                         mri_segstats --label-thresh .5 --label BV20 lh
>>                     V1.thresh.label --i
>>                         $SUBJECTS_DIR/BV20/surf/lh.pial_lgi --sum
>>                     lh.V1.thresh.label.stats
>>
>>                         On 03/05/2014 11:15 AM, krista kelly wrote:
>>                         > Hello,
>>                         >
>>                         > I would like to extract the pial_lgi data from
>>                     Freesurfer's
>>                         V1.thresh
>>                         > labels but can't quite figure it out. I've tried
>>                     adapting the
>>                         commands
>>                         > from the LGI Freesurfer tutorial as such:
>>                         >
>>                         > mri_segstats --label-thresh BV20 lh
>>         V1.thresh.label --i
>>                         > $SUBJECTS_DIR/BV20/surf/lh.pial_lgi --sum
>>                     lh.V1.thresh.label.stats
>>                         >
>>                         > I've also tried
>>                         >
>>                         > mris_anatomical_stats -l lh.V1.thresh.label -f
>>                         > BV20/stats/lh.V1.thresh.label.stats BV20 lh
>>         pial_lgi
>>                         >
>>                         > but I've had no luck with either.
>>                         >
>>                         > I would appreciate any help!
>>                         >
>>                         > Thanks,
>>                         > Krista
>>                         >
>>                         >
>>                         > _______________________________________________
>>                         > Freesurfer mailing list
>>                         > Freesurfer@nmr.mgh.harvard.edu
>>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>>                     <mailto:Freesurfer@nmr.mgh.harvard.edu
>>         <mailto:Freesurfer@nmr.mgh.harvard.edu>>
>>                         <mailto:Freesurfer@nmr.mgh.harvard.edu
>>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>>
>>                     <mailto:Freesurfer@nmr.mgh.harvard.edu
>>         <mailto:Freesurfer@nmr.mgh.harvard.edu>>>
>>
>>                         >
>>         https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>                         --
>>                         Douglas N. Greve, Ph.D.
>>                         MGH-NMR Center
>>         gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>
>>                     <mailto:gr...@nmr.mgh.harvard.edu
>>         <mailto:gr...@nmr.mgh.harvard.edu>>
>>                     <mailto:gr...@nmr.mgh.harvard.edu
>>         <mailto:gr...@nmr.mgh.harvard.edu>
>>
>>                     <mailto:gr...@nmr.mgh.harvard.edu
>>         <mailto:gr...@nmr.mgh.harvard.edu>>>
>>                         Phone Number: 617-724-2358 <tel:617-724-2358>
>>         <tel:617-724-2358 <tel:617-724-2358>>
>>                     <tel:617-724-2358 <tel:617-724-2358>
>>         <tel:617-724-2358 <tel:617-724-2358>>>
>>                         Fax: 617-726-7422 <tel:617-726-7422>
>>         <tel:617-726-7422 <tel:617-726-7422>> <tel:617-726-7422
>>         <tel:617-726-7422>
>>
>>                     <tel:617-726-7422 <tel:617-726-7422>>>
>>
>>
>>                         Bugs:
>>         surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
>>         <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
>>                            <http://surfer.nmr.mgh.harvard.edu/fswiki/
>> BugReporting>
>>                                <http://surfer.nmr.mgh.harvard.edu/fswiki/
>> BugReporting>
>>                         FileDrop:
>>         https://gate.nmr.mgh.harvard.edu/filedrop2
>>         www.nmr.mgh.harvard.edu/facility/filedrop/index.html
>>         <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
>>                            <http://www.nmr.mgh.harvard.
>> edu/facility/filedrop/index.html>
>>                                           <http://www.nmr.mgh.harvard.
>> edu/facility/filedrop/index.html>
>>
>>                         Outgoing:
>>         ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
>>
>>                         _______________________________________________
>>                         Freesurfer mailing list
>>         Freesurfer@nmr.mgh.harvard.edu
>>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>>                     <mailto:Freesurfer@nmr.mgh.harvard.edu
>>         <mailto:Freesurfer@nmr.mgh.harvard.edu>>
>>                     <mailto:Freesurfer@nmr.mgh.harvard.edu
>>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>>
>>                     <mailto:Freesurfer@nmr.mgh.harvard.edu
>>         <mailto:Freesurfer@nmr.mgh.harvard.edu>>>
>>
>>         https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>>                         The information in this e-mail is intended
>>         only for
>>                     the person to
>>                         whom it is
>>                         addressed. If you believe this e-mail was sent
>>         to you
>>                     in error and
>>                         the e-mail
>>                         contains patient information, please contact
>>         the Partners
>>                         Compliance HelpLine at
>>         http://www.partners.org/complianceline . If the e-mail was
>>                     sent to
>>                         you in error
>>                         but does not contain patient information, please
>>                     contact the
>>                         sender and properly
>>                         dispose of the e-mail.
>>
>>
>>
>>                 --         Douglas N. Greve, Ph.D.
>>                 MGH-NMR Center
>>         gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>
>>         <mailto:gr...@nmr.mgh.harvard.edu
>>         <mailto:gr...@nmr.mgh.harvard.edu>>
>>                 Phone Number: 617-724-2358 <tel:617-724-2358>
>>         <tel:617-724-2358 <tel:617-724-2358>>
>>                 Fax: 617-726-7422 <tel:617-726-7422> <tel:617-726-7422
>>         <tel:617-726-7422>>
>>
>>                 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
>>         <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
>>                 <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
>>                 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
>>         www.nmr.mgh.harvard.edu/facility/filedrop/index.html
>>         <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
>>                        <http://www.nmr.mgh.harvard.
>> edu/facility/filedrop/index.html>
>>                 Outgoing:
>>         ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
>>
>>
>>
>>
>>     --     Douglas N. Greve, Ph.D.
>>     MGH-NMR Center
>>     gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>
>>     Phone Number: 617-724-2358 <tel:617-724-2358>
>>     Fax: 617-726-7422 <tel:617-726-7422>
>>
>>     Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
>>     <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
>>     FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
>>     www.nmr.mgh.harvard.edu/facility/filedrop/index.html
>>     <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
>>     Outgoing:
>>     ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
>>
>>
>>
> --
> Douglas N. Greve, Ph.D.
> MGH-NMR Center
> gr...@nmr.mgh.harvard.edu
> Phone Number: 617-724-2358
> Fax: 617-726-7422
>
> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
> FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
> www.nmr.mgh.harvard.edu/facility/filedrop/index.html
> Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
>
>

Attachment: lh.V1.thresh.label.LGI.stats
Description: Binary data

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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply via email to