Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate_iods.py uses uid_info,json instead of iod_info.json #9

Closed
feher-melos opened this issue Nov 22, 2021 · 2 comments · Fixed by #10
Closed

validate_iods.py uses uid_info,json instead of iod_info.json #9

feher-melos opened this issue Nov 22, 2021 · 2 comments · Fixed by #10

Comments

@feher-melos
Copy link
Contributor

validate_iods.py uses uid_info,json instead of iod_info.json.
This causes the following UID related false errors:

Unknown SOPClassUID (probably retired): 1.2.840.10008.5.1.4.1.1.2 - aborting

Proposed patch:

diff --git a/dcm_spec_tools/spec_reader/edition_reader.py b/dcm_spec_tools/spec_reader/edition_reader.py
index c077928..83d1873 100644
--- a/dcm_spec_tools/spec_reader/edition_reader.py
+++ b/dcm_spec_tools/spec_reader/edition_reader.py
@@ -178,6 +178,10 @@ class EditionReader(object):
     def load_dict_info(cls, json_path):
         return cls.load_info(json_path, cls.dict_info_json)
 
+    @classmethod
+    def load_iod_info(cls, json_path):
+        return cls.load_info(json_path, cls.iod_info_json)
+
     @classmethod
     def load_uid_info(cls, json_path):
         return cls.load_info(json_path, cls.uid_info_json)
diff --git a/dcm_spec_tools/validate_iods.py b/dcm_spec_tools/validate_iods.py
index 79005f7..9353655 100644
--- a/dcm_spec_tools/validate_iods.py
+++ b/dcm_spec_tools/validate_iods.py
@@ -9,7 +9,7 @@ from dcm_spec_tools.validator.dicom_file_validator import DicomFileValidator
 def validate(args, base_path):
     json_path = os.path.join(base_path, 'json')
     dict_info = EditionReader.load_dict_info(json_path)
-    iod_info = EditionReader.load_uid_info(json_path)
+    iod_info = EditionReader.load_iod_info(json_path)
     module_info = EditionReader.load_module_info(json_path)
     log_level = logging.DEBUG if args.verbose else logging.INFO
     validator = DicomFileValidator(iod_info, module_info, dict_info, log_level)
@mrbean-bremen
Copy link
Member

Ok, thanks - I need some tests to catch this kind of typos... sorry for the inconvenience, will fix this tonight.

mrbean-bremen added a commit to mrbean-bremen/dicom-validator that referenced this issue Nov 22, 2021
- add rudimentary test for command line validator
- fixes pydicom#9
mrbean-bremen added a commit to mrbean-bremen/dicom-validator that referenced this issue Nov 22, 2021
- add rudimentary test for command line validator
- fixes pydicom#9
mrbean-bremen added a commit to mrbean-bremen/dicom-validator that referenced this issue Nov 22, 2021
- prepare rudimentary test for command line validator (does not work in CI yet)
- fixes pydicom#9
mrbean-bremen added a commit that referenced this issue Nov 22, 2021
- prepare rudimentary test for command line validator (does not work in CI yet)
- fixes #9
@mrbean-bremen
Copy link
Member

I fixed the issue and got a new release out to avoid having a broken current version. I will consolidate the tests later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants