Skip to content

ENH: Add colorFA output to DIPY DTI interface #2695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions nipype/interfaces/dipy/tensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class DTIOutputSpec(TraitedSpec):
md_file = File(exists=True)
rd_file = File(exists=True)
ad_file = File(exists=True)
color_fa_file = File(exists=True)


class DTI(DipyDiffusionInterface):
Expand Down Expand Up @@ -62,7 +63,7 @@ def _run_interface(self, runtime):
IFLOGGER.info('DTI parameters image saved as %s', out_file)

# FA MD RD and AD
for metric in ["fa", "md", "rd", "ad"]:
for metric in ["fa", "md", "rd", "ad", "color_fa"]:
data = getattr(ten_fit, metric).astype("float32")
out_name = self._gen_filename(metric)
nb.Nifti1Image(data, affine).to_filename(out_name)
Expand All @@ -74,7 +75,7 @@ def _list_outputs(self):
outputs = self._outputs().get()
outputs['out_file'] = self._gen_filename('dti')

for metric in ["fa", "md", "rd", "ad"]:
for metric in ["fa", "md", "rd", "ad", "color_fa"]:
outputs["{}_file".format(metric)] = self._gen_filename(metric)

return outputs
Expand Down