def __getParams(self): data = coColorTableParams() data.name = str(self.vrpLineEditName.text()) data.species = self.__key2Species[self.__currentKey] data.min = getDoubleInLineEdit(self.vrpLineEditMin) data.max = getDoubleInLineEdit(self.vrpLineEditMax) data.steps = self.vrpSpinBoxSteps.value() data.colorMapIdx = self.vrpComboBoxMap.currentIndex()+1 data.colorMapList = self.__colorMapList if self.radioButtonManual.isChecked(): data.mode = coColorTableParams.FREE elif self.radioButtonLocal.isChecked(): data.mode = coColorTableParams.LOCAL else: data.mode = coColorTableParams.GLOBAL data.baseObjectName = self.__baseObjectName data.baseMin = self.__baseMin data.baseMax = self.__baseMax data.globalMin = self.__globalMin data.globalMax = self.__globalMax data.dependantKeys = [] if self.__currentKey in self.__dependantKeys: for key in self.__dependantKeys[self.__currentKey]: if key not in data.dependantKeys: # ignore duplicates # check if the object still exists and uses this colormap params = ObjectMgr().getParamsOfObject(key) if params != None: if params.secondVariable!=None: currentVariable = params.secondVariable else: currentVariable = params.variable if currentVariable in params.colorTableKey and params.colorTableKey[currentVariable] == self.__currentKey: data.dependantKeys.append( key ) return data
def __getParams(self): ''' convert information in the panel into the right negotiator param classes ''' data = PartVectorFieldVisParams() #data.vector = self.__vector data.name = str(self.nameWidget.text()) data.isVisible = self.visibilityCheckBox.isChecked() data.variable = str(self.vrpLineEditVariable.text()) data.colorTableKey = self.colorCreator if self.vrpCheckBoxMapVariable.isChecked(): data.secondVariable = str(self.vrpComboBoxVariable.currentText()) if data.secondVariable!="" and data.colorTableKey!=None and data.secondVariable in data.colorTableKey and self.__baseVariable and self.__baseVariable==data.secondVariable: data.colorTableKey[data.secondVariable] = MainWindow.globalColorManager.getSelectedColormapKey( self.colorMapCombobox) else : if self.__baseVariable and self.__baseVariable==data.variable and data.colorTableKey: data.colorTableKey[data.variable] = MainWindow.globalColorManager.getSelectedColormapKey( self.colorMapCombobox) data.scalingValue = getDoubleInLineEdit(self.scalingValue) data.scalingType = self.comboBoxScalingType.currentIndex() data.arrowHeadFactor = getDoubleInLineEdit(self.arrowHeadFactor) data.r = self.__r data.g = self.__g data.b = self.__b data.coloringOption = self.__coloringOption data.boundingBox = self.__boundingBox #transform card self.TransformManagerGetParams(data) return data
def __getParams(self): data = coColorTableParams() data.name = str(self.vrpLineEditName.text()) data.species = self.__key2Species[self.__currentKey] data.min = getDoubleInLineEdit(self.vrpLineEditMin) data.max = getDoubleInLineEdit(self.vrpLineEditMax) data.steps = self.vrpSpinBoxSteps.value() data.colorMapIdx = self.vrpComboBoxMap.currentIndex() + 1 data.colorMapList = self.__colorMapList if self.radioButtonManual.isChecked(): data.mode = coColorTableParams.FREE elif self.radioButtonLocal.isChecked(): data.mode = coColorTableParams.LOCAL else: data.mode = coColorTableParams.GLOBAL data.baseObjectName = self.__baseObjectName data.baseMin = self.__baseMin data.baseMax = self.__baseMax data.globalMin = self.__globalMin data.globalMax = self.__globalMax data.dependantKeys = [] if self.__currentKey in self.__dependantKeys: for key in self.__dependantKeys[self.__currentKey]: if key not in data.dependantKeys: # ignore duplicates # check if the object still exists and uses this colormap params = ObjectMgr().getParamsOfObject(key) if params != None: if params.secondVariable != None: currentVariable = params.secondVariable else: currentVariable = params.variable if currentVariable in params.colorTableKey and params.colorTableKey[ currentVariable] == self.__currentKey: data.dependantKeys.append(key) return data
def __getParams(self): """ convert information in the panel into the right negotiator param classes """ if self.__vector==PLANE: data = PartPlaneVisParams() elif self.__vector==VECTOR: data = PartVectorVisParams() data.length = self.cuttingSurfaceLength.currentIndex()+1 data.scale = getDoubleInLineEdit(self.cuttingSurfaceScale) data.arrow_head_factor = getDoubleInLineEdit(self.cuttingSurfaceArrowHead) data.project_arrows = self.checkBoxProjectArrows.isChecked() data.vector = self.__vector data.name = str(self.nameWidget.text()) data.isVisible = self.visibilityCheckBox.isChecked() data.variable = str(self.vrpLineEditVariable.text()) data.colorTableKey = self.colorCreator if self.__baseVariable and self.__baseVariable==data.variable and data.colorTableKey: data.colorTableKey[data.variable] = MainWindow.globalColorManager.getSelectedColormapKey( self.colorMapCombobox) data.alignedRectangle = self.__rectangleManager.getParams() data.boundingBox = self.__rectangleManager.getBoundingBox() data.showSmoke= self.vrpCheckBoxShow.isChecked() data.showInteractor = self.checkBox5.isChecked() data.attachedClipPlane_index = self.ClipPlaneIndexCombo.currentIndex()-1 data.attachedClipPlane_offset = getDoubleInLineEdit(self.vrpLineEditClipPlaneOffset) data.attachedClipPlane_flip = self.ClipPlaneFlipCheckbox.isChecked() return data
def __getParams(self): params = CopyParams(ObjectMgr().getParamsOfObject(self.__key)) for paramName, paramType in iter(params.gpTypes.items()): if (paramType == PARAM_TYPE_BOOL): params.gpValues[paramName] = self.__name2input[paramName].isChecked() elif (paramType == PARAM_TYPE_INT): params.gpValues[paramName] = getIntInLineEdit(self.__name2input[paramName]) elif (paramType == PARAM_TYPE_FLOAT): params.gpValues[paramName] = getDoubleInLineEdit(self.__name2input[paramName]) elif (paramType == PARAM_TYPE_VEC3): params.gpValues[paramName] = [float(x) for x in self.__name2input[paramName].text().split("/")] elif (paramType == PARAM_TYPE_MATRIX): params.gpValues[paramName] = [float(x) for x in self.__name2input[paramName].text().split("/")] else: params.gpValues[paramName] = str(self.__name2input[paramName].text()) return params
def TransformManagerGetParams(self, params): params.rotX = self.floatInRangeAxisX.getValue() params.rotY = self.floatInRangeAxisY.getValue() params.rotZ = self.floatInRangeAxisZ.getValue() params.rotAngle = self.floatInRangeAngle.getValue() params.transX = getDoubleInLineEdit(self.floatX) params.transY = getDoubleInLineEdit(self.floatY) params.transZ = getDoubleInLineEdit(self.floatZ) if self.__hasScale: params.scaleX = getDoubleInLineEdit(self.floatScaleX) if self.checkScaleUniform.isChecked(): params.scaleY = params.scaleX params.scaleZ = params.scaleX else: params.scaleY = getDoubleInLineEdit(self.floatScaleY) params.scaleZ = getDoubleInLineEdit(self.floatScaleZ) else: params.scaleX = 1.0 params.scaleY = 1.0 params.scaleZ = 1.0
def __getParams(self): _infoer.function = str(self.__getParams) _infoer.write("") data = coDocumentMgrParams() data.documentName = str(self.DocumentName.text()) data.name = data.documentName data.imageName = str(self.ImageName.text()) data.pageNo = self.spinBoxPage.value() data.pos = (getDoubleInLineEdit(self.floatX), getDoubleInLineEdit(self.floatY), getDoubleInLineEdit(self.floatZ)) data.size = (getDoubleInLineEdit(self.floatHsize), getDoubleInLineEdit(self.floatVsize)) data.scaling = getDoubleInLineEdit(self.floatScaling) data.isVisible = self.__isVisible data.minPage = self.spinBoxPage.minimum() data.maxPage = self.spinBoxPage.maximum() # remember current picture data.currentImage = self.currentImage_ return data
def __getParams(self): """ convert information in the panel into the right negotiator param classes """ _infoer.function = str(self.__getParams) _infoer.write("") if self.__taskType==STREAMLINE: data = PartStreamlineVisParams() data.tubeWidth = getDoubleInLineEdit(self.TubeWidth) elif self.__taskType==MOVING_POINTS: data = PartMovingPointsVisParams() data.numSteps = getIntInLineEdit(self.NumberOfSteps) data.duration = getDoubleInLineEdit(self.DurationOfSteps) data.sphereRadius = getDoubleInLineEdit(self.RadiusOfSpheres) else: data = PartPathlinesVisParams() data.numSteps = getIntInLineEdit(self.NumberOfSteps) data.duration = getDoubleInLineEdit(self.DurationOfSteps) data.tubeWidth = getDoubleInLineEdit(self.TubeWidth) data.sphereRadius = getDoubleInLineEdit(self.RadiusOfSpheres) data.taskType = self.__taskType data.name = str(self.nameWidget.text()) data.isVisible = self.visibilityCheckBox.isChecked() data.variable = str(self.vrpLineEditVariable.text()) data.colorTableKey = self.colorCreator if self.vrpCheckBoxMapVariable.isChecked(): data.secondVariable = str(self.vrpComboBoxVariable.currentText()) if data.secondVariable!="" and data.colorTableKey!=None and data.secondVariable in data.colorTableKey and self.__baseVariable and self.__baseVariable==data.secondVariable: data.colorTableKey[data.secondVariable] = MainWindow.globalColorManager.getSelectedColormapKey( self.colorMapCombobox) else : if self.__baseVariable and self.__baseVariable==data.variable and data.colorTableKey: data.colorTableKey[data.variable] = MainWindow.globalColorManager.getSelectedColormapKey( self.colorMapCombobox) if self.__startStyle == PLANE: data.alignedRectangle = self.__rectangleManager.getParams() elif self.__startStyle == LINE: #data.line3D = self.__rectangleManager.getParams(LINE) data.alignedRectangle = self.__rectangleManager.getParams(LINE) else: data.alignedRectangle = self.__rectangleManager.getParams() data.boundingBox = self.__rectangleManager.getBoundingBox() try: data.no_startp = getIntInLineEdit(self.numberStartpoints) except ConversionError: data.no_startp = 0 try: data.len = getDoubleInLineEdit(self.lengthTraces) except ConversionError: data.len = 0.0 data.direction = self.tracingDirectionCB.currentIndex()+1 try: data.eps = getDoubleInLineEdit(self.vrpLineEditRelativeErrors) except ConversionError: data.eps = 0.0 try: data.abs = getDoubleInLineEdit(self.vrpLineEditAbsoluteErrors) except ConversionError: data.abs = 0.0 try: data.grid_tol = getDoubleInLineEdit(self.vrpLineEditGridTolerance) except ConversionError: data.grid_tol = 0.0 try: data.maxOutOfDomain = getDoubleInLineEdit(self.vrpLineEditMinimumValue_2) except ConversionError: data.maxOutOfDomain = 0.0 try: data.min_vel = getDoubleInLineEdit(self.vrpLineEditMinimumValue) except ConversionError: data.min_vel = 0.0 data.showSmoke= self.vrpCheckBoxShow.isChecked() data.showInteractor = self.checkBox5.isChecked() if self.checkBoxDomainFromList.isChecked(): if self.comboBoxDomain.currentIndex()>0 : data.use2DPartKey=self.__UsePartIdx2key[self.comboBoxDomain.currentIndex()] else : data.use2DPartKey=-1 if self.checkBoxFreeStartpoints.isChecked(): data.start_style = 3 else: data.start_style = self.__startStyle return data
def _getParams(self): params = coTrackingMgrParams() # rotate if self.widget().RotatePointRadio.isChecked(): params.rotateMode = 'Point' elif self.widget().RotateAxisRadio.isChecked(): params.rotateMode = 'Axis' else: params.rotateMode = 'Free' params.showRotatePoint = self.widget().ShowRotPoint.isChecked() params.rotationPointSize = getDoubleInLineEdit(self.widget().RotationPointSize) params.rotatePointX = getDoubleInLineEdit(self.widget().RotatePointX) params.rotatePointY = getDoubleInLineEdit(self.widget().RotatePointY) params.rotatePointZ = getDoubleInLineEdit(self.widget().RotatePointZ) params.rotateAxisX = getDoubleInLineEdit(self.widget().RotateAxisX) params.rotateAxisY = getDoubleInLineEdit(self.widget().RotateAxisY) params.rotateAxisZ = getDoubleInLineEdit(self.widget().RotateAxisZ) # translate params.translateRestrict = self.widget().TranslateRestrictCB.isChecked() params.translateMinX = getDoubleInLineEdit(self.widget().TranslateMinX) params.translateMaxX = getDoubleInLineEdit(self.widget().TranslateMaxX) params.translateMinY = getDoubleInLineEdit(self.widget().TranslateMinY) params.translateMaxY = getDoubleInLineEdit(self.widget().TranslateMaxY) params.translateMinZ = getDoubleInLineEdit(self.widget().TranslateMinZ) params.translateMaxZ = getDoubleInLineEdit(self.widget().TranslateMaxZ) params.translateFactor = getDoubleInLineEdit(self.widget().TranslateFactor) # scale params.scaleRestrict = self.widget().ScaleRestrictCB.isChecked() params.scaleMin = getDoubleInLineEdit(self.widget().ScaleMin) params.scaleMax = getDoubleInLineEdit(self.widget().ScaleMax) params.scaleFactor = getDoubleInLineEdit(self.widget().ScaleFactor) #navigation params.trackingOn = self.widget().checkBoxTracking.isChecked() params.trackingGUIOn = self.widget().checkBoxTrackingGUI.isChecked() params.navigationMode = str(self.widget().NavigationModeCombo.currentText()) return params