a59350bf9cc20c9e02e2397d31bbf87848db8f9e,niftynet/evaluation/region_properties.py,RegionProperties,glcm,#RegionProperties#,90

Before Change


        for m in range(0, self.img.shape[4]):
            shifted_image = []
            for n in range(0, self.neigh+1):
                new_img = np.multiply(self.seg, self.img[..., m:m+1, 0:1])
                new_img = ndimage.shift(new_img, shifts[n], order=0)
                if np.count_nonzero(new_img) > 0:
                    flattened_new = np.flatten(new_img)
                    flattened_seg = np.flatten(self.seg)

After Change


            for n in range(0, self.neigh):
                for i in range(0, shifted_image[0].size):
                    glcm[shifted_image[0][i], shifted_image[n+1][i], n] += 1
                glcm[:,:,n] = glcm[:,:,n] / np.sum(glcm[:,:,n])
            multi_mod_glcm.append(glcm)
        return multi_mod_glcm
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: NifTK/NiftyNet
Commit Name: a59350bf9cc20c9e02e2397d31bbf87848db8f9e
Time: 2017-10-19
Author: carole.sudre.12@ucl.ac.uk
File Name: niftynet/evaluation/region_properties.py
Class Name: RegionProperties
Method Name: glcm


Project Name: uber/ludwig
Commit Name: 66866187ee32e7ec2f1e93cbd39a21a0afd1ccd3
Time: 2020-05-09
Author: w4nderlust@gmail.com
File Name: ludwig/models/modules/embedding_modules.py
Class Name: EmbedSparse
Method Name: call


Project Name: uber/ludwig
Commit Name: 15bc4baff9c2dfa2e42947a417e45a159ab50dad
Time: 2020-05-14
Author: w4nderlust@gmail.com
File Name: ludwig/models/modules/embedding_modules.py
Class Name: EmbedSparse
Method Name: __call__