9bf2004b29aa393400bd904bdf788390f5c0404a,niftynet/layer/histogram_normalisation.py,HistogramNormalisationLayer,__normalise_5d,#HistogramNormalisationLayer#Any#Any#,98
Before Change
assert data_array.shape[3] <= len(self.modalities)
if self.mapping is {}:
raise RuntimeError("calling normaliser with empty mapping,"
"probably {} is not loaded".format(
self.hist_model_file))
for mod in self.modalities:
for t in range(0, data_array.shape[4]):
mod_id = self.modalities[mod]
if not np.any(data_array[..., mod_id, t]):
continue // missing modality
data_array[..., mod_id, t] = self.__normalise_3d(
data_array[..., mod_id, t],
After Change
"probably {} is not loaded".format(self.hist_model_file))
raise RuntimeError
for t in range(0, data_array.shape[3]):
for mod_id, mod_name in enumerate(self.modalities):
if not np.any(data_array[..., t, mod_id]):
continue // missing modality
data_array[..., t, mod_id] = self.__normalise_3d(
data_array[..., t, mod_id],
mask_array[..., t, mod_id],
self.mapping[mod_name])
return data_array
def __normalise_3d(self, img_data, mask, mapping):
assert img_data.ndim == 3
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: NifTK/NiftyNet
Commit Name: 9bf2004b29aa393400bd904bdf788390f5c0404a
Time: 2017-08-07
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/histogram_normalisation.py
Class Name: HistogramNormalisationLayer
Method Name: __normalise_5d
Project Name: uber/ludwig
Commit Name: 5667af96dade79ef77194d519182d4989494b3a4
Time: 2019-08-25
Author: smiryala@uber.com
File Name: ludwig/features/image_feature.py
Class Name: ImageBaseFeature
Method Name: add_feature_data
Project Name: uber/ludwig
Commit Name: 7d9db23a389499c2764fb850cd19f853cc3e8565
Time: 2019-08-08
Author: smiryala@uber.com
File Name: ludwig/features/image_feature.py
Class Name: ImageBaseFeature
Method Name: add_feature_data