We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c2a4ba commit d91f6d2Copy full SHA for d91f6d2
nipype/interfaces/cat12/preprocess.py
@@ -8,6 +8,7 @@
8
isdefined,
9
File,
10
Str,
11
+ ImageFile,
12
)
13
from nipype.interfaces.cat12.base import Cell
14
@@ -23,7 +24,7 @@
23
24
25
class CAT12SegmentInputSpec(SPMCommandInputSpec):
26
in_files = InputMultiPath(
- ImageFileSPM(exists=True),
27
+ ImageFile(exists=True),
28
field="data",
29
desc="file to segment",
30
mandatory=True,
@@ -559,6 +560,8 @@ def _format_arg(self, opt, spec, val):
559
560
"""Convert input to appropriate format for spm"""
561
if opt == "in_files":
562
if isinstance(val, list):
563
+ if '.nii.gz' in val[0]:
564
+ return scans_for_fnames(val, keep4d=True)
565
return scans_for_fnames(val)
566
else:
567
return scans_for_fname(val)
@@ -571,7 +574,8 @@ def _list_outputs(self):
571
574
outputs = self._outputs().get()
572
575
f = self.inputs.in_files[0]
573
576
pth, base, ext = split_filename(f)
-
577
+ if '.nii.gz' in f:
578
+ f = f[:-3]
579
outputs["mri_images"] = [
580
str(mri) for mri in Path(pth).glob("mri/*") if mri.is_file()
581
]
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments