Skip to content

Commit 9b8e37e

Browse files
committed
RF: DICOMFS to get dicom_path as constructor kwarg
1 parent a2e9564 commit 9b8e37e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

nibabel/cmdline/dicomfs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def __init__(self, *args, **kwargs):
6161
raise RuntimeError(
6262
"fuse module is not available, install it to use DICOMFS")
6363
self.followlinks = kwargs.pop('followlinks', False)
64+
self.dicom_path = kwargs.pop('dicom_path', None)
6465
fuse.Fuse.__init__(self, *args, **kwargs)
6566
self.fhs = {}
6667
return
@@ -225,9 +226,12 @@ def main(args=None):
225226
sys.stderr.write("Please provide two arguments:\n%s\n" % parser.usage)
226227
sys.exit(1)
227228

228-
fs = DICOMFS(dash_s_do='setsingle', followlinks=opts.followlinks)
229+
fs = DICOMFS(
230+
dash_s_do='setsingle',
231+
followlinks=opts.followlinks,
232+
dicom_path=files[0].decode(encoding)
233+
)
229234
fs.parse(['-f', '-s', files[1]])
230-
fs.dicom_path = files[0].decode(encoding)
231235
try:
232236
fs.main()
233237
except fuse.FuseError:

0 commit comments

Comments
 (0)