Batching Diffusion Tensor Imaging Processing

Hi people,
In short, I’d like to write a batch code to calculate Diffusion Tensors and FA for multiple DTI .nii data.
I want to replicate steps in this tutorial DTI-tutorial automatically. I will also need to convert all of my files(with associated bval and bvec) to nrrd files. I know how to do the steps using GUI, but couldn’t find a clue on how to pass those paramteres in a batch python code.
Any Help?