| Total Complexity | 2 |
| Total Lines | 12 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | from typing import List, Callable |
||
| 2 | from numpy.typing import NDArray |
||
| 3 | |||
| 4 | |||
| 5 | class ImageProcessor: |
||
| 6 | def process(self, image: NDArray, pipeline: List[Callable[[NDArray], NDArray]]) -> NDArray: |
||
| 7 | if len(pipeline) > 0: |
||
| 8 | processor = pipeline[0] |
||
| 9 | pipeline = pipeline[1:] |
||
| 10 | return self.process(processor(image), pipeline) |
||
| 11 | return image |
||
| 12 |