def handleMOValueChange(self, objective, pname, value): if (pname == "micron_per_pixel"): self.view.changeMagnification(coord.Point.pixels_to_um / value) elif (pname == "xoffset"): self.view.changeXOffset(objective, coord.umToPix(value)) elif (pname == "yoffset"): self.view.changeYOffset(objective, coord.umToPix(value))
def handleMOValueChange(self, objective, pname, value): if pname == "magnification": self.view.changeMagnification(objective, value / 100.0) elif pname == "xoffset": self.view.changeXOffset(objective, coord.umToPix(value)) elif pname == "yoffset": self.view.changeYOffset(objective, coord.umToPix(value))
def handleMOValueChange(self, objective, box_type, value): if (box_type == "magnification"): value = value/100.0 if (objective == self.current_objective): self.current_magnification = value self.view.changeMagnification(objective, value) elif (box_type == "xoffset"): if (objective == self.current_objective): self.current_offset = coord.Point(value, self.current_offset.y_um, "um") self.view.changeXOffset(objective, coord.umToPix(value)) elif (box_type == "yoffset"): if (objective == self.current_objective): self.current_offset = coord.Point(self.current_offset.x_um, value, "um") self.view.changeYOffset(objective, coord.umToPix(value)) else: print "unknown box type:", box_type
def handleMOValueChange(self, objective, box_type, value): if (box_type == "magnification"): value = value / 100.0 if (objective == self.current_objective): self.current_magnification = value self.view.changeMagnification(objective, value) elif (box_type == "xoffset"): if (objective == self.current_objective): self.current_offset = coord.Point(value, self.current_offset.y_um, "um") self.view.changeXOffset(objective, coord.umToPix(value)) elif (box_type == "yoffset"): if (objective == self.current_objective): self.current_offset = coord.Point(self.current_offset.x_um, value, "um") self.view.changeYOffset(objective, coord.umToPix(value)) else: print "unknown box type:", box_type