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

Public Member Functions

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)
 

Private Member Functions

def _setParamPanel (self, obj, prop)
 
def _getUIReprParams (self, obj, prop)
 

Additional Inherited Members

- Public Attributes inherited from ScenePlugin
 plugid
 
 win
 
 mgr
 
 name
 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  name 
)

Member Function Documentation

◆ _getUIReprParams()

def _getUIReprParams (   self,
  obj,
  prop 
)
private
Here is the call graph for this function:

◆ _setParamPanel()

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

◆ applyMaterial()

def applyMaterial (   self,
  rep,
  mat,
  kwargs 
)

◆ clone()

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

◆ createImageStackObject()

def createImageStackObject (   self,
  name,
  width,
  height,
  slices,
  timesteps = 1,
  pos = vec3(),
  rot = rotator(),
  spacing = vec3(1) 
)
Create a blank image object with each timestep ordered bottom-up with integer timesteps.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createIntersectObject()

def createIntersectObject (   self,
  name,
  objs,
  timesteps = 1,
  spacing = vec3(1) 
)
Here is the call graph for this function:

◆ createObjectFromArray()

def createObjectFromArray (   self,
  name,
  array,
  interval = 1.0,
  toffset = 0,
  pos = vec3(),
  rot = rotator(),
  spacing = vec3(1),
  task = None 
)
Create an image object from the 4D Numpy array and the given parameters, `interval' denoting timestep
interval and `toffset' denoting time start point, both in ms. The dimensions of the numpy array represent
width, height, depth (or number of slices), and time in that order. Depth or time may be 1, so an array of
dimensions (X,Y,1,T) is a 2D time-dependent image series of dimensions (X,Y), while an array with (X,Y,Z,1)
is a single volume of dimensions (X,Y,Z).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createObjPropBox()

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

◆ createRepr()

def createRepr (   self,
  obj,
  reprtype,
  kwargs 
)
Here is the call graph for this function:

◆ createReprPropBox()

def createReprPropBox (   self,
  rep 
)

◆ createRespacedObject()

def createRespacedObject (   self,
  obj,
  name,
  spacing = vec3(1) 
)
Create an image object occupying the same space as `obj' with voxel dimensions given by `spacing'.

◆ createSceneObject()

def createSceneObject (   self,
  name,
  images,
  source = None,
  isTimeDependent = None 
)
Here is the caller graph for this function:

◆ createSequence()

def createSequence (   self,
  name,
  objs,
  timesteps = None 
)
Create a time-dependent object from the static images `objs', each of which becomes a timestep in the result
object. The timesteps for the result is `timesteps' or range(len(objs)) if given as None.
Here is the call graph for this function:

◆ createTestImage()

def createTestImage (   self,
  w,
  h,
  d,
  timesteps = 1,
  pos = vec3(),
  rot = rotator(),
  spacing = vec3(1) 
)
Generate a test image object with the given dimensions (w,h,d) with image values range (minv,maxv).
Here is the call graph for this function:

◆ cropXY()

def cropXY (   self,
  obj,
  name,
  minx,
  miny,
  maxx,
  maxy 
)
Here is the call graph for this function:

◆ extractTimesteps()

def extractTimesteps (   self,
  obj,
  name,
  indices = None,
  timesteps = None,
  setTimestep = False 
)
Create a clone of 'obj' containing only the images of the selected timesteps. Exactly one of `indices'
or `timesteps' must be non-None. If `indices' is not None, it must be a list of indices of timesteps to extract,
eg. to extract the first timestep a value of [0] would be used. If `timesteps' is not None, it must be a list
of times for each of which the closest timestep is chosen, eg. a value of [30] extracts the timestep closest
to 30. If `setTimestep' is True then the time values for the extract images are changed to ascending integer
values if `indices' is used or to that specified in `timesteps' if `timesteps' is used. This ensures duplicate
timesteps have different time values.
Here is the call graph for this function:

◆ getIcon()

def getIcon (   self,
  obj 
)

◆ getImageObjectArray()

def getImageObjectArray (   self,
  obj,
  datatype = float 
)
Create a 4D Numpy array of type `datatype' from the image data in `obj'. This array is intended to be
suitable as input to libraries for writing image files. The result is a dictionary with the following keys:
    array : numpy array, shape is (width,height,depth,timestep)
    pos : position in space
    spacing : pixel/voxel dimensions
    rot : spatial rotation
    toffset : time offset
    interval : time interval
Here is the caller graph for this function:

◆ getMenu()

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

◆ getObjFiles()

def getObjFiles (   self,
  obj 
)
By default there is no way to save an image but they are savable so return [] instead of None.

◆ getReprParams()

def getReprParams (   self,
  obj,
  reprtype 
)

◆ getReprTypes()

def getReprTypes (   self,
  obj 
)

◆ objectMenuItem()

def objectMenuItem (   self,
  obj,
  item 
)
Here is the call graph for this function:

◆ setCTImageRange()

def setCTImageRange (   self,
  obj,
  isCT 
)
Here is the caller graph for this function:

◆ updateObjPropBox()

def updateObjPropBox (   self,
  obj,
  prop 
)

◆ updateReprPropBox()

def updateReprPropBox (   self,
  rep,
  prop 
)
Here is the call graph for this function:

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