Skip to content

Commit dcd8f3c

Browse files
authored
Maintenance updates (#991)
* Update type hints * Add UIDs for 2025b of the DICOM Standard * Add __all__ to `__init__` and `status` modules
1 parent c22be4b commit dcd8f3c

35 files changed

+748
-761
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
<!--
2-
Please prefix your PR title with [WIP] for PRs that are in
3-
progress and [MRG] when you consider them ready for review.
4-
-->
1+
<!-- Please use Github's 'Draft Pull Request' for PRs that are in-progress -->
52
#### Reference issue
63
The issue describing the bug or feature that this PR addresses.
74

docs/changelog/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Release Notes
77
.. toctree::
88
:maxdepth: 1
99

10+
v3.0.0
1011
v2.1.1
1112
v2.1.0
1213
v2.0.1

docs/changelog/v2.2.0.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/changelog/v3.0.0.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55

66
The major breaking changes with the version 3.0 release are:
77

8-
* Support for pydicom v3
9-
* Changed ``StoragePresentationContexts`` to match DCMTK implementation
10-
* Some presentation contexts were replaced
8+
* Minimum required pydicom version is 3.0
9+
* Changed :attr:`~pynetdicom.presentation.StoragePresentationContexts` to match DCMTK
10+
implementation
11+
12+
Changes
13+
-------
14+
15+
* Move and Get SCPs are now limited to a maximum of 65535 matches (:issue:`982`)
16+
* Minimum supported pydicom version is 3.0 (:issue:`981`)
17+
* Added support for Python 3.13
18+
* Updated SOP classes to version 2025b of the DICOM Standard

docs/reference/sop_classes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,15 @@ Storage
286286
General32bitECGWaveformStorage
287287
GrayscalePlanarMPRVolumetricPresentationStateStorage
288288
GrayscaleSoftcopyPresentationStateStorage
289+
HeightMapSegmentationStorage
289290
HemodynamicWaveformStorage
290291
ImplantationPlanSRStorage
291292
IntraocularLensCalculationsStorage
292293
IntravascularOpticalCoherenceTomographyImageStorageForPresentation
293294
IntravascularOpticalCoherenceTomographyImageStorageForProcessing
294295
KeratometryMeasurementsStorage
295296
KeyObjectSelectionDocumentStorage
297+
LabelMapSegmentationStorage
296298
LegacyConvertedEnhancedCTImageStorage
297299
LegacyConvertedEnhancedMRImageStorage
298300
LegacyConvertedEnhancedPETImageStorage
@@ -381,6 +383,9 @@ Storage
381383
VLSlideCoordinatesMicroscopicImageStorage
382384
VLWholeSlideMicroscopyImageStorage
383385
VolumeRenderingVolumetricPresentationStateStorage
386+
WaveformAcquisitionPresentationStateStorage
387+
WaveformAnnotationSRStorage
388+
WaveformPresentationStateStorage
384389
WideFieldOphthalmicPhotography3DCoordinatesImageStorage
385390
WideFieldOphthalmicPhotographyStereographicProjectionImageStorage
386391
XAPerformedProcedureProtocolStorage

pynetdicom/__init__.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,43 @@ def debug_logger() -> None:
8181
formatter = logging.Formatter("%(levelname).1s: %(message)s")
8282
handler.setFormatter(formatter)
8383
logger.addHandler(handler)
84+
85+
86+
__all__ = [
87+
"__version__",
88+
"PYNETDICOM_UID_PREFIX",
89+
"PYNETDICOM_IMPLEMENTATION_VERSION",
90+
"PYNETDICOM_IMPLEMENTATION_UID",
91+
"evt",
92+
"AE",
93+
"ALL_TRANSFER_SYNTAXES",
94+
"DEFAULT_TRANSFER_SYNTAXES",
95+
"build_context",
96+
"build_role",
97+
"AllStoragePresentationContexts",
98+
"ApplicationEventLoggingPresentationContexts",
99+
"BasicWorklistManagementPresentationContexts",
100+
"ColorPalettePresentationContexts",
101+
"DefinedProcedureProtocolPresentationContexts",
102+
"DisplaySystemPresentationContexts",
103+
"HangingProtocolPresentationContexts",
104+
"ImplantTemplatePresentationContexts",
105+
"InstanceAvailabilityPresentationContexts",
106+
"MediaCreationManagementPresentationContexts",
107+
"MediaStoragePresentationContexts",
108+
"ModalityPerformedPresentationContexts",
109+
"NonPatientObjectPresentationContexts",
110+
"PrintManagementPresentationContexts",
111+
"ProcedureStepPresentationContexts",
112+
"ProtocolApprovalPresentationContexts",
113+
"QueryRetrievePresentationContexts",
114+
"RelevantPatientInformationPresentationContexts",
115+
"RTMachineVerificationPresentationContexts",
116+
"StoragePresentationContexts",
117+
"StorageCommitmentPresentationContexts",
118+
"SubstanceAdministrationPresentationContexts",
119+
"UnifiedProcedurePresentationContexts",
120+
"VerificationPresentationContexts",
121+
"register_uid",
122+
"debug_logger",
123+
]

pynetdicom/_config.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""pynetdicom configuration options"""
22

3-
from typing import Optional, Tuple, Dict, Callable, Any
3+
from typing import Callable, Any
44

55
from pynetdicom._validators import validate_ae, validate_ui
66

@@ -170,7 +170,7 @@
170170
"""
171171

172172

173-
WINDOWS_TIMER_RESOLUTION: Optional[float] = 1
173+
WINDOWS_TIMER_RESOLUTION: float | None = 1
174174
"""Set the minimum timer resolution for Microsoft Windows.
175175
176176
.. versionadded:: 2.0
@@ -195,7 +195,7 @@
195195
"""
196196

197197

198-
CODECS: Tuple[str, ...] = ("ascii",)
198+
CODECS: tuple[str, ...] = ("ascii",)
199199
"""Customise the codecs used to decode text values.
200200
201201
.. versionadded:: 2.0
@@ -260,7 +260,7 @@
260260
"""
261261

262262

263-
VALIDATORS: Dict[str, Callable[[Any], Tuple[bool, str]]] = {
263+
VALIDATORS: dict[str, Callable[[Any], tuple[bool, str]]] = {
264264
"AE": validate_ae,
265265
"UI": validate_ui,
266266
}
@@ -269,7 +269,7 @@
269269
.. versionadded:: 2.0
270270
271271
**AE**
272-
Function signature: ``def func(value: str) -> Tuple[bool, str]``
272+
Function signature: ``def func(value: str) -> tuple[bool, str]``
273273
274274
Where `value` is the AE title to be validated as a :class:`str`.
275275
@@ -279,7 +279,7 @@
279279
about why validation has failed.
280280
281281
**UI**
282-
Function signature: ``def func(value: pydicom.uid.UID) -> Tuple[bool, str]``
282+
Function signature: ``def func(value: pydicom.uid.UID) -> tuple[bool, str]``
283283
284284
Where `value` is the :class:`~pydicom.uid.UID` to be validated.
285285

pynetdicom/_globals.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"1.2.840.10008.1.2.4.94", # JPIP Referenced
4646
"1.2.840.10008.1.2.4.95", # JPIP Referenced Deflate
4747
"1.2.840.10008.1.2.4.100", # MPEG2 Main Profile / Main Level
48+
"1.2.840.10008.1.2.4.100.1", # Fragmentable MPEG2 Main Profile / Main Level
4849
"1.2.840.10008.1.2.4.101", # MPEG2 Main Profile / High Level
4950
"1.2.840.10008.1.2.4.101.1", # Fragmentable MPEG2 Main Profile / High Level
5051
"1.2.840.10008.1.2.4.102", # MPEG-4 AVC/H.264 High Profile / Level 4.1
@@ -59,12 +60,19 @@
5960
"1.2.840.10008.1.2.4.106.1", # Fragmentable MPEG-4 AVC/H.264 Stereo High Profile
6061
"1.2.840.10008.1.2.4.107", # HEVC/H.265 Main Profile / Level 5.1
6162
"1.2.840.10008.1.2.4.108", # HEVC/H.265 Main 10 Profile / Level 5.1
63+
"1.2.840.10008.1.2.4.110", # JPEG XL Lossless
64+
"1.2.840.10008.1.2.4.111", # JPEG XL JPEG Recompression
65+
"1.2.840.10008.1.2.4.112", # JPEG XL
6266
"1.2.840.10008.1.2.4.201", # High-Throughput JPEG 2000 Lossless
6367
"1.2.840.10008.1.2.4.202", # High-Throughput JPEG 2000 RPCL
6468
"1.2.840.10008.1.2.4.203", # High-Throughput JPEG 2000
6569
"1.2.840.10008.1.2.4.204", # JPIP HT2K Referenced
6670
"1.2.840.10008.1.2.4.205", # JPIP HTJ2k Referenced Deflate
6771
"1.2.840.10008.1.2.5", # RLE Lossless
72+
"1.2.840.10008.1.2.7.1", # SMPTE ST 2110-20 Uncompressed Progressive Active Video
73+
"1.2.840.10008.1.2.7.2", # SMPTE ST 2110-20 Uncompressed Interlaced Active Video
74+
"1.2.840.10008.1.2.7.3", # SMPTE ST 2110-30 PCM Digital Audio
75+
"1.2.840.10008.1.2.8.1", # Deflated Image Frame Compression
6876
]
6977
"""All current transfer syntaxes and explicit VR big endian.
7078
@@ -100,12 +108,19 @@
100108
* Fragmentable MPEG-4 AVC/H.264 Stereo High Profile
101109
* HEVC/H.265 Main Profile / Level 5.1
102110
* HEVC/H.265 Main 10 Profile / Level 5.1
111+
* JPEG XL Lossless
112+
* JPEG XL JPEG Recompression
113+
* JPEG XL
103114
* High-Throughput JPEG 2000 Lossless
104115
* High-Throughput JPEG 2000 with RPCL Lossless
105116
* High-Throughput JPEG 2000
106117
* JPIP HTK2K Referenced
107118
* JPIP HTK2K Referenced Deflate
108119
* RLE Lossless
120+
* SMPTE ST 2110-20 Uncompressed Progressive Active Video
121+
* SMPTE ST 2110-20 Uncompressed Interlaced Active Video
122+
* SMPTE ST 2110-30 PCM Digital Audio
123+
* Deflated Image Frame Compression
109124
"""
110125

111126
# The association operation modes

0 commit comments

Comments
 (0)