Skip to content

Commit

Permalink
fix#2073
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianIsensee committed Apr 9, 2024
1 parent bef6eea commit 3d99b8d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
ZScoreNormalization, RescaleTo01Normalization, RGBTo01Normalization, ImageNormalization

channel_name_to_normalization_mapping = {
'CT': CTNormalization,
'noNorm': NoNormalization,
'ct': CTNormalization,
'nonorm': NoNormalization,
'zscore': ZScoreNormalization,
'rescale_to_0_1': RescaleTo01Normalization,
'rgb_to_0_1': RGBTo01Normalization
Expand All @@ -17,7 +17,7 @@ def get_normalization_scheme(channel_name: str) -> Type[ImageNormalization]:
If we find the channel_name in channel_name_to_normalization_mapping return the corresponding normalization. If it is
not found, use the default (ZScoreNormalization)
"""
norm_scheme = channel_name_to_normalization_mapping.get(channel_name)
norm_scheme = channel_name_to_normalization_mapping.get(channel_name.casefold())
if norm_scheme is None:
norm_scheme = ZScoreNormalization
# print('Using %s for image normalization' % norm_scheme.__name__)
Expand Down

0 comments on commit 3d99b8d

Please sign in to comment.