Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions monai/apps/deepgrow/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down
8 changes: 4 additions & 4 deletions monai/transforms/croppad/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`.

Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions monai/transforms/spatial/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion monai/transforms/utility/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down