Skip to content

Commit

Permalink
add ToCanonical
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultdvx committed Dec 27, 2024
1 parent 902d7dc commit 1711484
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions clinicadl/transforms/config/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class ImplementedTransform(str, BaseEnum):
Z_NORMALIZATION = "ZNormalization"
MASK = "Mask"
CROP_OR_PAD = "CropOrPad"
TO_CANONICAL = "ToCanonical"
CLAMP = "Clamp"
RESAMPLE = "Resample"
RESIZE = "Resize"
Expand Down
1 change: 1 addition & 0 deletions clinicadl/transforms/config/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
PadConfig,
ResampleConfig,
ResizeConfig,
ToCanonicalConfig,
)
from .spatial_augmentations import (
RandomAffineConfig,
Expand Down
11 changes: 11 additions & 0 deletions clinicadl/transforms/config/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

__all__ = [
"CropOrPadConfig",
"ToCanonicalConfig",
"ResizeConfig",
"ResampleConfig",
"EnsureShapeMultipleConfig",
Expand Down Expand Up @@ -66,6 +67,16 @@ def check_shape(self):
return self


class ToCanonicalConfig(TransformConfig):
"""Config class for ToCanonical transform."""

@computed_field
@property
def name(self) -> ImplementedTransform:
"""The name of the transform."""
return ImplementedTransform.TO_CANONICAL


class ResizeConfig(TransformConfig):
"""Config class for Resize transform."""

Expand Down

0 comments on commit 1711484

Please sign in to comment.