def METHOD_NAME(self):
    if isinstance(self.data, nib.Nifti1Image):
        tensor = self.data.get_fdata(dtype=np.float32)
        if tensor.ndim == 3:
            tensor = tensor[np.newaxis]
        elif tensor.ndim == 5:
            tensor = tensor.transpose(3, 4, 0, 1, 2)
            # Assume a unique timepoint
            tensor = tensor[0]
        data = ScalarImage(tensor=tensor, affine=self.data.affine)
        subject = self._get_subject_from_image(data)
        self.is_nib = True
    elif isinstance(self.data, (np.ndarray, torch.Tensor)):
        subject = self._parse_tensor(self.data)
        self.is_array = isinstance(self.data, np.ndarray)
        self.is_tensor = True
    elif isinstance(self.data, Image):
        subject = self._get_subject_from_image(self.data)
        self.is_image = True
    elif isinstance(self.data, Subject):
        subject = self.data
    elif isinstance(self.data, sitk.Image):
        subject = self._get_subject_from_sitk_image(self.data)
        self.is_sitk = True
    elif isinstance(self.data, dict):  # e.g. Eisen or MONAI dicts
        if self.keys is None:
            message = (
                'If the input is a dictionary, a value for "include" must'
                ' be specified when instantiating the transform. See the'
                ' docs for Transform:'
                ' https://torchio.readthedocs.io/transforms/transforms.html#torchio.transforms.Transform'  # noqa: B950
            )
            raise RuntimeError(message)
        subject = self._get_subject_from_dict(
            self.data,
            self.keys,
            self.label_keys,
        )
        self.is_dict = True
    else:
        raise ValueError(f'Input type not recognized: {type(self.data)}')
    assert isinstance(subject, Subject)
    return subject