def METHOD_NAME(self, prev_stage):
    data = self.pipeline.get_data(prev_stage)
    self.verify_2d(data)
    if self._bypass or data is None or (self.longside is None and
                                        np.isclose(self.scale, 1.0)):
        if self.gui_up:
            self.w.scale.set_text(str(1.0))
            _ht, _wd = data.shape[:2]
            self.w.size.set_text("{}x{}".format(_wd, _ht))
        self.pipeline.send(res_np=data)
        return
    ht, wd = data.shape[:2]
    if self.longside is not None:
        aspect = trcalc.get_aspect(data.shape)
        if aspect > 0:
            new_wd, new_ht = (self.longside,
                              int(np.floor(self.longside / aspect)))
        else:
            new_wd, new_ht = (int(np.floor(self.longside * aspect)),
                              self.longside)
        res_np, scales = trcalc.get_scaled_cutout_wdht(data, 0, 0,
                                                       wd - 1, ht - 1,
                                                       new_wd, new_ht,
                                                       interpolation=self.interp,
                                                       logger=self.logger)
        if self.gui_up:
            self.w.scale.set_text("%10.4f" % (scales[0]))
    else:
        res_np, scales = trcalc.get_scaled_cutout_basic(data, 0, 0,
                                                        wd - 1, ht - 1,
                                                        self.scale, self.scale,
                                                        interpolation=self.interp,
                                                        logger=self.logger)
    if self.gui_up:
        _ht, _wd = res_np.shape[:2]
        self.w.size.set_text("{}x{}".format(_wd, _ht))
    self.pipeline.send(res_np=res_np)