nimare.transforms
.ImagesToCoordinates¶
- class ImagesToCoordinates(merge_strategy='fill', cluster_threshold=None, remove_subpeaks=False, two_sided=False, min_distance=8.0, z_threshold=3.1)[source]¶
Bases:
nimare.base.Transformer
Transformer from images to coordinates.
- Parameters
merge_strategy ({‘fill’, ‘replace’, ‘demolish’}, optional) – strategy on how to incorporate the generated coordinates with possible pre-existing coordinates. The three different strategies are ‘fill’, ‘replace’, and ‘demolish’. Default=’fill’. - ‘fill’: only add coordinates to study contrasts that
do not have coordinates. If a study contrast has both image and coordinate data, the original coordinate data will be kept.
‘replace’: replace existing coordinates with coordinates generated by this function. If a study contrast only has coordinate data and no images or if the statistical threshold is too high for nimare to detect any peaks the original coordinates will be kept.
‘demolish’: only keep generated coordinates and discard any study contrasts with coordinate data, but no images.
cluster_threshold (
int
or None, optional) – Cluster size threshold, in voxels. Default=None.remove_subpeaks (
bool
, optional) – If True, removes subpeaks from the cluster results. Default=False.two_sided (
bool
, optional) – Whether to employ two-sided thresholding or to evaluate positive values only. Default=False.min_distance (
float
, optional) – Minimum distance between subpeaks in mm. Default=8mm.z_threshold (
float
) – Cluster forming z-scale threshold. Default=3.1.
Notes
The raw Z and/or P maps are not corrected for multiple comparisons, uncorrected z-values and/or p-values are used for thresholding.
- set_params(**params)[source]¶
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each component of a nested object.- Returns
self
- transform(dataset)[source]¶
Create coordinate peaks from statistical images.
- Parameters
dataset (
nimare.dataset.Dataset
) – Dataset with z maps and/or p maps that can be converted to coordinates.- Returns
dataset (
nimare.dataset.Dataset
) – Dataset with coordinates generated from images and metadata indicating origin of coordinates (‘original’ or ‘nimare’).