Script Sharing: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
This Matlab script created by Donald McLaren takes an .img or .nii file such as an F-map or T-map and a set of parameters for thresholding etc. and outputs a data structure with statistics and location information for the peak voxel(s) in each cluster (for either positive or negative values but not both). Below are some step-by-step directions for getting started. You can also type 'help peak_nii' for more information. | This Matlab script created by Donald McLaren takes an .img or .nii file such as an F-map or T-map and a set of parameters for thresholding etc. and outputs a data structure with statistics and location information for the peak voxel(s) in each cluster (for either positive or negative values but not both). Below are some step-by-step directions for getting started. You can also type 'help peak_nii' for more information. | ||
[https://gate.nmr.mgh.harvard.edu/wiki/whynhow/images/b/b8/Peaknii_113010.zip Download] | |||
'''Running the program:''' | '''Running the program:''' | ||
# | #Unzip the attached file to a directory | ||
#in matlab, addpath directory, where directory is the directory | #in matlab, addpath directory, where directory is the directory containing peak_nii from step 1 | ||
containing peak_nii from step 1 | |||
#load parameters_aal | #load parameters_aal | ||
#change the parameters to be consistent with AlphaSim entries, or | #change the parameters to be consistent with AlphaSim entries, or any other method you want to use to get the various parameters. type "parameters.field=value;" where field is the field name and value is the new value. parameters.label='Nitschke_Lab' for controllability regions | ||
any other method you want to use to get the various parameters. type | |||
"parameters.field=value;" where field is the field name and value is | |||
the new value. parameters.label='Nitschke_Lab' for controllability | |||
regions | |||
#save parameters_jack.mat parameters | #save parameters_jack.mat parameters | ||
#run the program by typing: [voxels | #run the program by typing: [voxels regions]=peak_nii('imagefile','parameters_jack.mat'). imagefile is the actual image file, it must be an img or nii file. | ||
regions]=peak_nii('imagefile','parameters_jack.mat') | |||
imagefile is the actual image file, it must be an img or nii file. | |||
#For a description of all the fields, type help peak_nii | #For a description of all the fields, type help peak_nii |
Latest revision as of 20:46, 6 December 2010
(beta version)
This page is designed to be a place where Martinos users can begin sharing scripts for stimulus presentation, data processing, analysis, etc. Right now it is in beta as we figure out the best way to do this!
Analysis
fMRI
Matlab
peak_nii
This Matlab script created by Donald McLaren takes an .img or .nii file such as an F-map or T-map and a set of parameters for thresholding etc. and outputs a data structure with statistics and location information for the peak voxel(s) in each cluster (for either positive or negative values but not both). Below are some step-by-step directions for getting started. You can also type 'help peak_nii' for more information.
Running the program:
- Unzip the attached file to a directory
- in matlab, addpath directory, where directory is the directory containing peak_nii from step 1
- load parameters_aal
- change the parameters to be consistent with AlphaSim entries, or any other method you want to use to get the various parameters. type "parameters.field=value;" where field is the field name and value is the new value. parameters.label='Nitschke_Lab' for controllability regions
- save parameters_jack.mat parameters
- run the program by typing: [voxels regions]=peak_nii('imagefile','parameters_jack.mat'). imagefile is the actual image file, it must be an img or nii file.
- For a description of all the fields, type help peak_nii