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

Method __call__

monai/transforms/inverse_batch_transform.py:147–159  ·  view source on GitHub ↗
(self, data: dict | list)

Source from the content-addressed store, hash-verified

145 self.fill_value = fill_value
146
147 def __call__(self, data: dict | list):
148 d: dict | list
149 if len(self.keys) == 1 and self.keys[0] is None:
150 # it doesn't support `None` as the key
151 d = data
152 else:
153 if not isinstance(data, dict):
154 raise TypeError("input data is not a dictionary, but specified keys to decollate.")
155 d = {}
156 for key in self.key_iterator(data):
157 d[key] = data[key]
158
159 return decollate_batch(d, detach=self.detach, pad=self.pad_batch, fill_value=self.fill_value)
160
161
162DecollateD = DecollateDict = Decollated

Callers

nothing calls this directly

Calls 2

decollate_batchFunction · 0.90
key_iteratorMethod · 0.80

Tested by

no test coverage detected