990702bedcfd4bfd62b3c96f82a26fd8e1b6354a,dipy/segment/mask.py,,segment_from_cfa,#Any#Any#Any#,226

Before Change


    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):
        raise ValueError("threshold must be between 0 and 1")

    if (np.min(cfa) < 0 or np.max(cfa) > 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)

    return np.all(((cfa >= threshold[0::2]) & (cfa <= threshold[1::2]) & ROI[..., None]), axis=-1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: nipy/dipy
Commit Name: 990702bedcfd4bfd62b3c96f82a26fd8e1b6354a
Time: 2013-09-11
Author: Samuel.St-Jean@usherbrooke.ca
File Name: dipy/segment/mask.py
Class Name:
Method Name: segment_from_cfa


Project Name: studioml/studio
Commit Name: 583fbccfb801eeb02e4385d8ad8df62046678450
Time: 2017-08-26
Author: jasonzliang@utexas.edu
File Name: studio/optimizer_plugins/cmaes.py
Class Name: Optimizer
Method Name: __unpack_solution


Project Name: nipy/dipy
Commit Name: a9fa0782dc1df24bd3e9c9ee9ddd3ab1dc9fd5e0
Time: 2013-09-11
Author: Samuel.St-Jean@usherbrooke.ca
File Name: dipy/segment/mask.py
Class Name:
Method Name: segment_from_cfa