Ejemplo n.º 1
0
 def __init__(
     self,
     keys: KeysCollection,
     spatial_size: Union[Sequence[int], int],
     mode: Union[NumpyPadMode, str] = NumpyPadMode.CONSTANT,
 ) -> None:
     super().__init__(keys)
     self.padcropper = ResizeWithPadOrCrop(spatial_size=spatial_size, mode=mode)
Ejemplo n.º 2
0
 def __init__(
     self,
     keys: KeysCollection,
     spatial_size: Union[Sequence[int], int],
     mode: NumpyPadModeSequence = NumpyPadMode.CONSTANT,
     allow_missing_keys: bool = False,
 ) -> None:
     super().__init__(keys, allow_missing_keys)
     self.mode = ensure_tuple_rep(mode, len(self.keys))
     self.padcropper = ResizeWithPadOrCrop(spatial_size=spatial_size)