Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mu-map
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tamino Huxohl
mu-map
Commits
69f8a7e9
Commit
69f8a7e9
authored
2 years ago
by
Tamino Huxohl
Browse files
Options
Downloads
Patches
Plain Diff
load as interfile also pipes kwargs to load_dcm
parent
704c8e10
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mu_map/file/util.py
+4
-2
4 additions, 2 deletions
mu_map/file/util.py
with
4 additions
and
2 deletions
mu_map/file/util.py
+
4
−
2
View file @
69f8a7e9
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment