clinicaio.image.Image#

class clinicaio.image.Image#

An image from a BIDS dataset. You can obtain one by querying from an existing dataset, or by writing a new dataset in which case you will likely want to create the NIFTI and eventually companion files, using get_nifti_image_path() and get_image_companion_path().

parent_session: clinicaio.session.Session#
data_type: clinicaio.types.DataType#
nifti_extension: clinicaio.types.FileExtension#
entities: clinicaio.entities.Entities#
scan_info: ImageScanInfo#

Non-empty only if enabled when reading the dataset with BIDSDataset.populate_from_dir().

suffix: clinicaio.types.Suffix | None = None#
property json_sidecar: dict[str, Any]#

Obtains the content of this image’s JSON sidecar file, as defined in the BIDS specification.

Raises:
  • OSError – if the JSON sidecar does not exist

  • ValueError – if the JSON sidecar’s content is invalid

Return type:

dict[str, Any]

Methods#

get_nifti_image_path(→ pathlib.Path)

Returns the full path to this image's NIFTI file

get_image_companion_path(→ pathlib.Path)

BIDS is a format centered around organizing NIFTI image files, but NIFTI does not include