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

Class _TestCompose

tests/data/test_image_dataset.py:49–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48
49class _TestCompose(Compose):
50
51 def __call__(self, data, meta, lazy):
52 data = self.transforms[0](data) # ensure channel first
53 data = self.transforms[1](data, lazy=lazy) # spacing
54 meta = data.meta
55 if len(self.transforms) == 3:
56 return self.transforms[2](data), meta # image contrast
57 return data, meta
58
59
60class TestImageDataset(unittest.TestCase):

Callers 1

test_use_caseMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_use_caseMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…