449ce796e6f506a28075f16099c986e298141569,pynets/nodemaker.py,,gen_network_parcels,#Any#Any#Any#Any#,288
Before Change
def gen_network_parcels(parlistfile, network, labels, dir_path):
bna_img = nib.load(parlistfile)
if bna_img.get_data_dtype() != np.dtype(np.int):
bna_data_for_coords = bna_img.get_data()
// Number of parcels:
par_max = np.ceil(np.max(bna_data_for_coords)).astype("int")
After Change
////Get an array of unique parcels
bna_data_for_coords_uniq = np.unique(bna_data)
////Number of parcels:
par_max = len(bna_data_for_coords_uniq) - 1
bna_data = bna_data.astype("int16")
img_stack = []
for idx in range(1, par_max+1):
roi_img = bna_data == bna_data_for_coords_uniq[idx].astype("int16")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: dPys/PyNets
Commit Name: 449ce796e6f506a28075f16099c986e298141569
Time: 2017-11-12
Author: dpisner@utexas.edu
File Name: pynets/nodemaker.py
Class Name:
Method Name: gen_network_parcels
Project Name: dask/dask-image
Commit Name: cbbcea8795e8da754a5b3ffb1a08ef66afd84eef
Time: 2018-09-02
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/_utils.py
Class Name:
Method Name: _ravel_shape_indices
Project Name: ilastik/ilastik
Commit Name: 90652f3ace604fe73144b3d022b6c2acd5993d89
Time: 2019-08-01
Author: emilmelnikov@gmail.com
File Name: ilastik/applets/counting/countingsvr.py
Class Name: SVR
Method Name: writeHDF5