def setup(self): self.targetTablePlugin = TargetsDefinitionTable(self.session, movingEnabled=True) self.addPlugin(self.targetTablePlugin) self.targetingGroupBox = qt.QGroupBox("Target Placement") self.targetingGroupBoxLayout = qt.QFormLayout() self.targetingGroupBox.setLayout(self.targetingGroupBoxLayout) self.fiducialsWidget = TargetCreationWidget( DEFAULT_FIDUCIAL_LIST_NAME="IntraOpTargets", ICON_SIZE=qt.QSize(36, 36)) self.fiducialsWidget.addEventObserver( self.fiducialsWidget.StartedEvent, self.onTargetingStarted) self.fiducialsWidget.addEventObserver( self.fiducialsWidget.FinishedEvent, self.onTargetingFinished) self.fiducialsWidget.targetListSelector.connect( "currentNodeChanged(vtkMRMLNode*)", self.onFiducialListSelected) self.targetDistanceWidget = qt.QListWidget() self.targetDistanceWidget.setWindowTitle("Distances Between Targets") #self.showTargetDistanceIcon = self.createIcon('icon-distance.png') #self.showTargetDistanceButton = self.createButton("", enabled=True, icon=self.showTargetDistanceIcon, iconSize=qt.QSize(24, 24), # toolTip="Start placing targets") self.targetingGroupBoxLayout.addRow(self.targetTablePlugin) self.targetingGroupBoxLayout.addRow(self.fiducialsWidget) self.targetingGroupBoxLayout.addRow(self.targetDistanceWidget) self.layout().addWidget(self.targetingGroupBox, 1, 0, 2, 2)
def __init__(self, parent, dicomDatabase=None, browserWidget=None): """If browserWidget is specified (e.g., set to slicer.modules.DICOMInstance.browserWidget) then clicking on an item selects the series in that browserWidget. """ super().__init__(parent) if dicomDatabase: self.dicomDatabase = dicomDatabase else: self.dicomDatabase = slicer.dicomDatabase self.browserWidget = browserWidget self.recentSeries = [] self.name = 'recentActivityWidget' self.setLayout(qt.QVBoxLayout()) self.statusLabel = qt.QLabel() self.layout().addWidget(self.statusLabel) self.statusLabel.text = '' self.scrollArea = qt.QScrollArea() self.layout().addWidget(self.scrollArea) self.listWidget = qt.QListWidget() self.listWidget.name = 'recentActivityListWidget' self.scrollArea.setWidget(self.listWidget) self.scrollArea.setWidgetResizable(True) self.listWidget.setProperty('SH_ItemView_ActivateItemOnSingleClick', 1) self.listWidget.connect('activated(QModelIndex)', self.onActivated) self.refreshButton = qt.QPushButton() self.layout().addWidget(self.refreshButton) self.refreshButton.text = 'Refresh' self.refreshButton.connect('clicked()', self.update) self.tags = {} self.tags['seriesDescription'] = "0008,103e" self.tags['patientName'] = "0010,0010"
def __init__(self, parent): vLayout = qt.QVBoxLayout(parent) hLayout = qt.QHBoxLayout() self.icon = qt.QLabel() self.icon.setPixmap(_dialogIcon(qt.QStyle.SP_MessageBoxQuestion)) hLayout.addWidget(self.icon, 0) self.label = qt.QLabel() self.label.wordWrap = True hLayout.addWidget(self.label, 1) vLayout.addLayout(hLayout) self.moduleList = qt.QListWidget() self.moduleList.selectionMode = qt.QAbstractItemView.NoSelection vLayout.addWidget(self.moduleList) self.addToSearchPaths = qt.QCheckBox() vLayout.addWidget(self.addToSearchPaths) self.enableDeveloperMode = qt.QCheckBox() self.enableDeveloperMode.text = "Enable developer mode" self.enableDeveloperMode.toolTip = "Sets the 'Developer mode' application option to enabled. Enabling developer mode is recommended while developing scripted modules, as it makes the Reload and Testing section displayed in the module user interface." self.enableDeveloperMode.checked = True vLayout.addWidget(self.enableDeveloperMode) self.buttonBox = qt.QDialogButtonBox() self.buttonBox.setStandardButtons(qt.QDialogButtonBox.Yes | qt.QDialogButtonBox.No) vLayout.addWidget(self.buttonBox)
def __init__(self,parent,dicomDatabase=None,detailsPopup=None): if dicomDatabase: self.dicomDatabase = dicomDatabase else: self.dicomDatabase = slicer.dicomDatabase self.detailsPopup = detailsPopup self.recentSeries = [] self.widget = qt.QWidget(parent) self.widget.name = 'recentActivityWidget' self.layout = qt.QVBoxLayout() self.widget.setLayout(self.layout) self.statusLabel = qt.QLabel(self.widget) self.layout.addWidget(self.statusLabel) self.statusLabel.text = 'No inserts in the past hour' self.scrollArea = qt.QScrollArea() self.layout.addWidget(self.scrollArea) self.listWidget = qt.QListWidget() self.listWidget.name = 'recentActivityListWidget' self.scrollArea.setWidget(self.listWidget) self.scrollArea.setWidgetResizable(True) self.listWidget.setProperty('SH_ItemView_ActivateItemOnSingleClick', 1) self.listWidget.connect('activated(QModelIndex)', self.onActivated) self.refreshButton = qt.QPushButton(self.widget) self.layout.addWidget(self.refreshButton) self.refreshButton.text = 'Refresh' self.refreshButton.connect('clicked()', self.update) self.tags = {} self.tags['seriesDescription'] = "0008,103e" self.tags['patientName'] = "0010,0010"
def __init__(self): self.widget = qt.QWidget() self.layout = qt.QVBoxLayout() self.widget.setLayout(self.layout) self.listWidget = qt.QListWidget() self.listWidget.setDragDropMode(qt.QAbstractItemView.InternalMove) self.layout.addWidget(self.listWidget) self.controlWiget = qt.QWidget() self.controlLayout = qt.QHBoxLayout() self.controlWiget.setLayout(self.controlLayout) self.selectAllButton = qt.QPushButton("Select all") self.unselectAllButton = qt.QPushButton("Unselect all") self.controlLayout.addWidget(self.selectAllButton) self.controlLayout.addWidget(self.unselectAllButton) self.layout.addWidget(self.controlWiget) self.selectAllButton.connect( "clicked()", lambda state=qt.Qt.Checked: self.setCheckStates(state)) self.unselectAllButton.connect( "clicked()", lambda state=qt.Qt.Unchecked: self.setCheckStates(state)) events = [ slicer.mrmlScene.NodeAddedEvent, slicer.mrmlScene.NodeRemovedEvent, slicer.mrmlScene.NewSceneEvent ] self.observations = [] for event in events: self.observations.append( slicer.mrmlScene.AddObserver(event, self.refresh)) self.refresh()
def setup(self): ScriptedLoadableModuleWidget.setup(self) self.logic = SegmentationExtractionModuleLogic() # ------ 1. CREACION LAYOUT Y BOTONES ------ self.layoutManager = slicer.app.layoutManager() self.layoutManager.setLayout(0) # # CARGAR IMAGEN # # Creacion layout collapsibleButtonLoad = ctk.ctkCollapsibleButton() collapsibleButtonLoad.text = "Load Files" self.layout.addWidget(collapsibleButtonLoad) formLayout_load = qt.QFormLayout(collapsibleButtonLoad) # Definir botones para cargar DICOM y crop volume # DICOM self.inputDICOM_label = qt.QLabel('DICOM Location: ') self.loadDICOM_button = qt.QPushButton('Search DICOM') self.loadDICOM_button.accessibleDescription = 'DICOM' self.loadDICOM_button.toolTip = "Search DICOM" self.loadDICOM_button.enabled = True formLayout_load.addRow(self.inputDICOM_label, self.loadDICOM_button) # Crop Volume self.inputCropVolume_label = qt.QLabel('Crop Volume location: ') self.loadCropVolume_button = qt.QPushButton('Search Crop Volume ') self.loadCropVolume_button.accessibleDescription = 'Volume' self.loadCropVolume_button.toolTip = "Search Crop Volume" formLayout_load.addRow(self.inputCropVolume_label, self.loadCropVolume_button) # # Cuadro de texto para introducir el directorio de la imagen a cargar # self.inputImage_label = qt.QLabel('Imagen original: ') # self.inputImage_textInput = qt.QLineEdit() # self.inputImage_textInput.text = 'C:/Slicer/Pyramid/Pyramid/Data/inputImage.png' # formLayout_load.addRow(self.inputImage_label, self.inputImage_textInput) # incluimos el cuadro de texto al layout # Boton para cargar imagen self.loadImagesButton = qt.QPushButton("Load Files") self.loadImagesButton.toolTip = "Load files" self.loadImagesButton.enabled = True formLayout_load.addRow( self.loadImagesButton) # incluimos el boton al layout # SEGMENTATIONS TO EXPORT collapsibleButtonSegmentation = ctk.ctkCollapsibleButton() collapsibleButtonSegmentation.text = "Segmentations to Export" self.layout.addWidget(collapsibleButtonSegmentation) formLayout_segmentation = qt.QFormLayout( collapsibleButtonSegmentation) # Layout dentro de la seccion # # create table # # Original Contour Names table # self.segmentationsTable = qt.QTableWidget(5, 1) # self.segmentationsTable.setHorizontalHeaderLabels([" "]) # self.segmentationsTable.setVerticalHeaderLabels(" ") # newItem = qt.QTableWidgetItem(3) # self.segmentationsTable.setItem(1,1, newItem) # formLayout_segmentation.addRow(self.segmentationsTable) # call function to get names of contours # define lists self.contour_names = ['Ojo', 'medula', 'tronco', 'paciente'] self.original_contour_list = qt.QListWidget() # Initiate empty list of exported contours at first (None selected) self.exported_contours_list = qt.QListWidget() # Initiate empty list of exported contours at first (None selected) for contour in self.contour_names: contour_item = qt.QListWidgetItem(contour) self.original_contour_list.addItem(contour_item) # define button layout vertical_layout_buttons = qt.QVBoxLayout() # define forwards button self.move_segments_forwards_button = qt.QPushButton(">") self.move_segments_forwards_button.toolTip = "Copy segmentations" self.move_segments_forwards_button.enabled = True vertical_layout_buttons.addWidget(self.move_segments_forwards_button) vertical_layout_buttons.addStretch() #define backwards button. Set enable = False at the beginning self.move_segments_backwards_button = qt.QPushButton("<") self.move_segments_backwards_button.toolTip = "Eliminate segmentation from exported list" self.move_segments_backwards_button.enabled = True vertical_layout_buttons.addWidget(self.move_segments_backwards_button) vertical_layout_buttons.addStretch() # export button self.export_button = qt.QPushButton('Export Labelmaps') self.export_button.enabled = True #define titles # title_right = qt.QLabel('Original segmentation') # title_right.setAlignment(qt.Qt.AlignRight) # title_left = qt.QLabel('Segmentations to export') # title_left.setAlignment(qt.Qt.AlignLeft) # set layout horizontal_layout = qt.QHBoxLayout() horizontal_layout.addWidget(self.original_contour_list) horizontal_layout.addLayout(vertical_layout_buttons) horizontal_layout.addWidget(self.exported_contours_list) #formLayout_segmentation.addRow(title_right, title_left) formLayout_segmentation.addRow(horizontal_layout) formLayout_segmentation.addRow(self.export_button) # # GUARDAR IMAGEN # # Creacion Layout collapsibleButtonSave = ctk.ctkCollapsibleButton() collapsibleButtonSave.text = "Save Labelmaps" self.layout.addWidget(collapsibleButtonSave) formLayout_save = qt.QFormLayout( collapsibleButtonSave) # Layout dentro de la seccion # Cuadro de texto para indicar el directorio de la imagen de salida (procesada) self.outputImage_label = qt.QLabel('Select folder to save: ') self.folder_to_save = qt.QPushButton( 'Explore') #'C:/Slicer/Pyramid/Pyramid/Data/outputImage.png' formLayout_save.addRow( self.outputImage_label, self.folder_to_save) # incluimos el cuadro de texto al layout # Boton para guardar imagen self.saveImageButton = qt.QPushButton("Save labelmaps") self.saveImageButton.toolTip = "Save labelmaps" self.saveImageButton.enabled = True formLayout_save.addRow( self.saveImageButton) # incluimos el boton al layout # Incluimos un espacio en vertical self.layout.addStretch(1) # ------ 2. CONEXION BOTONES CON FUNCIONES ------ # Conectar cada boton a una funcion self.loadDICOM_button.connect('clicked(bool)', self.config_dialog_dicom) self.loadCropVolume_button.connect('clicked(bool)', self.config_dialog_cropped_volume) self.loadImagesButton.connect('clicked(bool)', self.onLoadImageButton) self.move_segments_forwards_button.connect('clicked(bool)', self.move_segments_forwards) self.move_segments_backwards_button.connect( 'clicked(bool)', self.move_segments_backwards)
def setup(self): ScriptedLoadableModuleWidget.setup(self) # Instantiate and connect widgets ... # # Subject Directory Area # self.subjectDirectoryButton = ctk.ctkDirectoryButton() self.subjectDirectoryButton.text = "Select Lead-DBS directory" self.layout.addWidget(self.subjectDirectoryButton) # # Images Area # imagesCollapsibleButton = ctk.ctkCollapsibleButton() imagesCollapsibleButton.text = "Images" self.layout.addWidget(imagesCollapsibleButton) # Layout within the dummy collapsible button imagesFormLayout = qt.QFormLayout(imagesCollapsibleButton) # # select images list # self.imagesList = qt.QListWidget() self.imagesList.setSelectionMode( qt.QAbstractItemView.ExtendedSelection) imagesFormLayout.addRow(self.imagesList) # # Transforms Area # transformsCollapsibleButton = ctk.ctkCollapsibleButton() transformsCollapsibleButton.text = "Transforms" self.layout.addWidget(transformsCollapsibleButton) # Layout within the dummy collapsible button transformsFormLayout = qt.QFormLayout(transformsCollapsibleButton) # converts transforms self.updateTransformButton = qt.QPushButton('Update Transform') self.updateTransformButton.visible = False transformsFormLayout.addRow(self.updateTransformButton) # # check box select transforms # self.transformsList = qt.QListWidget() self.transformsList.setSelectionMode( qt.QAbstractItemView.ExtendedSelection) imagesFormLayout.addRow(self.transformsList) # # Import Button # self.importButton = qt.QPushButton("Import") self.importButton.toolTip = "Import selected options." self.importButton.enabled = True self.layout.addWidget(self.importButton) # connections self.importButton.connect('clicked(bool)', self.onImportButton) self.updateTransformButton.connect('clicked(bool)', self.onUpdateTransformButton) self.subjectDirectoryButton.directoryChanged.connect( self.onSubjectDirectoryChanged) # Add vertical spacer self.layout.addStretch(1) # Refresh Apply button state self.onSubjectDirectoryChanged('.')
def setup(self): ScriptedLoadableModuleWidget.setup(self) self.logic = ARHealthLogic() # Layout setup self.layoutManager = slicer.app.layoutManager() self.setCustomLayout() self.layoutManager.setLayout(self.customLayout_1_ID) # Set 3D only view layout #-------------------------------------------------------# #------------------- Load Models -----------------------# #-------------------------------------------------------# # Creacion layout self.collapsibleButtonInit = ctk.ctkCollapsibleButton() self.collapsibleButtonInit.text = "INITIALIZATION" self.collapsibleButtonInit.collapsed = False self.layout.addWidget(self.collapsibleButtonInit) formLayout_init = qt.QFormLayout(self.collapsibleButtonInit) # Reset button self.resetButton = qt.QPushButton("RESET") self.resetButton.toolTip = "Reset scene." self.resetButton.enabled = True formLayout_init.addRow(self.resetButton) # Mode selection self.modeSelection_GroupBox = ctk.ctkCollapsibleGroupBox() self.modeSelection_GroupBox.setTitle("Mode") self.modeSelection_GroupBox.enabled = True formLayout_init.addRow(self.modeSelection_GroupBox) modeSelection_GroupBox_Layout = qt.QFormLayout(self.modeSelection_GroupBox) modeSelection_H_Layout = qt.QHBoxLayout() modeSelection_GroupBox_Layout.addRow(modeSelection_H_Layout) ## Visualization mode radio button self.mode1_radioButton = qt.QRadioButton('Visualization') self.mode1_radioButton.checked = True modeSelection_H_Layout.addWidget(self.mode1_radioButton) ## Registration mode radio button self.mode2_radioButton = qt.QRadioButton('Registration') modeSelection_H_Layout.addWidget(self.mode2_radioButton) ## Mode icons display icons_path = slicer.modules.arhealth.path.replace("ARHealth.py", "") + "Resources/Icons/" self.mode_1_icon = qt.QLabel() self.mode_1_icon_pixmap = qt.QPixmap(icons_path + '/Mode1.jpg') self.mode_1_icon.setPixmap(self.mode_1_icon_pixmap.scaledToWidth(400)) self.mode_1_icon.visible = True modeSelection_GroupBox_Layout.addRow(self.mode_1_icon) self.mode_2_icon = qt.QLabel() self.mode_2_icon_pixmap = qt.QPixmap(icons_path + '/Mode2.jpg') self.mode_2_icon.setPixmap(self.mode_2_icon_pixmap.scaledToWidth(400)) self.mode_2_icon.visible = False modeSelection_GroupBox_Layout.addRow(self.mode_2_icon) # Button Load Marker Model self.loadMarkerButton = qt.QPushButton("Load Marker Model") self.loadMarkerButton.toolTip = "Load Marker Model" self.loadMarkerButton.enabled = True formLayout_init.addRow(self.loadMarkerButton) """ # Text to load model self.inputModel_label = qt.QLabel("Model Path: ") self.inputModel_textInput = qt.QLineEdit() self.inputModel_textInput.text = "" formLayout_init.addRow(self.inputModel_label, self.inputModel_textInput) """ ## Load Models self.LoadModelsGroupBox = ctk.ctkCollapsibleGroupBox() self.LoadModelsGroupBox.setTitle("Load Models") self.LoadModelsGroupBox.collapsed = True formLayout_init.addRow(self.LoadModelsGroupBox) LoadModelsGroupBox_Layout = qt.QFormLayout(self.LoadModelsGroupBox) # Data Stream File Path Selector self.modelsPathEdit = ctk.ctkPathLineEdit() self.modelsPathEdit.enabled = False LoadModelsGroupBox_Layout.addRow("Model Path: ", self.modelsPathEdit) # Button to load model self.loadModelButton = qt.QPushButton("Load Model") self.loadModelButton.toolTip = "Load Model" self.loadModelButton.enabled = False LoadModelsGroupBox_Layout.addRow(self.loadModelButton) # Create List self.modelsListWidget = qt.QListWidget() LoadModelsGroupBox_Layout.addRow(self.modelsListWidget) # Create buttons to delete models o delete all deleteOneOrAllModels_Layout = qt.QHBoxLayout() LoadModelsGroupBox_Layout.addRow(deleteOneOrAllModels_Layout) self.removeSelectedModelButton = qt.QPushButton("Remove Model") self.removeSelectedModelButton.enabled = False deleteOneOrAllModels_Layout.addWidget(self.removeSelectedModelButton) self.removeAllModelsButton = qt.QPushButton("Remove All") self.removeAllModelsButton.enabled = False deleteOneOrAllModels_Layout.addWidget(self.removeAllModelsButton) # Button to move models to origin self.moveToOriginlButton = qt.QPushButton("Finish and Center") self.moveToOriginlButton.enabled = False formLayout_init.addRow(self.moveToOriginlButton) # self.layout.addStretch(1) #-------------------------------------------------------# #------------------- Positioning -----------------------# #-------------------------------------------------------# # Creacion layout self.collapsibleButtonPos = ctk.ctkCollapsibleButton() self.collapsibleButtonPos.text = "POSITIONING" self.collapsibleButtonPos.collapsed = True # self.collapsibleButtonPos.enabled = False self.layout.addWidget(self.collapsibleButtonPos) formLayout_pos = qt.QFormLayout(self.collapsibleButtonPos) ## Base Model Height self.BaseGroupBox = ctk.ctkCollapsibleGroupBox() self.BaseGroupBox.setTitle("AR Marker Adaptor Height") self.BaseGroupBox.visible = False formLayout_pos.addRow(self.BaseGroupBox) BaseGroupBox_Layout = qt.QFormLayout(self.BaseGroupBox) self.baseHeightSliderWidget = ctk.ctkSliderWidget() self.baseHeightSliderWidget.singleStep = 10 self.baseHeightSliderWidget.minimum = 10 self.baseHeightSliderWidget.maximum = 50 self.baseHeightSliderWidget.value = 10 BaseGroupBox_Layout.addRow("[mm]: ", self.baseHeightSliderWidget) ## Slider Scale ScaleGroupBox = ctk.ctkCollapsibleGroupBox() ScaleGroupBox.setTitle("Scale") formLayout_pos.addRow(ScaleGroupBox) ScaleGroupBox_Layout = qt.QFormLayout(ScaleGroupBox) self.scaleSliderWidget = ctk.ctkSliderWidget() self.scaleSliderWidget.singleStep = 1 self.scaleSliderWidget.minimum = 0.0000000001 self.scaleSliderWidget.maximum = 500 self.scaleSliderWidget.value = 100 ScaleGroupBox_Layout.addRow("[%]: ", self.scaleSliderWidget) ## Slider Translation TranslationGroupBox = ctk.ctkCollapsibleGroupBox() TranslationGroupBox.setTitle("Translation") formLayout_pos.addRow(TranslationGroupBox) TranlationGroupBox_Layout = qt.QFormLayout(TranslationGroupBox) self.lrTranslationSliderWidget = ctk.ctkSliderWidget() self.lrTranslationSliderWidget.singleStep = 0.5 self.lrTranslationSliderWidget.minimum = -1000 self.lrTranslationSliderWidget.maximum = 1000 self.lrTranslationSliderWidget.value = 0 self.lrTranslationSliderWidget.setToolTip("Z Translation Transform") TranlationGroupBox_Layout.addRow("LR: ", self.lrTranslationSliderWidget) self.paTranslationSliderWidget = ctk.ctkSliderWidget() self.paTranslationSliderWidget.singleStep = 0.5 self.paTranslationSliderWidget.minimum = -1000 self.paTranslationSliderWidget.maximum = 1000 self.paTranslationSliderWidget.value = 0 self.paTranslationSliderWidget.setToolTip("Z Translation Transform") TranlationGroupBox_Layout.addRow("PA: ", self.paTranslationSliderWidget) self.isTranslationSliderWidget = ctk.ctkSliderWidget() self.isTranslationSliderWidget.singleStep = 0.5 self.isTranslationSliderWidget.minimum = -1000 self.isTranslationSliderWidget.maximum = 1000 self.isTranslationSliderWidget.value = 0 self.isTranslationSliderWidget.setToolTip("Z Translation Transform") TranlationGroupBox_Layout.addRow("IS: ", self.isTranslationSliderWidget) ## Slider Rotation RotationGroupBox = ctk.ctkCollapsibleGroupBox() RotationGroupBox.setTitle("Rotation") formLayout_pos.addRow(RotationGroupBox) RotationGroupBox_Layout = qt.QFormLayout(RotationGroupBox) self.lrRotationSliderWidget = ctk.ctkSliderWidget() self.lrRotationSliderWidget.singleStep = 1 self.lrRotationSliderWidget.minimum = -180 self.lrRotationSliderWidget.maximum = 180 self.lrRotationSliderWidget.value = 0 self.lrRotationSliderWidget.setToolTip("LR Rotation") RotationGroupBox_Layout.addRow("LR: ", self.lrRotationSliderWidget) self.paRotationSliderWidget = ctk.ctkSliderWidget() self.paRotationSliderWidget.singleStep = 1 self.paRotationSliderWidget.minimum = -180 self.paRotationSliderWidget.maximum = 180 self.paRotationSliderWidget.value = 0 self.paRotationSliderWidget.setToolTip("PA Rotation") RotationGroupBox_Layout.addRow("PA: ", self.paRotationSliderWidget) self.isRotationSliderWidget = ctk.ctkSliderWidget() self.isRotationSliderWidget.singleStep = 1 self.isRotationSliderWidget.minimum = -180 self.isRotationSliderWidget.maximum = 180 self.isRotationSliderWidget.value = 0 self.isRotationSliderWidget.setToolTip("IS Rotation") RotationGroupBox_Layout.addRow("IS: ", self.isRotationSliderWidget) ## Button reset self.resetPosButton = qt.QPushButton("Reset Position") self.resetPosButton.enabled = True formLayout_pos.addRow(self.resetPosButton) """ #-------------------------------------------------------# #------------------- Appereance -----------------------# #-------------------------------------------------------# # Init layout collapsibleButtonAppereance = ctk.ctkCollapsibleButton() collapsibleButtonAppereance.text = "Appereance" self.layout.addWidget(collapsibleButtonAppereance) formLayout_init = qt.QFormLayout(collapsibleButtonAppereance) """ #-------------------------------------------------------# #------------------- Save Models -----------------------# #-------------------------------------------------------# # Init layout self.collapsibleButtonSaveModels = ctk.ctkCollapsibleButton() self.collapsibleButtonSaveModels.text = "SAVE MODELS" self.collapsibleButtonSaveModels.collapsed = True self.layout.addWidget(self.collapsibleButtonSaveModels) formLayout_saveModels = qt.QFormLayout(self.collapsibleButtonSaveModels) # Data Stream File Path Selector self.saveDirectoryButton = ctk.ctkDirectoryButton() formLayout_saveModels.addRow("Save Model Path: ", self.saveDirectoryButton) # Button to load model self.saveModelButton = qt.QPushButton("Save Models") self.saveModelButton.toolTip = "Save Models" self.saveModelButton.enabled = False formLayout_saveModels.addRow(self.saveModelButton) # incluimos el boton al layout # Info Save Models self.saveModels_InfoText = qt.QLabel('') formLayout_saveModels.addRow(self.saveModels_InfoText) self.layout.addStretch(1) ######################################################################################### ######################################################################################### ######################################################################################### # Connections self.resetButton.connect("clicked(bool)", self.onResetButton) self.mode1_radioButton.connect('clicked(bool)', self.onModeSelected) self.mode2_radioButton.connect('clicked(bool)', self.onModeSelected) self.loadMarkerButton.connect("clicked(bool)", self.onLoadMarkerButton) self.loadModelButton.connect("clicked(bool)", self.onLoadModelsButton) self.removeSelectedModelButton.connect("clicked(bool)", self.onRemoveSelectedModelButton) self.removeAllModelsButton.connect("clicked(bool)", self.onRemoveAllModelsButton) self.moveToOriginlButton.connect("clicked(bool)", self.onMoveToOriginlButton) self.baseHeightSliderWidget.connect("valueChanged(double)", self.onBaseHeightSliderWidgetChanged) self.scaleSliderWidget.connect("valueChanged(double)", self.onScaleSliderWidgetChanged) self.lrTranslationSliderWidget.connect("valueChanged(double)", self.onLRTranslationSliderWidgetChanged) self.paTranslationSliderWidget.connect("valueChanged(double)", self.onPATranslationSliderWidgetChanged) self.isTranslationSliderWidget.connect("valueChanged(double)", self.onISTranslationSliderWidgetChanged) self.lrRotationSliderWidget.connect("valueChanged(double)", self.onLRRotationSliderWidgetChanged) self.paRotationSliderWidget.connect("valueChanged(double)", self.onPARotationSliderWidgetChanged) self.isRotationSliderWidget.connect("valueChanged(double)", self.onISRotationSliderWidgetChanged) self.resetPosButton.connect("clicked(bool)", self.onResetPosButton) self.saveModelButton.connect("clicked(bool)", self.onsaveModelButton)