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

Method _post_transform

monai/data/dataset.py:354–370  ·  view source on GitHub ↗

Process the data from before the first random transform to the final state ready for evaluation. Args: item_transformed: The data to be transformed (already processed up to the first random transform) Returns: the transformed element through the ran

(self, item_transformed)

Source from the content-addressed store, hash-verified

352 return item_transformed
353
354 def _post_transform(self, item_transformed):
355 """
356 Process the data from before the first random transform to the final state ready for evaluation.
357
358 Args:
359 item_transformed: The data to be transformed (already processed up to the first random transform)
360
361 Returns:
362 the transformed element through the random transforms
363
364 """
365 first_random = self.transform.get_index_of_first(
366 lambda t: isinstance(t, RandomizableTrait) or not isinstance(t, Transform)
367 )
368 if first_random is not None:
369 item_transformed = self.transform(item_transformed, start=first_random)
370 return item_transformed
371
372 def _cachecheck(self, item_transformed):
373 """

Callers 1

_transformMethod · 0.95

Calls 1

get_index_of_firstMethod · 0.80

Tested by

no test coverage detected