Skip to content

Commit

Permalink
Merge pull request #39 from ImageMarkup/isic-123-add-mosaic-image-type
Browse files Browse the repository at this point in the history
Add RCM mosaic image type
  • Loading branch information
danlamanna committed Jul 11, 2024
2 parents 842da5c + b73b709 commit 84278cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions isic_metadata/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class ImageTypeEnum(str, Enum):
# Note that RCM types need to be added to validate_rcm_fields
rcm_macroscopic = "RCM: macroscopic"
rcm_tile = "RCM: tile"
rcm_mosaic = "RCM: mosaic"


class DermoscopicTypeEnum(str, Enum):
Expand Down
6 changes: 5 additions & 1 deletion isic_metadata/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,11 @@ def validate_rcm_fields(self) -> MetadataRow:
if not self.image_type:
raise error_missing_field("rcm_case_id", "image_type")

if self.image_type not in [ImageTypeEnum.rcm_macroscopic, ImageTypeEnum.rcm_tile]:
if self.image_type not in [
ImageTypeEnum.rcm_macroscopic,
ImageTypeEnum.rcm_tile,
ImageTypeEnum.rcm_mosaic,
]:
raise error_incompatible_fields(
"rcm_case_id", "image_type", field2_value=ImageTypeEnum.rcm_macroscopic
)
Expand Down

0 comments on commit 84278cf

Please sign in to comment.