Eidolon
Public Member Functions | Static Public Attributes | Private Member Functions | List of all members
MetaImagePlugin Class Reference
Inheritance diagram for MetaImagePlugin:
Inheritance graph
Collaboration diagram for MetaImagePlugin:
Collaboration graph

Public Member Functions

def __init__ (self)
 
def init (self, plugid, win, mgr)
 
def getHelp (self)
 
def getObjFiles (self, obj)
 
def copyObjFiles (self, obj, sdir, overwrite=False)
 
def renameObjFiles (self, obj, oldname, overwrite=False)
 
def acceptFile (self, filename)
 
def loadImage (self, filename, name=None, kwargs)
 
def loadObject (self, filename, name=None, kwargs)
 
def saveImage (self, filename, obj, kwargs)
 
def saveObject (self, obj, path, overwrite=False, setFilenames=False, kwargs)
 
def getScriptCode (self, obj, kwargs)
 
- Public Member Functions inherited from ImageScenePlugin
def __init__ (self, name)
 
def getIcon (self, obj)
 
def getObjFiles (self, obj)
 
def getReprTypes (self, obj)
 
def getReprParams (self, obj, reprtype)
 
def createObjPropBox (self, obj)
 
def setCTImageRange (self, obj, isCT)
 
def getMenu (self, obj)
 
def objectMenuItem (self, obj, item)
 
def updateObjPropBox (self, obj, prop)
 
def updateReprPropBox (self, rep, prop)
 
def createReprPropBox (self, rep)
 
def applyMaterial (self, rep, mat, kwargs)
 
def createRepr (self, obj, reprtype, kwargs)
 
def createSceneObject (self, name, images, source=None, isTimeDependent=None)
 
def clone (self, obj, name)
 
def cropXY (self, obj, name, minx, miny, maxx, maxy)
 
def extractTimesteps (self, obj, name, indices=None, timesteps=None, setTimestep=False)
 
def createImageStackObject (self, name, width, height, slices, timesteps=1, pos=vec3(), rot=rotator(), spacing=vec3(1))
 
def createRespacedObject (self, obj, name, spacing=vec3(1))
 
def createIntersectObject (self, name, objs, timesteps=1, spacing=vec3(1))
 
def createTestImage (self, w, h, d, timesteps=1, pos=vec3(), rot=rotator(), spacing=vec3(1))
 
def createSequence (self, name, objs, timesteps=None)
 
def createObjectFromArray (self, name, array, interval=1.0, toffset=0, pos=vec3(), rot=rotator(), spacing=vec3(1), task=None)
 
def getImageObjectArray (self, obj, datatype=float)
 
- Public Member Functions inherited from ScenePlugin
def __init__ (self, name)
 
def init (self, plugid, win, mgr)
 
def cleanup (self)
 
def findObject (self, name, assertFound=True)
 
def removeFilesTask (self, fileglob)
 
def getScriptCode (self, obj, kwargs)
 
def getIcon (self, obj)
 
def getMenu (self, obj)
 
def getHelp (self)
 
def acceptFile (self, filename)
 
def loadObject (self, filename, name=None, kwargs)
 
def saveObject (self, obj, path, overwrite=False, setFilenames=False, kwargs)
 
def checkFileOverwrite (self, obj, dirpath, name=None)
 
def getObjFiles (self, obj)
 
def renameObjFiles (self, obj, oldname, overwrite=False)
 
def copyObjFiles (self, obj, sdir, overwrite=False)
 
def removeObject (self, obj)
 
def createRepr (self, obj, reprtype, kwargs)
 
def getReprParams (self, obj, reprtype)
 
def getReprParamHelp (self, obj, reprtype)
 
def getReprTypes (self, obj)
 
def createHandles (self, rep, kwargs)
 
def updateObjPropBox (self, obj, prop)
 
def updateReprPropBox (self, rep, prop)
 
def createObjPropBox (self, obj)
 
def createReprPropBox (self, rep)
 
def addSceneObject (self, obj)
 
def addSceneObjectRepr (self, rep)
 
def applyMaterial (self, rep, mat, kwargs)
 
def objectMenuItem (self, obj, item)
 

Static Public Attributes

tuple HeaderNames
 

Private Member Functions

def _openFileDialog (self)
 
def _exportMenuItem (self)
 

Additional Inherited Members

- Public Attributes inherited from ScenePlugin
 plugid
 
 win
 
 mgr
 
 name
 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Member Function Documentation

◆ _exportMenuItem()

def _exportMenuItem (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _openFileDialog()

def _openFileDialog (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ acceptFile()

def acceptFile (   self,
  filename 
)
Here is the call graph for this function:

◆ copyObjFiles()

def copyObjFiles (   self,
  obj,
  sdir,
  overwrite = False 
)
Here is the call graph for this function:

◆ getHelp()

def getHelp (   self)

◆ getObjFiles()

def getObjFiles (   self,
  obj 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getScriptCode()

def getScriptCode (   self,
  obj,
  kwargs 
)

◆ init()

def init (   self,
  plugid,
  win,
  mgr 
)
Here is the call graph for this function:

◆ loadImage()

def loadImage (   self,
  filename,
  name = None,
  kwargs 
)
Deprecated, for compatibility only.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadObject()

def loadObject (   self,
  filename,
  name = None,
  kwargs 
)
Loads a MetaImage image object from the header file `filename', which may contain the image data or refer to
a raw file which is then read. If `name' is None then a name for the returned ImageSceneObject is chosen from
`filename', otherwise `name' is used.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renameObjFiles()

def renameObjFiles (   self,
  obj,
  oldname,
  overwrite = False 
)
Here is the call graph for this function:

◆ saveImage()

def saveImage (   self,
  filename,
  obj,
  kwargs 
)
Deprecated, for compatibility only.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveObject()

def saveObject (   self,
  obj,
  path,
  overwrite = False,
  setFilenames = False,
  kwargs 
)
Saves the given ImageSceneObject `obj' to MetaImage file(s) prefixed with `path'. If `path' doesn't
end with .mhd or .mha, then the keyword argument `isOneFile' is used to determine whether to save as one file or
header/raw pair. In this case if `isOneFile' is True then header is stored to `path'+".mhd" and the data
in `path'+".raw". However, if either extension is given in `path', these are used to determine whether
to write to one file or two if `isOneFile' isn't present. If a MetaImage type is supplied in the keyword argument
`datatype' then the image data will be stored in that format, otherwise MET_SHORT is used. Any other keyword
arguments are added to the end of the header, or override those values named in `HeaderNames'.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ HeaderNames

tuple HeaderNames
static
Initial value:
= (
'ObjectType','NDims','BinaryData','BinaryDataByteOrderMSB','CompressedData','TransformMatrix',
'Offset','CenterOfRotation','ElementSpacing','DimSize','AnatomicalOrientation','ElementType','ElementDataFile'
)

The documentation for this class was generated from the following file: