Output : Binary mask of the ROI with voxels that are between the supplied threshold
if len(threshold) != 6:
raise ValueError("threshold must be of length 6")
if (np.min(threshold) < 0 or np.max(threshold) > 1):
After Change
FA = fractional_anisotropy(tensorfit.evals)
FA[np.isnan(FA)] = 0
FA = np.clip(FA, 0, 1) // Clamp the FA to remove degenerate tensors
cfa = color_fa(FA, tensorfit.evecs)