wrappers - Wrappers for generic imaging functions¶
simple wrappers for external programs
In general, functions are written independent of analysis package (although most of them are only implemented for AFNI right now)
-
wrappers.common.available_method(method_name)[source]¶ ruturn the method for earliest package in
pkg_preferences, if package is available (based onpkg_available())
-
wrappers.common.blur(dset, fwhm, prefix=None)[source]¶ blurs
dsetwith givenfwhmruns 3dmerge to blur dataset to givenfwhmdefaultprefixis to suffixdsetwith_blur%.1fmm
-
wrappers.common.calc(dsets, expr, prefix=None, datum=None)[source]¶ returns a string of an inline
3dcalc-style expressiondsetscan be a single string, or list of strings. Each string indsetswill be labeled ‘a’,’b’,’c’, sequentially. The expressionexpris used directlyIf
prefixis not given, will return a 3dcalc string that can be passed to another AFNI program as a dataset. Otherwise, will create the dataset with the nameprefix
-
wrappers.common.cdf(dset, p)[source]¶ converts p-values to the appropriate statistic for the specified subbrick
-
wrappers.common.cluster(dset, min_distance, min_cluster_size, prefix=None)[source]¶ clusters given
dsetconnecting voxelsmin_distance``mm away with minimum cluster size of ``min_cluster_sizedefault prefix isdsetsuffixed with_clust%d
-
wrappers.common.method_prefs= {'skull_strip': 'fsl'}¶ Specific methods for which the default
pkg_prefsorder should be overriden
-
wrappers.common.pkg_available(pkg_name, required=False)[source]¶ tests if analysis package is available on this machine (e.g., “afni” or “fsl”), and prints an error if
required
-
wrappers.common.pkg_prefs= ['afni', 'fsl']¶ Order that packages are checked for methods
-
wrappers.common.roi_stats(mask, dset)[source]¶ returns ROI stats on
dsetusingmaskas the ROI mask returns a dictionary with the structure:{ ROI: { {keys: stat} ... }, ... }keys:
:mean: :median: :mode: :nzmean: :nzmedian: :nzmode: :nzvoxels: :min: :max: :nzmin: :nzmax: :sigma: :nzsigma: :sum: :nzsum:
-
wrappers.common.skull_strip(dset, suffix='_ns', prefix=None, unifize=True)[source]¶ attempts to cleanly remove skull from
dset