Skip to content

Commit

Permalink
bug fix after merging fernando
Browse files Browse the repository at this point in the history
  • Loading branch information
romainVala committed Aug 21, 2023
1 parent 4f06471 commit 10d80ee
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 29 deletions.
13 changes: 0 additions & 13 deletions src/torchio/transforms/augmentation/intensity/random_noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,12 @@ class Noise(IntensityTransform):
"""

def __init__(
<<<<<<< HEAD
self,
mean: Union[float, Dict[str, float]],
std: Union[float, Dict[str, float]],
seed: Union[int, Sequence[int]],
abs_after_noise: bool = False,
**kwargs
=======
self,
mean: Union[float, Dict[str, float]],
std: Union[float, Dict[str, float]],
seed: Union[int, Sequence[int]],
**kwargs,
>>>>>>> 97232165c74061b0fe9e018c5377cb3ed63d67fe
):
super().__init__(**kwargs)
self.mean = mean # type: ignore[assignment]
Expand All @@ -112,13 +104,8 @@ def apply_transform(self, subject: Subject) -> Subject:
mean, std, seed, abs_after_noise = args = self.mean, self.std, self.seed, self.abs_after_noise
for name, image in self.get_images_dict(subject).items():
if self.arguments_are_dict():
<<<<<<< HEAD
values = (arg[name] for arg in args) # type: ignore[index,call-overload] # noqa: E501
mean, std, seed, abs_after_noise = values # type: ignore[assignment] # noqa: E501
=======
values = (arg[name] for arg in args) # type: ignore[index,call-overload] # noqa: B950
mean, std, seed = values # type: ignore[assignment] # noqa: B950
>>>>>>> 97232165c74061b0fe9e018c5377cb3ed63d67fe
with self._use_seed(seed):
assert isinstance(mean, float)
assert isinstance(std, float)
Expand Down
14 changes: 0 additions & 14 deletions src/torchio/transforms/augmentation/spatial/random_affine.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ class RandomAffine(RandomTransform, SpatialTransform):
""" # noqa: B950

def __init__(
<<<<<<< HEAD
self,
scales: TypeOneToSixFloat = 0.1,
degrees: TypeOneToSixFloat = 10,
Expand All @@ -123,19 +122,6 @@ def __init__(
label_interpolation: str = 'nearest',
check_shape: bool = True,
**kwargs
=======
self,
scales: TypeOneToSixFloat = 0.1,
degrees: TypeOneToSixFloat = 10,
translation: TypeOneToSixFloat = 0,
isotropic: bool = False,
center: str = 'image',
default_pad_value: Union[str, float] = 'minimum',
image_interpolation: str = 'linear',
label_interpolation: str = 'nearest',
check_shape: bool = True,
**kwargs,
>>>>>>> 97232165c74061b0fe9e018c5377cb3ed63d67fe
):
super().__init__(**kwargs)
self.isotropic = isotropic
Expand Down
4 changes: 2 additions & 2 deletions src/torchio/transforms/preprocessing/intensity/rescale.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class RescaleIntensity(NormalizationTransform):
def __init__(
self,
out_min_max: TypeRangeFloat = (0, 1),
percentiles: TypeRangeFloat = (1, 99),
percentiles: TypeRangeFloat = (1, 100),
masking_method: TypeMaskingMethod = None,
in_min_max: Optional[Tuple[float, float]] = None,
in_min_max: Optional[TypeRangeFloat] = None,
**kwargs
):
super().__init__(masking_method=masking_method, **kwargs)
Expand Down

0 comments on commit 10d80ee

Please sign in to comment.