Dear, Zoe Usually after Freesurfer fresh install you will get a SUBJECTS_DIR with several directories, including Bert. The script you used will scan all directories under SUBJECTS_DIR and if it finds any directory without the posterior*.mgz files it will fail. You can check if this is the problem running one side from one patient like this:
cd $SUBJECTS_DIR/yoursubject/mri kvlQuantifyPosteriorProbabilityImages $FREESURFER_HOME/data/GEMS/compressionLookupTable.txt posterior_right_* posterior_Right-Hippocampus.mgz This will show the volume in voxels for each subfield. If it works, you can try some alternatives: 1- Set your $SUBJECTS_DIR variable as another another path and move your subjects directories (and only these directories to this place) and run the same script you tried (kvlQuantifyHippocampalSubfieldSegmentations.sh) 2- Make a little BASH script to process just your subjects. It requires you keep your subjects in directories named following a rule you can use make an iterative loop in your script. I use subject1, subject2 but you can adapt to your needs. Something like the CalcHippoVol I attached. Before using do any adaptation you may need and make it executable (for example, with a chmod +x CalcHippoVol). Then just run from command prompt from within the directory you saved the attachment typing: ./CalcHippoVol This way, if all works you will get 2 files, LeftVol and a RightVol, inside each of your subject/mri directory with the volumes you want. Notice that: 1- the volumes are in voxels and, despite your original voxel volume, the hippo-subfields processed by Freesurfer will be 0.5 x 0.5 x 0.5 mm. So vol(mm3)=vol(voxels)/8. 2- it is difficult to determine the precise limits of each subfield in the extreme end of the tail of the hippocampus, so the recon-all -hippo-subfield processing pipeline group all remaining voxels in the posterior_Left-Hippocampus.mgz for left hippocampus and posterior_Right-Hippocampus.mgz for right one. So these last files does not represent the whole hippocampi as the name could suggest. Check details at Automated Segmentation of Hippocampal Subfields from Ultra-High Resolution In Vivo MRI. Hi, Eugenio. I would like to suggest a different name for this file. What do you think about something like posterior_left_tail_complement.mgz and posterior_right_tail_complement.mgz. Cheers, Marcos Em Seg, 2013-06-24 às 16:00 -0400, Yang, Zoe escreveu: > Hi all, > > I am getting error messages while running > kvlQuantifyHippocampalSubfieldSegmentations.sh, similar to the error > mentioned in an earlier > email > (http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg24430.html). > We did use the -hippo-subfields flag for all of our subjects first, and the > output was 20 left and right subfield mgz files (it completed without any > errors). The subjects had already undergone the standard volumetric > FreeSurfer pipeline and therefore we ran the command: recon-all -s subjectID > -hippo-subfields. > > The error message for kvlQuantifyHippocampalSubfieldSegmentation that > I’m getting is: > > > > resultsDirectory ***/HIPPOCAMPAL_TEST > > cd ***/HIPPOCAMPAL_TEST > > resultsDirectory ***/HIPPOCAMPAL_TEST > > startIndex: 1 > > endIndex: 2 > > cd subjectID_recon/ > > Quantifying subject ID_recon left > > Doing left side > > cd left > > cd segmentationWithoutPartialVolumingLog > > kvlQuantifyPosteriorProbabilityImages > /Applications/freesurfer/data/GEMS/compressionLookupTable_left.txt > posterior_Left-Hippocampus.mgz posterior_left_presubiculum.mgz > posterior_left_CA1.mgz posterior_left_CA2-3.mgz > posterior_left_fimbria.mgz posterior_left_subiculum.mgz > posterior_left_CA4-DG.mgz > posterior_left_hippocampal_fissure.mgz > volumeStats_left.txt > > terminate called after throwing an instance of 'itk::ExceptionObject' > > what(): itkMGHImageIO.cxx:216: > > itk::ERROR: MGHImageIO(0x46b690): Can't find/open file: > posterior_Left-Hippocampus.mgz > > kvlQuantifyHippocampalSubfieldSegmentations.sh: line 22: 50779 Abort > trap > kvlQuantifyPosteriorProbabilityImages > /Applications/freesurfer/data/GEMS/compressionLookupTable_left.txt > posterior_Left-Hippocampus.mgz posterior_left_presubiculum.mgz > posterior_left_CA1.mgz posterior_left_CA2-3.mgz posterior_left_fimbria.mgz > posterior_left_subiculum.mgz posterior_left_CA4-DG.mgz > posterior_left_hippocampal_fissure.mgz > volumeStats_left.txt > > failed to do > kvlQuantifyPosteriorProbabilityImages > /Applications/freesurfer/data/GEMS/compressionLookupTable_left.txt > posterior_Left-Hippocampus.mgz posterior_left_presubiculum.mgz > posterior_left_CA1.mgz posterior_left_CA2-3.mgz > posterior_left_fimbria.mgz posterior_left_subiculum.mgz > posterior_left_CA4-DG.mgz > posterior_left_hippocampal_fissure.mgz > volumeStats_left.txt > > > > > > Is there anything else that we are missing and should run? > > > > Thanks! > > > > > > _______________________________________________ > 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.
CalcHippoVol
Description: application/shellscript
_______________________________________________ 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.