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: NiMAREBase

Transformer from images to coordinates.

Added in version 0.0.8.

Parameters:
  • merge_strategy ({"fill", "replace", "demolish"}, optional) –

    Strategy for how to incorporate the generated coordinates with possible pre-existing coordinates. The available options are

    ”fill” (default)

    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.

Methods

get_params([deep])

Get parameters for this estimator.

load(filename[, compressed])

Load a pickled class instance from file.

save(filename[, compress])

Pickle the class instance to the provided file.

set_params(**params)

Set the parameters of this estimator.

transform(dataset)

Create coordinate peaks from statistical images.

get_params(deep=True)[source]

Get parameters for this estimator.

Parameters:

deep (bool, default=True) – If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns:

params – Parameter names mapped to their values.

Return type:

dict

classmethod load(filename, compressed=True)[source]

Load a pickled class instance from file.

Parameters:
  • filename (str) – Name of file containing object.

  • compressed (bool, default=True) – If True, the file is assumed to be compressed and gzip will be used to load it. Otherwise, it will assume that the file is not compressed. Default = True.

Returns:

obj – Loaded class object.

Return type:

class object

save(filename, compress=True)[source]

Pickle the class instance to the provided file.

Parameters:
  • filename (str) – File to which object will be saved.

  • compress (bool, optional) – If True, the file will be compressed with gzip. Otherwise, the uncompressed version will be saved. Default = True.

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.

Return type:

self

transform(dataset)[source]

Create coordinate peaks from statistical images.

Parameters:

dataset (Dataset) – Dataset with z maps and/or p maps that can be converted to coordinates.

Returns:

dataset – Dataset with coordinates generated from images and metadata indicating origin of coordinates (‘original’ or ‘nimare’).

Return type:

Dataset

Examples using nimare.transforms.ImagesToCoordinates

Transform images into coordinates

Transform images into coordinates

Compare image and coordinate based meta-analyses

Compare image and coordinate based meta-analyses