2fb9ed3faa5cb1062fd7f0f0ade407ed58e6d244,niftynet/io/image_windows_aggregator.py,GridSamplesAggregator,_save_current_image,#GridSamplesAggregator#,76

Before Change


            return
        original_image = self.input_image["image"]
        affine = original_image.original_affine[0]
        image_pixdim = original_image.output_pixdim[0]
        image_axcodes = original_image.output_axcodes[0]
        dst_pixdim = original_image.original_pixdim[0]
        dst_axcodes = original_image.original_axcodes[0]
        interp_order = original_image.interp_order[0]
        if len(self.image_out.shape) == 4:
            // recover a time dimension for nifti format output
            self.image_out = np.expand_dims(self.image_out, axis=3)

        for layer in self.reader.preprocessors:
            if isinstance(layer, PadLayer):
                self.image_out, _ = layer.inverse_op(self.image_out)
            if isinstance(layer, DiscreteLabelNormalisationLayer):
                self.image_out, _ = layer.inverse_op(self.image_out)
        if image_pixdim:
            self.image_out = misc_io.do_resampling(
                self.image_out, image_pixdim, dst_pixdim, interp_order)
        if image_axcodes:
            self.image_out = misc_io.do_reorientation(
                self.image_out, image_axcodes, dst_axcodes)

After Change


        if self.input_image is None:
            return

        for layer in reversed(self.reader.preprocessors):
            if isinstance(layer, PadLayer):
                self.image_out, _ = layer.inverse_op(self.image_out)
            if isinstance(layer, DiscreteLabelNormalisationLayer):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: NifTK/NiftyNet
Commit Name: 2fb9ed3faa5cb1062fd7f0f0ade407ed58e6d244
Time: 2017-08-15
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/io/image_windows_aggregator.py
Class Name: GridSamplesAggregator
Method Name: _save_current_image


Project Name: OpenNMT/OpenNMT-py
Commit Name: f1aadee66689491a6993070955abe7987b9818fc
Time: 2019-01-23
Author: guillaumekln@users.noreply.github.com
File Name: onmt/utils/loss.py
Class Name:
Method Name: shards


Project Name: keras-team/keras
Commit Name: 65e4f94e45f32d9cbe99337d74ed9c1ebad3412a
Time: 2015-06-03
Author: jason.ramapuram@viasat.com
File Name: keras/layers/core.py
Class Name: AutoEncoder
Method Name: __init__