Package Volume :: Package Pvv :: Module getsubvolCommands :: Class GetSubvolume
[hide private]
[frames] | no frames]

Class GetSubvolume

source code

ViewerFramework.VFCommand.Command --+
                                    |
                                   GetSubvolume
Known Subclasses:
VLISubvolume

Instance Methods [hide private]
  __init__(self)
  onAddCmdToViewer(self)
Called when the command is added(loaded) to the viewer
  updateInfo(self, crop)
Updates the entries on the input form when the size of the crop box is changed.
  guiCallback(self)
Creates the input form (GUI).
  getDataArr(self, x, y, z)
Returns an array of volume data
  buildForm(self)
Adds widgets to the input form
  dismiss(self)
Dismisses the input form.
  readVox(self, filename)
Reads and returns data from .vox file
  mvin_cb(self)
called when '>>' button is pressed (to get a new subvolume)
  mvout_cb(self)
called when '<<' button is pressed (to return to original volume)
  __call__(self, cropbounds, action, fixvolume=1, **kw)
None <- GetSubvolume(cropbounds, action, fixvolume = 1)...
  doit(self, cropbounds, action, fixvolume, **kw)
Gets a subvolume, loads it as a new volume into the viewer
  createNewVolume(self, narr, dx, dy, dz)
Creates new volume object and adds it to the viewer.
  switch_box(self)
Shows/hides an outline of parent(main) volume
  change_boxsize(self)
Updates the size of the box otlining parent (original) volume
  update_box(self)
Sets correct scale and translation to the box outlining parent (original) volume
  resetCrop_cb(self)
Resets the crop box to the volume size

Inherited from ViewerFramework.VFCommand.Command: __repr__, addCallbackAfter, addCallbackBefore, addUndoCall, afterDoit, beforeDoit, buildFormDescr, buildLogArgList, checkDependencies, cleanup, customizeGUI, doitWrapper, getArguments, getHelp, getLogArgs, getValNamedArgs, log, logString, onAddNewCmd, setupUndoAfter, setupUndoBefore, showForm, strArg, tkCb, updateGeom, warningMsg


Class Variables [hide private]

Inherited from ViewerFramework.VFCommand.Command: negateKw, objArgOnly


Method Details [hide private]

__init__(self)
(Constructor)

source code 
None
Overrides: ViewerFramework.VFCommand.Command.__init__

onAddCmdToViewer(self)

source code 
Called when the command is added(loaded) to the viewer
Overrides: ViewerFramework.VFCommand.Command.onAddCmdToViewer

updateInfo(self, crop)

source code 
Updates the entries on the input form when the size of the crop box is changed.

guiCallback(self)

source code 
Creates the input form (GUI). Called every time the 'Get Subvolume' button is pressed
Overrides: ViewerFramework.VFCommand.Command.guiCallback

getDataArr(self, x, y, z)

source code 
Returns an array of volume data

buildForm(self)

source code 
Adds widgets to the input form

dismiss(self)

source code 
Dismisses the input form. Called when 'Dismiss' button is pressed

readVox(self, filename)

source code 
Reads and returns data from .vox file

mvin_cb(self)

source code 
called when '>>' button is pressed (to get a new subvolume)

mvout_cb(self)

source code 
called when '<<' button is pressed (to return to original volume)

__call__(self, cropbounds, action, fixvolume=1, **kw)
(Call operator)

source code 
None <- GetSubvolume(cropbounds, action, fixvolume = 1)
cropbounds : bounds of the cropping box(subvolume):
          a tuple(Xmin, Xmax, Ymin, Ymax, Zmin, Zmax);
action : can be either 'mvin' to get a subvolume or
         'mvout' to return to original(parent) volume;
fixvolume: if set to 1 the current volume becomes the
           original(parent) volume 

Overrides: ViewerFramework.VFCommand.Command.__call__

doit(self, cropbounds, action, fixvolume, **kw)

source code 
Gets a subvolume, loads it as a new volume into the viewer
Overrides: ViewerFramework.VFCommand.Command.doit

createNewVolume(self, narr, dx, dy, dz)

source code 
Creates new volume object and adds it to the viewer.

switch_box(self)

source code 
Shows/hides an outline of parent(main) volume

change_boxsize(self)

source code 
Updates the size of the box otlining parent (original) volume

update_box(self)

source code 
Sets correct scale and translation to the box outlining parent (original) volume

resetCrop_cb(self)

source code 
Resets the crop box to the volume size