Skip to content
Snippets Groups Projects
Commit 1cd6a5a2 authored by Tamino Huxohl's avatar Tamino Huxohl
Browse files

add global variable for dicom file extension

parent e0eafaf3
No related branches found
No related tags found
No related merge requests found
import os
from mu_map.file.dicom import load_dcm, load_dcm_img
from mu_map.file.dicom import load_dcm, load_dcm_img, EXTENSION_DICOM
from mu_map.file.dicom_to_interfile import to_interfile
from mu_map.file.interfile import load_interfile, load_interfile_img, Interfile
def is_dicom(filename: str):
_, ext = os.path.splitext(filename)
return ext == ".ext"
return ext == EXTENSION_DICOM
def load_as_interfile(filename: str) -> Interfile:
if is_dicom(filename):
......
......@@ -22,6 +22,10 @@ Thus, when a DICOM image is updated, UIDs have to be changed for
which the following prefix is used.
"""
UID_PREFIX = "1.2.826.0.1.3680043.2.521."
"""
Default extension of dicom files.
"""
EXTENSION_DICOM = ".dcm"
def load_dcm(filename: str) -> Tuple[pydicom.dataset.FileDataset, np.ndarray]:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment