nimare.transforms.transform_images

transform_images(images_df, target, masker, metadata_df=None, out_dir=None, overwrite=False)[source]

Generate images of a given type from other image types and write out to files.

Changed in version 0.0.9:

  • [ENH] Add overwrite option to transform_images

New in version 0.0.4.

Parameters
  • images_df (pandas.DataFrame) – DataFrame with paths to images for studies in Dataset.

  • target ({‘z’, ‘p’, ‘beta’, ‘varcope’}) – Target data type.

  • masker (nilearn.input_data.NiftiMasker or similar) – Masker used to define orientation and resolution of images. Specific voxels defined in mask will not be used, and a new masker with _all_ voxels in acquisition matrix selected will be created.

  • metadata_df (pandas.DataFrame or None, optional) – DataFrame with metadata. Rows in this DataFrame must match those in images_df, including the 'id' column.

  • out_dir (str or None, optional) – Path to output directory. If None, use folder containing first image for each study in images_df.

  • overwrite (bool, optional) – Whether to overwrite existing files or not. Default is False.

Returns

images_df (pandas.DataFrame) – DataFrame with paths to new images added.