dicom-validator 0.8.0__tar.gz → 0.9.dev0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/PKG-INFO +1 -1
- dicom_validator-0.9.dev0/dicom_validator/__init__.py +1 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/condition.py +0 -1
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/part3_reader.py +0 -1
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/spec_reader/conftest.py +1 -1
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/spec_reader/test_part3_reader.py +11 -11
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/spec_reader/test_part6_reader.py +1 -1
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/test_cmdline_tools.py +1 -1
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/validator/conftest.py +1 -1
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/validator/test_iod_validator.py +30 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/validator/iod_validator.py +1 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator.egg-info/PKG-INFO +1 -1
- dicom_validator-0.8.0/dicom_validator/__init__.py +0 -1
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/LICENSE +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/README.md +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/command_line_utils.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/dump_dcm_info.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/py.typed +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/__init__.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/condition_grammar.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/condition_parser.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/edition_reader.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/enum_parser.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/part4_reader.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/part6_reader.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/serializer.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/spec_reader.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tag_tools.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/__init__.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/spec_reader/__init__.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/spec_reader/test_condition.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/spec_reader/test_condition_parser.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/spec_reader/test_edition_reader.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/spec_reader/test_enum_parser.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/spec_reader/test_part4_reader.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/spec_reader/test_spec_reader.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/utils.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/validator/__init__.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/validator/test_dicom_file_validator.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/validator/test_error_handler.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/validator/test_iod_validator_func_groups.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/validate_iods.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/validator/__init__.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/validator/dicom_file_validator.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/validator/dicom_info.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/validator/error_handler.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/validator/html_error_handler.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/validator/validation_result.py +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator.egg-info/SOURCES.txt +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator.egg-info/dependency_links.txt +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator.egg-info/entry_points.txt +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator.egg-info/requires.txt +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator.egg-info/top_level.txt +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/pyproject.toml +0 -0
- {dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.9.dev0"
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/part3_reader.py
RENAMED
|
@@ -23,7 +23,6 @@ from dicom_validator.spec_reader.spec_reader import (
|
|
|
23
23
|
SpecReaderLookupError,
|
|
24
24
|
)
|
|
25
25
|
|
|
26
|
-
|
|
27
26
|
# Some conditions from the spec are hard to parse with a few general rules.
|
|
28
27
|
# Instead of implementing a full parser for these cases, we may define them here.
|
|
29
28
|
# CAUTION: The same tag may appear with different conditions in different contexts
|
|
@@ -50,7 +50,7 @@ class TestReadPart3:
|
|
|
50
50
|
|
|
51
51
|
@pytest.mark.parametrize(
|
|
52
52
|
"edition,iod_name",
|
|
53
|
-
[("2015b", "Computed Tomography Image IOD"), ("
|
|
53
|
+
[("2015b", "Computed Tomography Image IOD"), ("2026b", "CT Image IOD")],
|
|
54
54
|
indirect=["edition"],
|
|
55
55
|
scope="session",
|
|
56
56
|
)
|
|
@@ -64,7 +64,7 @@ class TestReadPart3:
|
|
|
64
64
|
|
|
65
65
|
@pytest.mark.parametrize(
|
|
66
66
|
"edition,module_nr",
|
|
67
|
-
[("2015b", 27), ("
|
|
67
|
+
[("2015b", 27), ("2026b", 29)],
|
|
68
68
|
indirect=["edition"],
|
|
69
69
|
scope="session",
|
|
70
70
|
)
|
|
@@ -78,7 +78,7 @@ class TestReadPart3:
|
|
|
78
78
|
assert module["ref"] == "C.7.5.1"
|
|
79
79
|
assert module["use"] == "M"
|
|
80
80
|
|
|
81
|
-
@pytest.mark.parametrize("edition", ["2015b", "
|
|
81
|
+
@pytest.mark.parametrize("edition", ["2015b", "2026b"], indirect=True)
|
|
82
82
|
def test_optional_iod_module(self, reader):
|
|
83
83
|
description = reader.iod_description(chapter="A.38.1")
|
|
84
84
|
assert "modules" in description
|
|
@@ -90,7 +90,7 @@ class TestReadPart3:
|
|
|
90
90
|
|
|
91
91
|
@pytest.mark.parametrize(
|
|
92
92
|
"edition,desc_nr",
|
|
93
|
-
[("2015b", 110), ("
|
|
93
|
+
[("2015b", 110), ("2026b", 174)],
|
|
94
94
|
indirect=["edition"],
|
|
95
95
|
scope="session",
|
|
96
96
|
)
|
|
@@ -103,7 +103,7 @@ class TestReadPart3:
|
|
|
103
103
|
|
|
104
104
|
@pytest.mark.parametrize(
|
|
105
105
|
"edition,macro_nr",
|
|
106
|
-
[("2015b", 24), ("
|
|
106
|
+
[("2015b", 24), ("2026b", 29)],
|
|
107
107
|
indirect=["edition"],
|
|
108
108
|
scope="session",
|
|
109
109
|
)
|
|
@@ -155,7 +155,7 @@ class TestReadPart3:
|
|
|
155
155
|
|
|
156
156
|
@pytest.mark.parametrize(
|
|
157
157
|
"edition,desc_nr",
|
|
158
|
-
[("2015b", 9), ("
|
|
158
|
+
[("2015b", 9), ("2026b", 14)],
|
|
159
159
|
indirect=["edition"],
|
|
160
160
|
scope="session",
|
|
161
161
|
)
|
|
@@ -170,7 +170,7 @@ class TestReadPart3:
|
|
|
170
170
|
|
|
171
171
|
@pytest.mark.parametrize(
|
|
172
172
|
"edition,desc_nr, seq_desc_nr",
|
|
173
|
-
[("2015b", 3, 3), ("
|
|
173
|
+
[("2015b", 3, 3), ("2026b", 7, 4)],
|
|
174
174
|
indirect=["edition"],
|
|
175
175
|
scope="session",
|
|
176
176
|
)
|
|
@@ -201,7 +201,7 @@ class TestReadPart3:
|
|
|
201
201
|
|
|
202
202
|
@pytest.mark.parametrize(
|
|
203
203
|
"edition,desc_nr",
|
|
204
|
-
[("2015b", 452), ("
|
|
204
|
+
[("2015b", 452), ("2026b", 672)],
|
|
205
205
|
indirect=["edition"],
|
|
206
206
|
scope="session",
|
|
207
207
|
)
|
|
@@ -211,7 +211,7 @@ class TestReadPart3:
|
|
|
211
211
|
|
|
212
212
|
@pytest.mark.parametrize(
|
|
213
213
|
"edition,include_nr",
|
|
214
|
-
[("2015b", 9), ("
|
|
214
|
+
[("2015b", 9), ("2026b", 10)],
|
|
215
215
|
indirect=["edition"],
|
|
216
216
|
scope="session",
|
|
217
217
|
)
|
|
@@ -244,7 +244,7 @@ class TestReadPart3:
|
|
|
244
244
|
assert enums == [{"val": ["FAILURE", "WARNING", "INFORMATIVE"]}]
|
|
245
245
|
|
|
246
246
|
@pytest.mark.parametrize(
|
|
247
|
-
"edition", ["2015b", "
|
|
247
|
+
"edition", ["2015b", "2026b"], indirect=True, scope="session"
|
|
248
248
|
)
|
|
249
249
|
def test_linked_enum_values(self, reader):
|
|
250
250
|
description = reader.module_description("10.24")
|
|
@@ -257,7 +257,7 @@ class TestReadPart3:
|
|
|
257
257
|
assert tag["enums"] == [{"val": ["CONTINUOUS", "TRIGGERED", "AUTOMATIC"]}]
|
|
258
258
|
|
|
259
259
|
@pytest.mark.parametrize(
|
|
260
|
-
"edition", ["2015b", "
|
|
260
|
+
"edition", ["2015b", "2026b"], indirect=True, scope="session"
|
|
261
261
|
)
|
|
262
262
|
def test_graphic_annotation_sequence(self, reader):
|
|
263
263
|
description = reader.module_description("C.10.5")
|
|
@@ -15,7 +15,7 @@ class TestPart6Reader:
|
|
|
15
15
|
|
|
16
16
|
def test_data_elements(self, dict_reader):
|
|
17
17
|
elements = dict_reader.data_elements()
|
|
18
|
-
assert len(elements) ==
|
|
18
|
+
assert len(elements) == 5266
|
|
19
19
|
|
|
20
20
|
def test_sop_class_uids(self, dict_reader):
|
|
21
21
|
sop_class_uids = dict_reader.sop_class_uids()
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/test_cmdline_tools.py
RENAMED
|
@@ -22,7 +22,7 @@ def dicom_fixture_path(fixture_path):
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
@pytest.mark.order(0)
|
|
25
|
-
@pytest.mark.parametrize("edition", ["2015b", "
|
|
25
|
+
@pytest.mark.parametrize("edition", ["2015b", "2026b"])
|
|
26
26
|
def test_validate_sr(edition, caplog, standard_path, dicom_fixture_path):
|
|
27
27
|
# test also for 2015b to test an issue causing an exception
|
|
28
28
|
rtdose_path = dicom_fixture_path / "rtdose.dcm"
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/validator/conftest.py
RENAMED
|
@@ -21,7 +21,7 @@ from dicom_validator.spec_reader.edition_reader import EditionReader
|
|
|
21
21
|
from dicom_validator.validator.dicom_info import DicomInfo
|
|
22
22
|
from dicom_validator.validator.iod_validator import IODValidator
|
|
23
23
|
|
|
24
|
-
CURRENT_EDITION = "
|
|
24
|
+
CURRENT_EDITION = "2026b"
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
def pytest_configure(config):
|
|
@@ -190,6 +190,36 @@ class TestIODValidator:
|
|
|
190
190
|
result, "Frame of Reference", 0x0020_0052, ErrorCode.TagNotAllowed
|
|
191
191
|
)
|
|
192
192
|
|
|
193
|
+
@pytest.mark.tag_set(
|
|
194
|
+
{
|
|
195
|
+
"SOPClassUID": uid.XRayAngiographicImageStorage,
|
|
196
|
+
"PatientName": "XXX",
|
|
197
|
+
"PatientID": "ZZZ",
|
|
198
|
+
"RescaleIntercept": 0,
|
|
199
|
+
"ModalityLUTSequence": {},
|
|
200
|
+
}
|
|
201
|
+
)
|
|
202
|
+
def test_condition_for_tag_not_allowed_met(self, validator):
|
|
203
|
+
result = validator.validate()
|
|
204
|
+
assert has_tag_error(
|
|
205
|
+
result, "Modality LUT", 0x0028_3000, ErrorCode.TagNotAllowed
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
@pytest.mark.tag_set(
|
|
209
|
+
{
|
|
210
|
+
"SOPClassUID": uid.XRayAngiographicImageStorage,
|
|
211
|
+
"PatientName": "XXX",
|
|
212
|
+
"PatientID": "ZZZ",
|
|
213
|
+
"ModalityLUTSequence": {},
|
|
214
|
+
}
|
|
215
|
+
)
|
|
216
|
+
def test_condition_for_tag_not_allowed_not_met(self, validator):
|
|
217
|
+
"""Regression test for #258."""
|
|
218
|
+
result = validator.validate()
|
|
219
|
+
assert not has_tag_error(
|
|
220
|
+
result, "Modality LUT", 0x0028_3000, ErrorCode.TagNotAllowed
|
|
221
|
+
)
|
|
222
|
+
|
|
193
223
|
@pytest.mark.tag_set(
|
|
194
224
|
{
|
|
195
225
|
"SOPClassUID": uid.EnhancedXAImageStorage,
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/validator/iod_validator.py
RENAMED
|
@@ -518,6 +518,7 @@ class IODValidator:
|
|
|
518
518
|
return True, True
|
|
519
519
|
allowed = (
|
|
520
520
|
condition_type == ConditionType.MandatoryOrUserDefined
|
|
521
|
+
or condition_type == ConditionType.NotAllowedOrUserDefined
|
|
521
522
|
or condition_type == ConditionType.MandatoryOrConditional
|
|
522
523
|
and self._composite_object_matches_condition(condition["other_cond"])
|
|
523
524
|
)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.8.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/condition_grammar.py
RENAMED
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/condition_parser.py
RENAMED
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/edition_reader.py
RENAMED
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/enum_parser.py
RENAMED
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/part4_reader.py
RENAMED
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/part6_reader.py
RENAMED
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/serializer.py
RENAMED
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/spec_reader/spec_reader.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/spec_reader/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/tests/validator/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/validator/dicom_file_validator.py
RENAMED
|
File without changes
|
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/validator/error_handler.py
RENAMED
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/validator/html_error_handler.py
RENAMED
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator/validator/validation_result.py
RENAMED
|
File without changes
|
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{dicom_validator-0.8.0 → dicom_validator-0.9.dev0}/dicom_validator.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|