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

implement utility to load either dicom or interfile to interfile

parent 5f6917dd
No related branches found
No related tags found
No related merge requests found
import os
from mu_map.file.dicom import load_dcm
from mu_map.file.dicom_to_interfile import to_interfile
from mu_map.file.interfile import load_interfile, Interfile
def load_as_interfile(filename: str) -> Interfile:
_, ext = os.path.splitext(filename)
if ext == ".dcm":
return to_interfile(*load_dcm(filename))
return load_interfile(filename)
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