def _updateItem(self, item, row): """ Update also the sampling rate and the alignment if needed. """ XmippProcessParticles._updateItem(self, item, row) if self.doResize: item.setSamplingRate(self.samplingRate) if self.inputHasAlign: item.getTransform().scaleShifts2D(1./self.factor)
def _updateItem(self, item, row): """ Update also the sampling rate and the alignment if needed. """ XmippProcessParticles._updateItem(self, item, row) if self.doResize: if item.hasCoordinate(): item.scaleCoordinate(self.factor) item.setSamplingRate(self.samplingRate) if self.inputHasAlign: item.getTransform().scaleShifts(self.factor)
def _updateItem(self, item, row): """ Update also the sampling rate and the alignment if needed. """ XmippProcessParticles._updateItem(self, item, row) if self.doResize: if item.hasCoordinate(): factor = self.samplingRate / item.getSamplingRate() coord = item.getCoordinate() coord.setX(coord.getX() / factor) coord.setY(coord.getY() / factor) item.setCoordinate(coord) item.setSamplingRate(self.samplingRate) if self.inputHasAlign: item.getTransform().scaleShifts2D(1./self.factor)