990702bedcfd4bfd62b3c96f82a26fd8e1b6354a,dipy/segment/mask.py,,segment_from_cfa,#Any#Any#Any#,226
Before Change
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):
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)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
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: 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: 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: hyperspy/hyperspy
Commit Name: 6b841f480a3ef7c8d225b3ad833ecf71790997ab
Time: 2016-07-12
Author: frandelapena@gmail.com
File Name: hyperspy/component.py
Class Name: Parameter
Method Name: as_signal