ae9cf55f6a5775a0d39a869166e8b33d4f39c273,region_properties.py,RegionProperties,__compute_mask,#RegionProperties#,59
Before Change
mask_temp = 1 - self.seg
mask_temp[mask_temp < 0.5] = False
mask_temp[mask_temp >= 0.5] = True
mask_temp = np.tile(mask_temp, [1, 1, 1, self.img.shape[3]])
masked_array = ma.masked_array(self.img, mask_temp)
return masked_array.reshape(-1, masked_array.shape[-1])
def centre_of_mass(self):
After Change
// TODO: check whether this works for probabilities type
foreground_selector = np.where((self.seg > 0).reshape(-1))[0]
probs = self.seg.reshape(-1)[foreground_selector]
regions = np.zeros((foreground_selector.shape[0], self.img_channels))
for i in np.arange(self.img_channels):
regions[:,i] = self.img[..., i].reshape(-1)[foreground_selector]
return regions, probs
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: NifTK/NiftyNet
Commit Name: ae9cf55f6a5775a0d39a869166e8b33d4f39c273
Time: 2017-04-12
Author: wenqi.li@ucl.ac.uk
File Name: region_properties.py
Class Name: RegionProperties
Method Name: __compute_mask
Project Name: keras-team/keras
Commit Name: 45a10bc6d708fade197a37bfbc62312caf70e6a7
Time: 2017-02-17
Author: francois.chollet@gmail.com
File Name: keras/layers/convolutional_recurrent.py
Class Name: ConvLSTM2D
Method Name: get_constants
Project Name: CellProfiler/CellProfiler
Commit Name: 95f1ce19437e1e340b078baf6090232b8d88d360
Time: 2010-09-22
Author: afraser@1fc53939-2000-0410-845c-e8453a809027
File Name: imagej/tests/test_ijbridge.py
Class Name:
Method Name: