Exemplo n.º 1
0
class ContrastAndBrightnessPlugin(PluginBase):
        
    def __init__(self, ilsa):
        logging.debug("In ContrastAndBrightnessPlugin::__init__()")
        self._name = None
        self._action = ContrastAndBrightnessAction(ilsa)
        ilsa.add(self)
        self._ilsa = ilsa

    @property
    def ilsa(self):
        logging.debug("In ContrastAndBrightnessPlugin::ilsa()")
        return self._ilsa  
        
    @property
    def action(self):
        logging.debug("In ContrastAndBrightnessPlugin::action()")
        return self._action
        
    @property
    def name(self):
        logging.debug("In ContrastAndBrightnessPlugin::name()")
        return self._name
    
    @name.setter
    def name(self, name):
        logging.debug("In ContrastAndBrightnessPlugin::name.setter()")
        self._name = name
        
    def notify(self, vtkInteractorStyle=None):
        logging.debug("In ContrastAndBrightnessPlugin::notify()")

    def save(self):
        logging.debug("In ContrastAndBrightnessPlugin::save()")
        value = self._action.save()
        save = {"type" :  self.type, "value" : value}
        return save
        
    def restore(self, value = None):
        logging.debug("In ContrastAndBrightnessPlugin::restore()")
        if value:
            self._action.restore(value)
    @property
    def description(self):
        logging.debug("In ContrastAndBrightnessPlugin::description()")
        return "..."
    
    @property
    def separator(self):
        logging.debug("In ContrastAndBrightnessPlugin::separator()")
        return False
    
    @property
    def status(self):
        logging.debug("In ContrastAndBrightnessPlugin::status()")
        return True
    
    def addScene(self, scene):
        self._action.addScene(scene)
Exemplo n.º 2
0
 def __init__(self, ilsa):
     logging.debug("In ContrastAndBrightnessPlugin::__init__()")
     self._name = None
     self._action = ContrastAndBrightnessAction(ilsa)
     ilsa.add(self)
     self._ilsa = ilsa