nipy/dipy — pull request #332 by MrBago (2014-02-26 03:33:12+00:00)
Title: A sample nipype interface for fit_tensor

This is what an interface for `dipy_fit_tensor` might look like. It even works with Chris's `nipype_cmd script`!

Please let me know if I made any mistakes implementing the nipype interface, but hopefully there is enough here to get some discussion going.

I think I'll need to re-factor the fit_tensor function again, I'd like to add some IO abstraction so that images can be passed in as either file names or some sort of image objects. Does nipype have anything like this already? Also I'm thinking about how we would best drop the dipy_fit_tensor script, and replace it with nipype_cmd. One way would be for dipy to add nipype as a dependency. Alternatively if our scripts had input and run attributes that might almost be enough to make nipype_cmd work.

Any thoughts @chrisfilo @Garyfallidis @oesteban?

```
fisher ~/.dipy/stanford_hardi$ nipype_cmd dipy.workflows.interfaces DipyFitTensor HARDI150.bvec HARDI150.nii.gz
setting function inputs

bvec = HARDI150.bvec
dwi_data = HARDI150.nii.gz
ignore_exception = False
mask =
min_signal =
nomask =
root =
scale =

ad_map = HARDI150_ad.nii.gz
dirfa_map = HARDI150_dirFA.nii.gz
dummy_trk_file = HARDI150_dummy.trk
fa_map = HARDI150_fa.nii.gz
mask_file = HARDI150_mask.nii.gz
md_map = HARDI150_md.nii.gz
rd_map = HARDI150_rd.nii.gz
t2di = HARDI150_t2di.nii.gz
tensor =
```