clinicadl.transforms.extraction.Image¶
- class clinicadl.transforms.extraction.Image[source]¶
Transform class for full image extraction, which is equivalent to no extraction.
Adds the following keys to the input
DataPoint:sample_type:"image"sample_position:NoneNot relevant here. Only for consistency.
- property sample_type: str¶
The type of the sample returned by this extraction, among {“image”, “slice”, “patch”}.
- __call__(data_point: DataPointT, sample_index: int | None = None) DataPointT | Generator[DataPointT, None, None]¶
Extracts samples from a
DataPointobject and returns a generator, or extracts a single sample and returns aDataPoint.Samples are extracted from every images and masks in the input
DataPoint.- Parameters:
- Returns:
Union[DataPoint, Generator[DataPoint, None, None]] – A new
DataPoint, with the extracted sample, and some new information about the extraction (e.g., the sample position), or a generator of suchDataPoints.- Raises:
IndexError – If
sample_indexis greater or equal to the number of samples in the image.