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

load as interfile also pipes kwargs to load_dcm

parent 704c8e10
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ from mu_map.file.dicom import is_dicom, load_dcm, load_dcm_img
from mu_map.file.interfile import load_interfile, load_interfile_img, Interfile
def load_as_interfile(filename: str) -> Interfile:
def load_as_interfile(filename: str, **kwargs) -> Interfile:
"""
Load a file as an Interfile image even if it is
in DICOM format.
......@@ -14,13 +14,15 @@ def load_as_interfile(filename: str) -> Interfile:
----------
filename: str
the file to be loaded in Interfile format
kwargs
parameters passed to load_dcm if the file is a DICOM file
Returns
-------
Interfile
"""
if is_dicom(filename):
return dicom_to_interfile(*load_dcm(filename))
return dicom_to_interfile(*load_dcm(filename, **kwargs))
else:
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