当前位置: 首页>>代码示例>>Python>>正文


Python app.coreIOManager函数代码示例

本文整理汇总了Python中slicer.app.coreIOManager函数的典型用法代码示例。如果您正苦于以下问题:Python coreIOManager函数的具体用法?Python coreIOManager怎么用?Python coreIOManager使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了coreIOManager函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: loadNodeFromFile

def loadNodeFromFile(filename, filetype, properties={}, returnNode=False):
  from slicer import app
  from vtk import vtkCollection
  properties['fileName'] = filename

  if returnNode:
      loadedNodes = vtkCollection()
      success = app.coreIOManager().loadNodes(filetype, properties, loadedNodes)
      return success, loadedNodes.GetItemAsObject(0)
  else:
      success = app.coreIOManager().loadNodes(filetype, properties)
      return success
开发者ID:gregsharp,项目名称:Slicer,代码行数:12,代码来源:util.py

示例2: saveNode

 def saveNode(self,node, filename, properties={}):
   """Save 'node' data into 'filename'.
   It is the user responsability to provide the appropriate file extension.
   User has also the possibility to overwrite the fileType internally retrieved using
   method 'qSlicerCoreIOManager::fileWriterFileType(vtkObject*)'. This can be done
   by specifiying a 'fileType'attribute to the optional 'properties' dictionary.
   """
   from slicer import app
   properties["nodeID"] = node.GetID();
   properties["fileName"] = filename
   if hasattr(properties, "fileType"):
     filetype = properties["fileType"]
   else:
     filetype = app.coreIOManager().fileWriterFileType(node)
   return app.coreIOManager().saveNodes(filetype, properties)
开发者ID:mtisdall,项目名称:SEEGA,代码行数:15,代码来源:ContactPositionEstimator.py

示例3: saveScene

def saveScene(filename, properties={}):
  """Save the current scene.

  Based on the value of 'filename', the current scene is saved either
  as a MRML file, MRB file or directory.

  If filename ends with '.mrml', the scene is saved as a single file
  without associated data.

  If filename ends with '.mrb', the scene is saved as a MRML bundle (Zip
  archive with scene and data files).

  In every other case, the scene is saved in the directory
  specified by 'filename'. Both MRML scene file and data
  will be written to disk. If needed, directories and sub-directories
  will be created.
  """
  from slicer import app
  filetype = 'SceneFile'
  properties['fileName'] = filename
  return app.coreIOManager().saveNodes(filetype, properties)
开发者ID:gregsharp,项目名称:Slicer,代码行数:21,代码来源:util.py

示例4: openAddVolumeDialog

def openAddVolumeDialog():
  from slicer import app
  return app.coreIOManager().openAddVolumeDialog()
开发者ID:gregsharp,项目名称:Slicer,代码行数:3,代码来源:util.py

示例5: openAddFiberBundleDialog

def openAddFiberBundleDialog():
  from slicer import app
  return app.coreIOManager().openAddFiberBundleDialog()
开发者ID:gregsharp,项目名称:Slicer,代码行数:3,代码来源:util.py

示例6: openSaveDataDialog

def openSaveDataDialog():
  from slicer import app
  return app.coreIOManager().openSaveDataDialog()
开发者ID:gregsharp,项目名称:Slicer,代码行数:3,代码来源:util.py

示例7: openAddColorTableDialog

def openAddColorTableDialog():
  from slicer import app
  return app.coreIOManager().openAddColorTableDialog()
开发者ID:gregsharp,项目名称:Slicer,代码行数:3,代码来源:util.py

示例8: openAddFiducialDialog

def openAddFiducialDialog():
  from slicer import app
  return app.coreIOManager().openAddFiducialDialog()
开发者ID:gregsharp,项目名称:Slicer,代码行数:3,代码来源:util.py

示例9: openAddSegmentationDialog

def openAddSegmentationDialog():
  from slicer import app, qSlicerFileDialog
  return app.coreIOManager().openDialog('SegmentationFile', qSlicerFileDialog.Read)
开发者ID:gregsharp,项目名称:Slicer,代码行数:3,代码来源:util.py

示例10: openAddTransformDialog

def openAddTransformDialog():
  from slicer import app
  return app.coreIOManager().openAddTransformDialog()
开发者ID:gregsharp,项目名称:Slicer,代码行数:3,代码来源:util.py

示例11: loadScene

def loadScene(filename, clear = True):
  filetype = 'SceneFile'
  properties = {'fileName':filename}
  return app.coreIOManager().loadNodes(filetype, properties)
开发者ID:langstraat,项目名称:Slicer,代码行数:4,代码来源:util.py

示例12: openAddScalarOverlayDialog

def openAddScalarOverlayDialog():
  from slicer import app
  return app.coreIOManager().openAddScalarOverlayDialog()
开发者ID:gregsharp,项目名称:Slicer,代码行数:3,代码来源:util.py

示例13: loadDTI

def loadDTI(filename):
  from slicer import app, qSlicerIO
  filetype = qSlicerIO.DTIFile
  properties = {}
  return app.coreIOManager().loadNodes(filetype, properties)
开发者ID:151706061,项目名称:Slicer,代码行数:5,代码来源:util.py

示例14: loadVolume

def loadVolume(filename):
  from slicer import app, qSlicerIO
  filetype = qSlicerIO.VolumeFile
  properties = {'fileName':filename}
  return app.coreIOManager().loadNodes(filetype, properties)
开发者ID:151706061,项目名称:Slicer,代码行数:5,代码来源:util.py

示例15: loadScene

def loadScene(filename, clear = True):
  from slicer import app, qSlicerIO
  filetype = qSlicerIO.SceneFile
  properties = {'fileName':filename}
  return app.coreIOManager().loadNodes(filetype, properties)
开发者ID:151706061,项目名称:Slicer,代码行数:5,代码来源:util.py


注:本文中的slicer.app.coreIOManager函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。