SDM   Seed-based d Mapping
formerly "Signed Differential Mapping"
Share on Facebook:   Facebook

SDM tools: imgcalc

Powerful command-line program to easily and quickly conduct cluster analyses such as voxel and cluster height and extent thresholding, or blob and atlas reporting, basic maths (aritmetics, trigonometry and etcetera), basic stats (conversion between t, z, p and etcetera), and other such as setting stereotactic space or masking. Atlas information is based on the AAL atlas for gray matter and on the atlas by Catani, Thiebaut de Schotten et al for white matter (see more details below).

Syntaxis:

imgcalc [input] [arguments]

Arguments:

Cluster analyses
-thr [number] [output] Voxel height thresholding, i.e. y = x1 ≥ x2 ? x1 : 0 for each voxel.
-uthr [number] [output] Voxel height upper-thresholding, i.e. y = x1 ≤= x2 ? x1 : 0 for each voxel.
-pthr [number] [output] Cluster peak thresholding, i.e. y = peak ≥ x2 ? x1 : 0 for each cluster.
-ethr [number] [output] Cluster extent thresholding, i.e. y = size ≥ x2 ? x1 : 0 for each cluster.
-blobs [output] Returns simple blobs information (similar to FSL 'cluster', i.e. without atlas information and breakdown), along with a mask for each blob.
-atlas [output] Returns blobs and atlas information. Information is based on the AAL atlas for gray matter and on the atlas by Catani, Thiebaut de Schotten et al for white matter, which includes structures not present in other atlases such as the different segments of the arcuate and mediate networks or the U and aslant tracts. See citation information for the latter at the bottom of this document.
-sdm Similar to -atlas but adjusted to deal with SDM meta-analytic results.
Simple unary maths
-abs [output] Voxelwise absolute value, i.e. y = abs(x) for each voxel.
-recip [output] Voxelwise reciprocal, i.e. y = 1 / x for each voxel.
-sqr [output] Voxelwise square, i.e. y = x2 for each voxel.
-sqrt [output] Voxelwise square root, i.e. y = sqrt(x) for each voxel.
-exp [output] Voxelwise exponential function, i.e. y = ex for each voxel.
-log [output] Voxelwise natural logarithm, i.e. y = log(x) for each voxel.
-sin [output] Voxelwise sine function, i.e. y = sin(x) for each voxel.
-cos [output] Voxelwise cosine function, i.e. y = cos(x) for each voxel.
-tan [output] Voxelwise tangent function, i.e. y = tan(x) for each voxel.
-asin [output] Voxelwise arc-sine function, i.e. y = asin(x) for each voxel.
-acos [output] Voxelwise arc-cosine function, i.e. y = acos(x) for each voxel.
-atan [output] Voxelwise arc-tangent function, i.e. y = atan(x) for each voxel.
Simple binary maths
-add [input or number] [output] Voxelwise addition, i.e. y = x1 + x2 for each voxel.
-sub [input or number] [output] Voxelwise subtraction, i.e. y = x1 - x2 for each voxel.
-mul [input or number] [output] Voxelwise multiplication, i.e. y = x1 * x2 for each voxel.
-div [input or number] [output] Voxelwise division, i.e. y = x1 / x2 for each voxel.
-pow [input or number] [output] Voxelwise exponentiation, i.e. y = x1 ^ x2 for each voxel.
-rem [input or number] [output] Voxelwise modulus rermainder, i.e. y = x1 % x2 for each voxel.
-max [input or number] [output] Voxelwise maximum (of each pair of values), i.e. y = max(x1, x2) for each voxel.
-min [input or number] [output] Voxelwise minimum (of each pair of values), i.e. y = min(x1, x2) for each voxel.
Simple stats
-set_t [df] Sets volume values as t.
-set_z Sets volume values as z.
-set_p Sets volume values as 1-p.
-set_logp Sets volume values as -log10(p).
-compl [output] Voxelwise probability of the complementary event, i.e. y = 1 - x for each voxel.
-t2z [output] Voxelwise conversion from t to z values, i.e. y = qz(pt(x, df)) for each voxel.
-z2t [df] [output] Voxelwise conversion from z to t values, i.e. y = qt(pz(x), df) for each voxel.
-t2p [output] Voxelwise conversion from t to 1-p values, i.e. y = pt(x, df) for each voxel.
-p2t [df] [output] Voxelwise conversion from 1-p to t values, i.e. y = qt(x, df) for each voxel.
-z2p [output] Voxelwise conversion from z to 1-p values, i.e. y = pz(x) for each voxel.
-p2z [output] Voxelwise conversion from 1-p to z values, i.e. y = qz(x) for each voxel.
-t2logp [output] Voxelwise conversion from t to -log10(p) values, i.e. y = -log10(1 - pt(x, df)) for each voxel.
-logp2t [df] [output] Voxelwise conversion from -log10(p) to t values, i.e. y = qt(1 - 10-x, df) for each voxel.
-z2logp [output] Voxelwise conversion from z to -log10(p) values, i.e. y = -log10(1 - pz(x)) for each voxel.
-logp2z [output] Voxelwise conversion from -log10(p) to z values, i.e. y = qz(1 - 10-x) for each voxel.
-p2logp [output] Voxelwise conversion from 1-p to -log10(p) values, i.e. y = -log10(1 - x) for each voxel.
-logp2p [output] Voxelwise conversion from -log10(p) to 1-p values, i.e. y = 1 - 10-x for each voxel.
Miscellania
[nothing] Does not change the image, but it may be useful to save a *.hdr/img or *.nii file as *.nii.gz.
-set_mni Sets volume space as MNI.
-set_tal Sets volume space as Talairach.
-bin [output] Binarizes the image, i.e. y = x ? 1 : 0 for each voxel.
-mas [input] [output] Uses image2 to mask image1, i.e. y = x2 > 0 ? x1 : 0 for each voxel.

Examples:

imgcalc mySPM -thr 2 mySPM_thr2
imgcalc mySPM_thr2 -ethr 100 mySPM_thr2ext100
imgcalc mySPM_thr2ext100 -atlas mySPM_thr2ext100

References

(white matter atlas 1): Thiebaut de Schotten M, Dell'Acqua F, Forkel SJ, Simmons A, Vergani F, Murphy DG and Catani M. A lateralized brain network for visuospatial attention. Nat Neurosci 2011; 14:1245-1246. link

(white matter atlas 2): Thiebaut de Schotten M, Ffytche DH, Bizzi A, Dell'Acqua F, Allin M, Walshe M, Murray R, Williams SC, Murphy DG and Catani M. Atlasing location, asymmetry and inter-subject variability of white matter tracts in the human brain with MR diffusion tractography. Neuroimage 2011; 54:49-59. link

(white matter atlas 3): Rojkova K, Volle E, Urbanski M, Humbert F, Dell'Acqua F and Thiebaut de Schotten M. Atlasing the frontal lobe connections and their variability due to age and education: a spherical deconvolution tractography study. Brain Struct Funct 2015; in Press. link