diff --git a/monai/apps/deepgrow/transforms.py b/monai/apps/deepgrow/transforms.py index ef34172fd1..cfdeb5c87f 100644 --- a/monai/apps/deepgrow/transforms.py +++ b/monai/apps/deepgrow/transforms.py @@ -61,7 +61,7 @@ def __call__(self, data): return d -class AddInitialSeedPointd(Randomizable): +class AddInitialSeedPointd(Randomizable, Transform): """ Add random guidance as initial seed point for a given label. @@ -283,7 +283,7 @@ def __call__(self, data): return d -class AddRandomGuidanced(Randomizable): +class AddRandomGuidanced(Randomizable, Transform): """ Add random guidance based on discrepancies that were found between label and prediction. diff --git a/monai/transforms/croppad/array.py b/monai/transforms/croppad/array.py index 02140aa571..ec4d7f8020 100644 --- a/monai/transforms/croppad/array.py +++ b/monai/transforms/croppad/array.py @@ -314,7 +314,7 @@ def __call__(self, img: np.ndarray): return super().__call__(img=img) -class RandSpatialCrop(Randomizable): +class RandSpatialCrop(Randomizable, Transform): """ Crop image with random size or specific size ROI. It can crop at a random position as center or at the image center. And allows to set the minimum and maximum size to limit the randomly generated ROI. @@ -416,7 +416,7 @@ def __call__(self, img: np.ndarray): return super().__call__(img=img) -class RandSpatialCropSamples(Randomizable): +class RandSpatialCropSamples(Randomizable, Transform): """ Crop image with random size or specific size ROI to generate a list of N samples. It can crop at a random position as center or at the image center. And allows to set @@ -575,7 +575,7 @@ def __call__(self, img: np.ndarray): return cropped -class RandWeightedCrop(Randomizable): +class RandWeightedCrop(Randomizable, Transform): """ Samples a list of `num_samples` image patches according to the provided `weight_map`. @@ -627,7 +627,7 @@ def __call__(self, img: np.ndarray, weight_map: Optional[np.ndarray] = None) -> return results -class RandCropByPosNegLabel(Randomizable): +class RandCropByPosNegLabel(Randomizable, Transform): """ Crop random fixed sized regions with the center being a foreground or background voxel based on the Pos Neg Ratio. diff --git a/monai/transforms/spatial/array.py b/monai/transforms/spatial/array.py index b51e9e51d6..5a31d3c973 100644 --- a/monai/transforms/spatial/array.py +++ b/monai/transforms/spatial/array.py @@ -1009,7 +1009,7 @@ def __call__( return grid if self.as_tensor_output else np.asarray(grid.cpu().numpy()), affine -class RandAffineGrid(Randomizable): +class RandAffineGrid(Randomizable, Transform): """ Generate randomised affine grid. """ @@ -1106,7 +1106,7 @@ def get_transformation_matrix(self) -> Optional[Union[np.ndarray, torch.Tensor]] return self.affine -class RandDeformGrid(Randomizable): +class RandDeformGrid(Randomizable, Transform): """ Generate random deformation grid. """ diff --git a/monai/transforms/utility/array.py b/monai/transforms/utility/array.py index d306b5a88b..26d7afd82f 100644 --- a/monai/transforms/utility/array.py +++ b/monai/transforms/utility/array.py @@ -686,7 +686,7 @@ def __call__(self, img: np.ndarray) -> np.ndarray: return np.stack(result, axis=0) -class AddExtremePointsChannel(Randomizable): +class AddExtremePointsChannel(Randomizable, Transform): """ Add extreme points of label to the image as a new channel. This transform generates extreme point from label and applies a gaussian filter. The pixel values in points image are rescaled