def extract_surface(self): vol = self.scene.cur_volume if vol == None: reply = QMessageBox.warning(self, 'Error', "No current volume loaded") return # Put a dialog to get vmin and vmax instead of fixed values 0 70 (suitable for mummy.vtk vmin = 0 vmax = 70 surf = Surface.from_volume(vol, (vmin, vmax), self.scene.material('surface_default')) if surf != None: self.add_surface(surf) else: reply = QMessageBox.warning(self, 'Error', "Something went wrong")
def extract_surface(self): vol = self.scene.cur_volume param = ExtractSurfaceDialog(self) if param.exec_(): vmin = int(param.vmin.text()) vmax = int(param.vmax.text()) else: vmin = 0 vmax = 70 if vol is None: reply = QMessageBox.warning(self, 'Error', "No current volume loaded") return # Put a dialog to get vmin and vmax instead of fixed values 0 70 (suitable for mummy.vtk surf = Surface.from_volume(vol, (vmin, vmax), self.scene.material('default')) if surf is not None: self.add_surface(surf) else: reply = QMessageBox.warning(self, 'Error', "Something went wrong")