(self, image_key: str, stats_name: str = DataStatsKeys.IMAGE_STATS)
| 199 | """ |
| 200 | |
| 201 | def __init__(self, image_key: str, stats_name: str = DataStatsKeys.IMAGE_STATS) -> None: |
| 202 | if not isinstance(image_key, str): |
| 203 | raise ValueError("image_key input must be str") |
| 204 | |
| 205 | self.image_key = image_key |
| 206 | |
| 207 | report_format = { |
| 208 | ImageStatsKeys.SHAPE: None, |
| 209 | ImageStatsKeys.CHANNELS: None, |
| 210 | ImageStatsKeys.CROPPED_SHAPE: None, |
| 211 | ImageStatsKeys.SPACING: None, |
| 212 | ImageStatsKeys.SIZEMM: None, |
| 213 | ImageStatsKeys.INTENSITY: None, |
| 214 | } |
| 215 | |
| 216 | super().__init__(stats_name, report_format) |
| 217 | self.update_ops(ImageStatsKeys.INTENSITY, SampleOperations()) |
| 218 | |
| 219 | @torch.no_grad() |
| 220 | def __call__(self, data): |
nothing calls this directly
no test coverage detected