Args: data: a dictionary containing the tensor-like data to be processed. The ``keys`` specified in this dictionary must be tensor like arrays that are channel first and have at most three spatial dimensions Returns: a diction
(self, data: Mapping[Hashable, NdarrayOrTensor])
| 2539 | return self |
| 2540 | |
| 2541 | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[Hashable, NdarrayOrTensor]: |
| 2542 | """ |
| 2543 | Args: |
| 2544 | data: a dictionary containing the tensor-like data to be processed. The ``keys`` specified |
| 2545 | in this dictionary must be tensor like arrays that are channel first and have at most |
| 2546 | three spatial dimensions |
| 2547 | |
| 2548 | Returns: |
| 2549 | a dictionary containing the transformed data, as well as any other data present in the dictionary |
| 2550 | """ |
| 2551 | d = dict(data) |
| 2552 | # All the keys share the same random noise |
| 2553 | for key in self.key_iterator(d): |
| 2554 | self.patcher.randomize(d[key]) |
| 2555 | break |
| 2556 | for key in self.key_iterator(d): |
| 2557 | d[key] = self.patcher(d[key], randomize=False) |
| 2558 | return d |
| 2559 | |
| 2560 | |
| 2561 | class RandSimulateLowResolutiond(RandomizableTransform, MapTransform): |
nothing calls this directly
no test coverage detected