def initializeAfterStartup(self): import shutil pluginDir = os.path.dirname(__file__) logging.info('This plugin dir: {}'.format(pluginDir)) if os.path.exists(pluginDir + '/client_api.py'): os.remove(pluginDir + '/TDIOClientAPI/client_api.py') if os.path.exists(pluginDir + '/client_api.pyc'): os.remove(pluginDir + '/TDIOClientAPI/client_api.pyc') if os.path.exists( pluginDir + '/TDIOClientAPI/__pycache__/client_api.cpython-36.pyc'): os.remove(pluginDir + '/TDIOClientAPI/__pycache__/client_api.cpython-36.pyc') import qSlicerSegmentationsEditorEffectsPythonQt as qSlicerSegmentationsEditorEffects self.instance = qSlicerSegmentationsEditorEffects.qSlicerSegmentEditorScriptedEffect( None) effectFilename = os.path.join( os.path.dirname(__file__), self.__class__.__name__ + 'Lib/SegmentEditorEffect.py') self.instance.setPythonSource(effectFilename.replace('\\', '/')) self.instance.self().register() if not slicer.app.commandOptions().noMainWindow: self.settingsPanel = SegmentEditorTDIOSettingsPanel() slicer.app.settingsDialog().addPanel('TrainingData.io', self.settingsPanel)
def __init__(self, parent): ScriptedLoadableModule.__init__(self, parent) parent.title = "Segment Editor PET Tumor Segmentation" parent.categories = ["Developer Tools.Segment Editor Extensions"] parent.contributors = [ "Christian Bauer (University of Iowa), Markus van Tol (University of Iowa), Steve Pieper (Isomics)" ] # insert your name in the list parent.helpText = """ PET Tumor Segmentation Module """ parent.acknowledgementText = """ This editor extension was developed by Christian Bauer, University of Iowa and Markus van Tol, Univesity of Iowa based on work by: Steve Pieper, Isomics, Inc. based on work by: Jean-Christophe Fillion-Robin, Kitware Inc. and was partially funded by NIH grants U01CA140206, U24CA180918 and 3P41RR013218. """ # don't show this module - it only appears in the Editor module parent.hidden = True # register segmenation effect import qSlicerSegmentationsEditorEffectsPythonQt as effects scriptedEffect = effects.qSlicerSegmentEditorScriptedEffect(None) scriptedEffect.setPythonSource(__file__.replace('\\', '/')) scriptedEffect.self().register()
def registerEditorEffect(self): import qSlicerSegmentationsEditorEffectsPythonQt as qSlicerSegmentationsEditorEffects instance = qSlicerSegmentationsEditorEffects.qSlicerSegmentEditorScriptedEffect( None) effectFilename = os.path.join( os.path.dirname(__file__), self.__class__.__name__ + 'Lib/SegmentEditorEffect.py') instance.setPythonSource(effectFilename.replace('\\', '/')) instance.self().register()
def initializeAfterStartup(self): # Copy client_api if running from build tree to avoid the need to configure the project with CMake # (in the install tree, CMake takes care of the copy and this code section is not used). import shutil pluginDir = os.path.dirname(__file__) logging.info('This plugin dir: {}'.format(pluginDir)) if os.path.exists(pluginDir + '/../../py_client/client_api.py'): logging.info('Running from build tree - update client_api.py') if os.path.exists(pluginDir + '/client_api.py'): os.remove(pluginDir + '/NvidiaAIAAClientAPI/client_api.py') if os.path.exists(pluginDir + '/client_api.pyc'): os.remove(pluginDir + '/NvidiaAIAAClientAPI/client_api.pyc') if os.path.exists( pluginDir + '/NvidiaAIAAClientAPI/__pycache__/client_api.cpython-36.pyc' ): os.remove( pluginDir + '/NvidiaAIAAClientAPI/__pycache__/client_api.cpython-36.pyc' ) shutil.copy(pluginDir + '/../../py_client/client_api.py', pluginDir + '/NvidiaAIAAClientAPI/client_api.py') # Register segment editor effect import qSlicerSegmentationsEditorEffectsPythonQt as qSlicerSegmentationsEditorEffects instance = qSlicerSegmentationsEditorEffects.qSlicerSegmentEditorScriptedEffect( None) effectFilename = os.path.join( os.path.dirname(__file__), self.__class__.__name__ + 'Lib/SegmentEditorEffect.py') instance.setPythonSource(effectFilename.replace('\\', '/')) instance.self().register() # Register settings panel if not slicer.app.commandOptions().noMainWindow: self.settingsPanel = SegmentEditorNvidiaAIAASettingsPanel() slicer.app.settingsDialog().addPanel("NVidia", self.settingsPanel)
def clone(self): # It should not be necessary to modify this method import qSlicerSegmentationsEditorEffectsPythonQt as effects clonedEffect = effects.qSlicerSegmentEditorScriptedEffect(None) clonedEffect.setPythonSource(__file__.replace('\\', '/')) return clonedEffect
def registerEditorEffect(self): import qSlicerSegmentationsEditorEffectsPythonQt as qSlicerSegmentationsEditorEffects instance = qSlicerSegmentationsEditorEffects.qSlicerSegmentEditorScriptedEffect(None) effectFilename = os.path.join(os.path.dirname(__file__), self.__class__.__name__+'Lib/SegmentEditorEffect.py') instance.setPythonSource(effectFilename.replace('\\','/')) instance.self().register()
def clone(self): import qSlicerSegmentationsEditorEffectsPythonQt as effects clonedEffect = effects.qSlicerSegmentEditorScriptedEffect(None) clonedEffect.setPythonSource(__file__.replace('\\','/')) return clonedEffect
def registerEditorEffect(self): import qSlicerSegmentationsEditorEffectsPythonQt as effects scriptedEffect = effects.qSlicerSegmentEditorScriptedEffect(None) scriptedEffect.setPythonSource(__file__.replace('\\', '/')) scriptedEffect.self().register()
def clone(self): # It should not be necessary to modify this method import qSlicerSegmentationsEditorEffectsPythonQt as effects clonedEffect = effects.qSlicerSegmentEditorScriptedEffect(None) clonedEffect.setPythonSource(__file__.replace('\\','/')) return clonedEffect
def clone(self): import qSlicerSegmentationsEditorEffectsPythonQt as effects clonedEffect = effects.qSlicerSegmentEditorScriptedEffect(None) clonedEffect.setPythonSource(SegmentEditorGrowCutEffect.filePath) return clonedEffect