Merged
Show file tree
Hide file tree
Changes from all commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Failed to load files.
Original file line numberDiff line numberDiff line change
Expand Up@@ -380,6 +380,7 @@ class Dcm2niixInputSpec(CommandLineInputSpec):
class Dcm2niixOutputSpec(TraitedSpec):
converted_files = OutputMultiPath(File(exists=True))
bvecs = OutputMultiPath(File(exists=True))
mvecs = OutputMultiPath(File(exists=True))
bvals = OutputMultiPath(File(exists=True))
bids = OutputMultiPath(File(exists=True))

Expand DownExpand Up@@ -459,8 +460,8 @@ def _parse_stdout(self, stdout):
return filenames

def _parse_files(self, filenames):
outfiles, bvals, bvecs, bids = [], [], [], []
outtypes = [".bval", ".bvec", ".json", ".txt"]
outfiles, bvals, bvecs, mvecs, bids = [], [], [], [], []
outtypes = [".bval", ".bvec", ".mvec", ".json", ".txt"]
if self.inputs.to_nrrd:
outtypes += [".nrrd", ".nhdr", ".raw.gz"]
else:
Expand All@@ -480,10 +481,13 @@ def _parse_files(self, filenames):
bvals.append(fl)
elif fl.endswith(".bvec"):
bvecs.append(fl)
elif fl.endswith(".mvec"):
mvecs.append(fl)
elif fl.endswith(".json") or fl.endswith(".txt"):
bids.append(fl)
self.output_files = outfiles
self.bvecs = bvecs
self.mvecs = mvecs
self.bvals = bvals
self.bids = bids

Expand All@@ -492,6 +496,7 @@ def _list_outputs(self):
outputs["converted_files"] = self.output_files
outputs["bvecs"] = self.bvecs
outputs["bvals"] = self.bvals
outputs["mvecs"] = self.mvecs
outputs["bids"] = self.bids
return outputs

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -95,6 +95,7 @@ def test_Dcm2niix_outputs():
bvals=dict(),
bvecs=dict(),
converted_files=dict(),
mvecs=dict(),
)
outputs = Dcm2niix.output_spec()

Expand Down