e871df8da1390d0be46434ac606921ae9f85841f,niftynet/engine/windows_aggregator_resize.py,ResizeSamplesAggregator,decode_batch,#ResizeSamplesAggregator#Any#Any#,43

Before Change


                        window_loc = np.reshape(window[i], [1, 1])
                        self.csv_out[i] = self._initialise_empty_csv(1)
                    else:
                        window[i] = np.asarray(window[i])
                        try:
                            assert window[i].ndim <= 2
                        except (TypeError, AssertionError):
                            tf.logging.error(
                                "The output you are trying to "
                                "save as csv is more than "
                                "bidimensional. Did you want "
                                "to save an image instead? "
                                "Put the keyword window "
                                "in the output dictionary"
                                " in your application file")
                        if window[i].ndim < 2:
                            window[i] = np.expand_dims(window[i], 0)
                        window_loc = window[i]
                        self.csv_out[i] = self._initialise_empty_csv(
                            n_channel=window[i][0].shape[-1])

                    self.csv_out[i] = np.concatenate([self.csv_out[i],
                                                      window_loc], 0)

After Change


                        window_loc = np.reshape(window[i], [1, 1])
                        self.csv_out[i] = self._initialise_empty_csv(1)
                    else:
                        window_save = np.asarray(np.squeeze(window[i][
                                                                batch_id,
                                                                ...]))
                        try:
                            assert window_save.ndim <= 2
                        except (TypeError, AssertionError):
                            tf.logging.error(
                                "The output you are trying to "
                                "save as csv is more than "
                                "bidimensional. Did you want "
                                "to save an image instead? "
                                "Put the keyword window "
                                "in the output dictionary"
                                " in your application file")
                        while window_save.ndim < 2:
                            window_save = np.expand_dims(window_save, 0)
                        window_loc = window[i]
                        self.csv_out[i] = self._initialise_empty_csv(
                            n_channel=window_save.shape[-1])

                    self.csv_out[i] = np.concatenate([self.csv_out[i],
                                                      window_loc], 0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 25

Instances


Project Name: NifTK/NiftyNet
Commit Name: e871df8da1390d0be46434ac606921ae9f85841f
Time: 2019-06-08
Author: carole.sudre@kcl.ac.uk
File Name: niftynet/engine/windows_aggregator_resize.py
Class Name: ResizeSamplesAggregator
Method Name: decode_batch


Project Name: NifTK/NiftyNet
Commit Name: e871df8da1390d0be46434ac606921ae9f85841f
Time: 2019-06-08
Author: carole.sudre@kcl.ac.uk
File Name: niftynet/engine/windows_aggregator_grid.py
Class Name: GridSamplesAggregator
Method Name: decode_batch


Project Name: NifTK/NiftyNet
Commit Name: e2b2e773215b5360e8398b3199806b2e98ae4dc6
Time: 2019-07-03
Author: carole.sudre@kcl.ac.uk
File Name: niftynet/engine/windows_aggregator_resize.py
Class Name: ResizeSamplesAggregator
Method Name: decode_batch


Project Name: NifTK/NiftyNet
Commit Name: e871df8da1390d0be46434ac606921ae9f85841f
Time: 2019-06-08
Author: carole.sudre@kcl.ac.uk
File Name: niftynet/engine/windows_aggregator_resize.py
Class Name: ResizeSamplesAggregator
Method Name: decode_batch


Project Name: NifTK/NiftyNet
Commit Name: e2b2e773215b5360e8398b3199806b2e98ae4dc6
Time: 2019-07-03
Author: carole.sudre@kcl.ac.uk
File Name: niftynet/engine/windows_aggregator_grid.py
Class Name: GridSamplesAggregator
Method Name: decode_batch