Ejemplo n.º 1
0
    def setParamsByModule( self, mparam, mvalue):
        """ receives parameter changes from the iso surface module
            return a list of objKey and their parameters to be set by the Neg2Gui class
        """

        _infoer.function = str(self.setParamsByModule)
        _infoer.write("param: %s, value: %s" % (mparam, str(mvalue)))
        pChangeList = []
        newparams = CopyParams(self.params)
        if mparam == 'vector':
            newparams.vector = int(mvalue[0])
        if mparam == 'isovalue':
            newparams.isomin = float(mvalue[0])
            newparams.isomax = float(mvalue[1])
            newparams.isovalue = float(mvalue[2])

        pChangeList.append( (self.key, newparams) )

        if mparam == 'isovalue':
            cTableObject = globalKeyHandler().getObject(self.params.colorTableKey[self.currentVariable()])
            if cTableObject.params.baseMin != float(mvalue[0]) or cTableObject.params.baseMax != float(mvalue[1]):
                cTableObject.params.baseObjectName = self.params.name
                cTableObject.params.baseMin = float(mvalue[0])
                cTableObject.params.baseMax = float(mvalue[1])
                if self.key not in cTableObject.params.dependantKeys:
                    cTableObject.params.dependantKeys.append(self.key)
                pChangeList.append( (cTableObject.key, cTableObject.params) )
            
        return pChangeList
Ejemplo n.º 2
0
    def setParamsByModule(self, mparam, mvalue):
        """ receives parameter changes from the iso surface module
            return a list of objKey and their parameters to be set by the Neg2Gui class
        """

        _infoer.function = str(self.setParamsByModule)
        _infoer.write("param: %s, value: %s" % (mparam, str(mvalue)))
        pChangeList = []
        newparams = CopyParams(self.params)
        if mparam == 'vector':
            newparams.vector = int(mvalue[0])
        if mparam == 'isovalue':
            newparams.isomin = float(mvalue[0])
            newparams.isomax = float(mvalue[1])
            newparams.isovalue = float(mvalue[2])

        pChangeList.append((self.key, newparams))

        if mparam == 'isovalue':
            cTableObject = globalKeyHandler().getObject(
                self.params.colorTableKey[self.currentVariable()])
            if cTableObject.params.baseMin != float(
                    mvalue[0]) or cTableObject.params.baseMax != float(
                        mvalue[1]):
                cTableObject.params.baseObjectName = self.params.name
                cTableObject.params.baseMin = float(mvalue[0])
                cTableObject.params.baseMax = float(mvalue[1])
                if self.key not in cTableObject.params.dependantKeys:
                    cTableObject.params.dependantKeys.append(self.key)
                pChangeList.append((cTableObject.key, cTableObject.params))

        return pChangeList
Ejemplo n.º 3
0
    def setParamsByModule( self, mparam, mvalue):
        """ receives parameter changes from the iso cutter module
            return a list of objKey and their parameters to be set by the Neg2Gui class
        """
        _infoer.function = str(self.setParamsByModule)
        _infoer.write("param: %s, value: %s" % (mparam, str(mvalue)))
        pChangeList = []
        newparams = CopyParams(self.params)
        if mparam == 'iso_value':
            newparams.isomin = float(mvalue[0])
            newparams.isomax = float(mvalue[1])
            newparams.isovalue = float(mvalue[2])
            #print " mvalue[0] = ", float(mvalue[0]), " mvalue[1] = ", float(mvalue[1]), " mvalue[2] = ", float(mvalue[2])

        pChangeList.append( (self.key, newparams) )

        return pChangeList
Ejemplo n.º 4
0
    def setParamsByModule(self, mparam, mvalue):
        """ receives parameter changes from the iso cutter module
            return a list of objKey and their parameters to be set by the Neg2Gui class
        """
        _infoer.function = str(self.setParamsByModule)
        _infoer.write("param: %s, value: %s" % (mparam, str(mvalue)))
        pChangeList = []
        newparams = CopyParams(self.params)
        if mparam == 'iso_value':
            newparams.isomin = float(mvalue[0])
            newparams.isomax = float(mvalue[1])
            newparams.isovalue = float(mvalue[2])
            #print " mvalue[0] = ", float(mvalue[0]), " mvalue[1] = ", float(mvalue[1]), " mvalue[2] = ", float(mvalue[2])

        pChangeList.append((self.key, newparams))

        return pChangeList