- NAME
- SYNOPSIS
- DESCRIPTION
- REQUIRED ARGUMENTS
- OPTIONAL ARGUMENTS
- BUGS
- AUTHOR
- COPYRIGHT & LICENSE
- REVISION
- SEE ALSO
NAME
make_label -- Takes a FS-FAST contrast and transforms it into a surface-based label.
SYNOPSIS
make_label -analysis analysis_name -contrast contrast_name -hemi <rh|lh> -sf sessid_file -df sessdir_file [-map t -threshold 2 -type signed -bolddir bold -maskdir roianalysis_ROI -funcstem fmc -outputstem roi-map-hemi -force -help -man -debug]
DESCRIPTION
Sometimes it is useful to take a ROI and convert it into a surface-based label; for that, we have roi2label. Other times, however, we want to easily transform a previously computed contrast into a surface-based *.w file as well as a label. To do that, we can use make_label. It is required to apply a threshold to the contrast data; otherwise many more vertices will be included in the label than the research would like. The default threshold is ``2'', so for t-maps this means that t values greater than 2 will be included in the label, while for a sig map, sig values greater than 2 (and thus, smaller than 10^-2) will be included. make_label defaults to using signed quantities; to use unsigned, add the argument ``-type unsigned''.
To use make_label you must have a reconstructed brain for the subject in question, a ``subjectname'' file under their session directory with the name of the reconstructed subject's name inside, and a ``register.dat'' file under their bold directory. This thus assumes that you have run either autoreg-sess or tkregister-sess on this subject to create the ``register.dat'' file. Registering and reconstructing a brain takes a fair amount of time on the part of the researcher and thus should probably only be done with long-term or repeat subjects.
There are some provisions for storing data in non-standard locations. See the options below for more information.
REQUIRED ARGUMENTS
- -analysis analysis_name
- Name of the analysis for the contrast in question.
- -contrast contrast_name
- Name of the contrast to transform into a label.
- -hemi <rh|lh>
- Hemisphere on which to map the ROI. Note that if you try and map an ROI from a hemisphere for which there are no voxels, the program will fail, oftentimes without a useful error message.
- -sf sessid_file
- Name of the session ID file.
- -df sessdir_file
- Name of the session directory file.
OPTIONAL ARGUMENTS
- -map t
- Statistical map to transform to a label. Defaults to ``t''.
- -threshold 2
- Threshold to use when transforming the contrast to a label. Defaults to 2.
- -type signed
- Whether to use signed or unsigned quantities when thresholding the contrast. Defaults to ``signed''.
- -projfrac 0
- Fraction [0, 1] of the cortical thickness at each vertex to project along the su rface normal. The default is 0. Change this to project more of your data onto the cortical surface, as the default is to sample only at the grey-white boundar y.
- -bolddir bold
- Name of the functional directory. Defaults to ``bold''.
- -maskdir roianalysis_ROI
- Name of the directory that holds the ROIs. Defaults to <roianalysis_ROI>; set this argument if you save your data in a non-standard location. Do not use in conjunction with -roianalysis.
- -funcstem fmc
- Name of the functional stem. Defaults to ``fmc''. Change this if, for example, you have separate functional volumes for smoothing and want to create ROIs from that data.
- -outputstem roi-map-hemi
- Name of the stem for the output label. Defaults to roi-map-hemi, making the output file <roi-map-hemi.label>.
- -force
- If you attempt to run roi2label for a label that has previously been created, the program will quit with an error, telling you of this situation. Use this parameter to override that behavior.
- -help
- Terse usage information.
- -man
- Complete usage information (this file).
- -debug
- Displays debugging information. Use this option to help debug unexpected behavior and when submitting a bug report.
=cut
## use strict checking use strict;
## use Getopt module for checking command line options use Getopt::Long;
## use Pod module for automatic help info use Pod::Usage;
## use roi functions use FSFAST::Parse;
## make new instance of Parse object my $ROIdata = new FSFAST::Parse;
$ROIdata->get_prog_name($ROIdata,$0);
## use roi functions use FSFAST::ROI;
## make new instance of ROI object my $ROI = new FSFAST::ROI;
## get logfile functions from Misc modules use FSFAST::Misc qw/:log/;
## set default values my $force = 0; my $help = 0; my $man = 0;
## record argument list my @arglist = @ARGV;
## command-line parsing using GetOpt::Long GetOptions('analysis=s' => \$ROIdata->{analysis}, 'contrast=s' => \$ROIdata->{contrast}, 'hemi=s' => \$ROIdata->{hemi}, 'sf=s' => \$ROIdata->{sessid_file}, 'df=s' => \$ROIdata->{sessdir_file}, 'map:s' => \$ROIdata->{map}, 'threshold:s' => \$ROIdata->{threshold}, 'type:s' => \$ROIdata->{type}, 'projfrac:f' => \$ROIdata->{projfrac}, 'bolddir:s' => \$ROIdata->{bold_dir}, 'maskdir:s' => \$ROIdata->{mask_path}, 'funcstem:s' => \$ROIdata->{func_stem}, 'outputstem:s' => \$ROIdata->{output_stem}, 'force' => \$force, 'help' => \$help, 'man' => \$man, 'debug' => \$ROIdata->{debug}) or pod2usage(2);
## help messages if missing required paramters pod2usage(-verbose => 1) if $help; pod2usage(-verbose => 2) if $man; pod2usage(-message => ``\nERROR 120: Need to enter an analysis\n'') if !$ROIdata->{analysis}; pod2usage(``\nERROR 130: Need to enter a contrast name\n'') if !$ROIdata->{contrast}; pod2usage(``\nERROR 125: Need to enter a hemisphere (either rh or lh)\n'') if !$ROIdata->{hemi}; pod2usage(``\nERROR 121: Need to enter a session id file name\n'') if !$ROIdata->{sessid_file}; pod2usage(``\nERROR 122: Need to enter a session directory file name\n'') if !$ROIdata->{sessdir_file};
$ROIdata->getsessid(); $ROIdata->getsessdir(); $ROIdata->getsubjectname(); $ROIdata->set_func_path();
logfile_start($ROIdata); logfile(``command line: $0 @arglist''); ## log the command line logfile(``starting $ROIdata->{prog_name}...'',1);
$ROIdata->getseqinfo();
$ROIdata->set_analysis_path();
$ROIdata->getanalysisinfo();
$ROI->set_roi_path($ROIdata);
$ROI->check_label_path($ROIdata);
$ROI->run_make_label($ROIdata);
logfile('$Id');
if (-f (``$ROIdata->{cwd}/log/$ROIdata->{prog_name}.oops'')) { unlink ``$ROIdata->{cwd}/log/$ROIdata->{prog_name}.oops''; logfile(``$ROIdata->{prog_name} FAILED\n'', 1); } else { logfile(``$ROIdata->{prog_name} SUCCESSFULLY COMPLETED\n'',1); }
__END__
BUGS
The ``subjectname'' file must contain only one line: the name of the subject. If there are one or more empty lines after the subject's name, the program will fail.
AUTHOR
Nicholas Knouf, <nknouf@mit.edu>, <nknouf@mimeme.net>
COPYRIGHT & LICENSE
Copyright (c) 2003, Nicholas Knouf, MIT.
This program is free software and is governed by the terms of the Artistic License.
REVISION
$Id: make_label,v 1.5 2003/10/06 16:03:47 nknouf Exp $
SEE ALSO
makeROI, editROI