MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / __call__

Method __call__

monai/transforms/intensity/array.py:371–381  ·  view source on GitHub ↗

Apply the transform to `img`.

(self, img: NdarrayOrTensor)

Source from the content-addressed store, hash-verified

369 return img
370
371 def __call__(self, img: NdarrayOrTensor) -> NdarrayOrTensor:
372 """
373 Apply the transform to `img`.
374 """
375 img = convert_to_tensor(img, track_meta=get_track_meta(), dtype=self.dtype)
376 if self.channel_wise:
377 for i, d in enumerate(img):
378 img[i] = self._stdshift(d) # type: ignore
379 else:
380 img = self._stdshift(img)
381 return img
382
383
384class RandStdShiftIntensity(RandomizableTransform):

Callers

nothing calls this directly

Calls 3

_stdshiftMethod · 0.95
convert_to_tensorFunction · 0.90
get_track_metaFunction · 0.90

Tested by

no test coverage detected