a9fa0782dc1df24bd3e9c9ee9ddd3ab1dc9fd5e0,dipy/segment/mask.py,,segment_from_cfa,#Any#Any#Any#,226

Before Change


    if (np.min(cfa) < 0 or np.max(cfa) > 1):
        raise ValueError("cfa must be between 0 and 1")

    if cfa.shape[-1] != 3:
        raise ValueError("cfa last dimension must be of length 3")

    // Nibabel doesn"t save binary data, so we upcast to something else

After Change


        Binary mask of the segmentation.
    

    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: a9fa0782dc1df24bd3e9c9ee9ddd3ab1dc9fd5e0
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: 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: tiberiu44/TTS-Cube
Commit Name: 288e2868ce5f35a9c8ecf3e3fa913f293adcf7e7
Time: 2018-10-31
Author: boros@adobe.com
File Name: cube/models/vocoder.py
Class Name: BeeCoder
Method Name: learn