(self, img)
| 284 | self._set_attributes(locals()) |
| 285 | |
| 286 | def apply_image(self, img): |
| 287 | if img.ndim == 3: |
| 288 | padding = ((self.y0, self.y1), (self.x0, self.x1), (0, 0)) |
| 289 | else: |
| 290 | padding = ((self.y0, self.y1), (self.x0, self.x1)) |
| 291 | return np.pad( |
| 292 | img, |
| 293 | padding, |
| 294 | mode="constant", |
| 295 | constant_values=self.pad_value, |
| 296 | ) |
| 297 | |
| 298 | def apply_segmentation(self, img): |
| 299 | if img.ndim == 3: |
nothing calls this directly
no outgoing calls
no test coverage detected