Hi, all!
Here are some useful programs written by me. I think these codes may be helpful for you. Please install DPABI in advance to use them.
1. Program for re-orienting the un-normalized image (diagonalize the complex affine matrix): y_reorient.m
2. Program for changing the b vector file created by MRIcroN's dcm2nii suitable for DTI Studio: y_ChangeBVector.m
3. Program for converting the NIfTI file in talairach space into .HEAD/.BRIK format which can be displayed with AFNI in Talairach View: y_ConvertTlrcNiftiToTlrcAFNI.m
4. Program for Shrinking or Enlarging masks: y_MaskShrink.m and y_MaskEnlarge.m
5. Program for performing robust regression analysis for brain images: y_RobustFit_Image.m
6. Program for calculating the Intraclass correlation coefficient (ICC) for brain images: y_ICC_Image.m
7. Program for converting r value to p value, you will know if your Pierson's correlation coefficients are significant: y_Corr2p.m. For an alternative way, you can use DPABI Viewer to convert T/F/R threshold value to P value or vise visa.
8. Program for writing an image file from Talairach space into MNI space based on Jack Lancaster's tal2icbm_spm.m: y_tal2icbm_spm_Image.m
9. Program for converting p maps to z maps: y_ptoZ.m
10. Program for extracting center of mass: y_CenterOfMass.m
Please report here if you encounter any problem with these programs.
Best,
Chao-Gan YAN
restbrain
Fri, 04/24/2009 - 06:08
Permalink
Pretty good jobs!
Pretty good jobs!
lvlerick
Wed, 04/14/2010 - 13:06
Permalink
Re
Hey,
for running the y_reorient, my data are in nifti. Is this ok, because it doesn't work.
Error: ??? Input argument "vx" is undefined
Kind regards,
Leslie
YAN Chao-Gan
Thu, 04/15/2010 - 11:22
Permalink
Re
Dear Leslie,
vx is the new voxel size.
vx=1 means new voxel size is 1x1x1, 2 means 2x2x2.
I am sorry just cube voxel can be used currently.
Best wishes!
Chao-Gan
YAN Chao-Gan
Sat, 04/24/2010 - 03:41
Permalink
New program for converting T/F/R statistical image to Z statisti
Hi!
New program has been added here: Program for converting T/F/R statistical image to Z statistical image. y_TFRtoZ.m
Best wishes!
Chao-Gan
YAN Chao-Gan
Sat, 08/21/2010 - 17:15
Permalink
New Program for changing the b vector file for DTI studio
Hi!
New program has been added here: Program for changing the b vector file created by MRIcroN's dcm2nii suitable for DTI Studio: y_ChangeBVector.m
Best wishes!
Chao-Gan
YAN Chao-Gan
Thu, 10/07/2010 - 11:28
Permalink
A New Program for the combination usage of AFNI and REST/DPARSF
New program has been added here: Program for converting the NIfTI file in talairach space into .HEAD/.BRIK format which can be displayed with AFNI in Talairach View: y_ConvertTlrcNiftiToTlrcAFNI.m
This program is for the combination usage of AFNI and REST/DPARSF. E.g. for brain tumor patients which can not perform normalization with SPM:
1. Use DPARSF to complete the pre-normalization steps: DICOM->NIfTI, Slice Timing, Realign, sturctural T1 .hdr/img coregister to the space of realigned mean functional image.
2. Use AFNI's command '3dWarp -deoblique' and '3drefit -markers' to convert the coregistered structural T1 .hdr/img into structural .HEAD/BRIK pair.
3. Use AFNI's command '3dTcat' to convert the realigned EPI .hdr/img into functional .HEAD/BRIK pair.
4. Use AFNI to manually normalize the structural .HEAD/BRIK into talairach coordinate system. Then use 'Define Datamode'->'Warp Ulay on Demand' to save and resample the structural .HEAD/BRIK and functional .HEAD/BRIK into '+tlrc.HEAD/BRIK' files in talairach space.
5. Use AFNI's command '3dAFNItoNIFTI' to convert functional '+tlrc.HEAD/BRIK' into 4d .nii files. Then use REST->Utilities->NIfTI .nii to NIfTI pairs to convert the 4d .nii into 3d .hdr/img.
6. Use DPARSF to perform the following analysis such as 'smooth->detrend->filter->ALFF,mALFF' based on the 3d .hdr/img files.
7. Use REST or SPM to perform the Statistical analysis.
8. Use the current program 'y_ConvertTlrcNiftiToTlrcAFNI' to convert the statistical result NIfTI file (which is in talairach space) into .HEAD/.BRIK format while keeping a Talairach View.
9. Use AFNI to view the results and generate the cluster report.
Input:
TlrcNiftiFileName - The file name of NIfTI file in talairach space.
Output:
TlrcNiftiFileName +tlrc.HEAD/BRIK - The .HEAD/.BRIK file which can be
displayed with AFNI in Talairach View.
Thanks for Dr. DU Zhuo-Ying's post about this issue.
Cleofe
Mon, 11/22/2010 - 05:39
Permalink
Regression out
Hi,
Im trying to use the program nº6 and I obtain this error:
ADataDir
ADataDir =
F:\IMATGES\RESTINGS\BORJA\NORMALITZADES_MNI_BORJA_ALFF\DRET_REST1_N_detrend_filtered\FunImgNormalizedDetrendedFiltered\subject001
Regressing Out Covariables:
??? Input argument "ADataDir" is undefined.
Error in ==> rest_Y_RegressOutCovariables at 18
[AllVolume,VoxelSize,theImgFileList, Header] =rest_to4d(ADataDir);
Any suggestion will be appreciate!
Thanks!
YAN Chao-Gan
Mon, 11/22/2010 - 06:28
Permalink
Re
It seems you did not call this functional correctly.
This function has been integrated into REST. You can find a GUI in REST->Utilities->Regress Out Covariables. You can use the GUI much easier.
Best wishes!
Cleofe
Tue, 11/23/2010 - 22:12
Permalink
regress out
Hi,
Anyway, after using the GUI I obtain this error:
Load mask "C:\Users\Cleofé\Desktop\spm5\toolbox\REST2007V1.3_091215\REST2007V1.3_091215\mask\BrainMask_05_53x63x46.img".Warning: Values other than 0 or 1 converted to logical 1.
> In rest_loadmask at 52
In rest_RegressOutCovariates at 27
In rest_RegressOutCovariates_gui>Run_Callback at 238
In gui_mainfcn at 75
In rest_RegressOutCovariates_gui at 26
Build mask. Wait............................................................
Done>>
However, it seems work.
Thanks!
YAN Chao-Gan
Wed, 11/24/2010 - 03:18
Permalink
Re
Hi!
This warning doesn't matter.
YAN Chao-Gan
Sat, 05/07/2011 - 02:02
Permalink
New programs for Shrinking or Enlarging masks
Dear all!
New programs for Shrinking or Enlarging masks: y_MaskShrink.m and y_MaskEnlarge.m
Best wishes!
YAN Chao-Gan
Fri, 01/20/2012 - 17:25
Permalink
New Programs Added
Hi all!
Some new Programs Added (multiple comparison correction, robust regression, Intraclass correlation).
6. Program for performing Gaussian Random Field theory multiple comparison correction like easythresh in FSL: y_GRF_Threshold.m
7. Program for performing robust regression analysis for brain images: y_RobustFit_Image.m
8. Program for calculating the Intraclass correlation coefficient (ICC) for brain images: y_ICC_Image.m
Best,