예제 #1
0
 def __init__(self, main, volumeViewer, parent=None):
     BaseDialogWidget.__init__(self, main, "&Crop", "Crop the volume", "crop_Volume", 
                               "actions-volume-crop", "actions-volume", False, parent)
     self.app = main
     self.setupUi(self)
     self.viewer = volumeViewer
     self.connectSignals()
     self.createActions()
예제 #2
0
 def accept(self):
     if(self.viewer.loaded):
         minPts = [self.spinBoxTopLeftX.value(), self.spinBoxTopLeftY.value(), self.spinBoxTopLeftZ.value()]
         maxPts = [self.spinBoxBottomRightX.value(), self.spinBoxBottomRightY.value(), self.spinBoxBottomRightZ.value()]
         self.viewer.renderer.cropVolume(minPts[0], minPts[1], minPts[2], maxPts[0], maxPts[1], maxPts[2])
         self.viewer.surfaceEditor.modelLoadedPreDraw()
         self.viewer.emitModelChanged();      
     else:
         QtGui.QMessageBox.critical(None, "Source volume unloaded", "A volume must be loaded to perform skeletonization", QtGui.QMessageBox.Ok, QtGui.QMessageBox.NoButton)
     self.close();     
     BaseDialogWidget.accept(self)
예제 #3
0
 def __init__(self, main, parent=None):
     BaseDialogWidget.__init__(self, 
                               main, 
                               "&Plugin Browser", 
                               "View loaded plugins", 
                               "show_PluginBrowser", 
                               "window-PluginBrowser", 
                               "window", 
                               True,
                               parent)
     self.app = main
     self.setupUi(self)
 def __init__(self, main, volumeViewer, parent=None):
     BaseDialogWidget.__init__(
         self, main, "&Binary Skeletonization",
         "Apply binary skeletonization on the volume",
         "perform_VolumeBinarySkeletonization",
         "actions-volume-skeletonization-binary",
         "actions-volume-skeletonization", False, parent)
     self.app = main
     self.viewer = volumeViewer
     self.connect(self.viewer, QtCore.SIGNAL("modelLoaded()"),
                  self.modelLoaded)
     self.connect(self.viewer, QtCore.SIGNAL("modelUnloaded()"),
                  self.modelUnloaded)
     self.createUI()
     self.createActions()
예제 #5
0
 def accept(self):
     if(self.viewer.loaded):
         self.setCursor(QtCore.Qt.BusyCursor)
         method = self.getSkeletonizationMethod()
         if(method == 0):
             if(self.app.viewers["skeleton"].loaded and self.ui.checkBoxPreserveSkeleton.isChecked()):
                 skeletonRenderer = self.app.viewers["skeleton"].renderer
                 skeleton = self.viewer.renderer.performPreservingGrayscaleSkeletonizationAbeysinghe2008(skeletonRenderer.getMesh(), self.getStartingDensity(), self.getStepCount(), self.getMinCurveLength(), self.getMinSurfaceSize(), self.getCurveRadius(), self.getSurfaceRadius(), self.getSkeletonRadius())
             else:
                 skeleton = self.viewer.renderer.performGrayscaleSkeletonizationAbeysinghe2008(self.getStartingDensity(), self.getStepCount(), self.getMinCurveLength(), self.getMinSurfaceSize(), self.getCurveRadius(), self.getSurfaceRadius(), self.getSkeletonRadius())
             self.app.viewers["skeleton"].loadVolume(skeleton)
         self.setCursor(QtCore.Qt.ArrowCursor)
         self.close()
     else:
         QtGui.QMessageBox.critical(None, "Source volume unloaded", "A volume must be loaded to perform skeletonization", QtGui.QMessageBox.Ok, QtGui.QMessageBox.NoButton)
     BaseDialogWidget.accept(self)
 def accept(self):
     if (self.viewer.loaded):
         self.setCursor(QtCore.Qt.BusyCursor)
         method = self.getSkeletonizationMethod()
         if (method == 0):
             skeleton = self.viewer.renderer.performBinarySkeletonizationJu2007(
                 self.getDensityThreshold(), self.getMinCurveLength(),
                 self.getMinSurfaceSize())
             self.app.viewers["skeleton"].loadVolume(skeleton)
         self.setCursor(QtCore.Qt.ArrowCursor)
         self.close()
     else:
         QtGui.QMessageBox.critical(
             None, "Source volume unloaded",
             "A volume must be loaded to perform skeletonization",
             QtGui.QMessageBox.Ok, QtGui.QMessageBox.NoButton)
     BaseDialogWidget.accept(self)
예제 #7
0
 def accept(self):
     self.close()
     BaseDialogWidget.accept(self)
         
         
예제 #8
0
 def reject(self):
     self.close()
     BaseDialogWidget.reject(self)