Package Volume :: Package Pvv :: Module zoomvolumeCommands :: Class Zoom
[hide private]
[frames] | no frames]

Class Zoom

source code

ViewerFramework.VFCommand.Command --+
                                    |
                                   Zoom
Known Subclasses:
VLIZoom

Command to zoom through a number of volume datasets.

Instance Methods [hide private]
  __init__(self)
  initValues(self)
Set the initial values.
  onAddCmdToViewer(self)
Called when the command is loaded (added) to the viewer.
  updateInfo(self, zoomTool)
updates crop box info on the input form
  guiCallback(self)
Pops up file brawser to specify data filename(if loading new data).
  parseData(self, filename)
reads .data file, extracts data info used in zooming
  checkData(self, resol, files, cs, mps)
Checks info from .data file: resol - the lowest data resolution has to be power of 2; number of files(nfiles = len(files) ) has to correspond to resol( 2**(nfiles-1)=resol; e.g.
  displayMessage(self, text, title)
Creates and displays a message dialog.
  buildForm(self)
Builds the input form (GUI).
  setMode(self)
sets the command's mode: zoom - for zooming between resolution levels, move - to get another part of parent volume (the one with highest resolution) at current level
  setZoomTool(self)
sets the zooming tool to be either the crop box or the geometry box
  setLineWidth(self, val)
sets the line width of the geometry zooming box
  reset_box(self)
resets the geometry zoom box to outline the volume
  reset_crop(self)
resets the crop box to full volume size
  volumeboxes_onoff_cb(self)
switches the outlines of the nested volumes on/off
  showZoomBox(self)
shows/hides the geometry zooming box
  max_zoom_box(self)
reduces the current zoomming tool to the max.
  reduce_to_zoom(self)
reduces current zomming tool dimensions that are greater than MAXBOXDIM to MAXBOXDIM
  dismiss(self)
dismisses the input form
  max_move_box(self)
reduces the moving box size to the max.
  reduce_to_move(self)
reduces moving box dimentions that are greater than MAXDIM to MAXDIM
  getSub(self, bounds, action, ratio, zoombounds)
gets a subvolume from a given resolution level and loads it into the Viewer
  createNewVolume(self, arrPtr, dx, dy, dz)
Creates a new volume object.
  setTransfomation(self, dx, dy, dz)
Sets the volume transformation matrix.
  loadNewVolume(self, vlivol, arrPtr)
Loads new volume object in to the viewer.
  doit_thread(self, bounds, action, ratio, zoombounds)
Executes method getSub() in a new thread.
  updateZoomTool(self)
Updates the size of the crop box or geometry box after a new volume has been loaded.
  doit(self, zoombounds=None, action=None, nextresol=None, newdata=None, **kw)
Computes bounds of subvolume when zooming in/out.
  __call__(self, zoombounds=None, action=None, resolution=None, newdata=None, **kw)
None <- Zoom(zoombounds=None, action=None, resolution=None, newdata=None, **kw) zoombounds: the bounds of the zooming box, a tuple(Xmin, Xmax, Ymin, Ymax, Zmin, Zmax), if None - no zooming action is performed; action: 'zoom in' or 'zoom out'.
  zoomin_callback(self, *arg)
Called when 'Zoom in' button is pressed.
  zoomout_callback(self, *arg)
Called when 'Zoom out' button is pressed.
  zoomto_callback(self)
Called when 'Zoom To...' button is pressed.
  cancel_cb(self)
Withdraws the GUI.
  zoomtolevel(self)
Called when 'Zoom' button of 'Zoom To' input form is pressed.
  maxboxsizeinfo(self)
  showParentVolume(self)
  update_volumeBoundBox(self)
Checks if the volume bounding box needs to be updated.
  getVolumeScale(self)
Get current scale of the volume object.
  getvolume_callback(self)
gets bounds of another subvolume of parent volume at current level in 'move' mode.

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__

initValues(self)

source code 
Set the initial values.

onAddCmdToViewer(self)

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

updateInfo(self, zoomTool)

source code 
updates crop box info on the input form

guiCallback(self)

source code 
Pops up file brawser to specify data filename(if loading new data). Creates the GUI for zooming.
Overrides: ViewerFramework.VFCommand.Command.guiCallback

parseData(self, filename)

source code 
reads .data file, extracts data info used in zooming

checkData(self, resol, files, cs, mps)

source code 
Checks info from .data file: resol - the lowest data resolution has to be power of 2; number of files(nfiles = len(files) ) has to correspond to resol( 2**(nfiles-1)=resol; e.g. resol = 8, nfiles = 4).

displayMessage(self, text, title)

source code 
Creates and displays a message dialog.

buildForm(self)

source code 
Builds the input form (GUI).

setMode(self)

source code 
sets the command's mode: zoom - for zooming between resolution levels, move - to get another part of parent volume (the one with highest resolution) at current level

setZoomTool(self)

source code 
sets the zooming tool to be either the crop box or the geometry box

setLineWidth(self, val)

source code 
sets the line width of the geometry zooming box

reset_box(self)

source code 
resets the geometry zoom box to outline the volume

reset_crop(self)

source code 
resets the crop box to full volume size

volumeboxes_onoff_cb(self)

source code 
switches the outlines of the nested volumes on/off

showZoomBox(self)

source code 
shows/hides the geometry zooming box

max_zoom_box(self)

source code 
reduces the current zoomming tool to the max. zoomable size(MAXBOXDIMxMAXBOXDIMxMAXBOXDIM)

reduce_to_zoom(self)

source code 
reduces current zomming tool dimensions that are greater than MAXBOXDIM to MAXBOXDIM

dismiss(self)

source code 
dismisses the input form

max_move_box(self)

source code 
reduces the moving box size to the max. subvolume size(MAXDIMxMAXDIMxMAXDIM)

reduce_to_move(self)

source code 
reduces moving box dimentions that are greater than MAXDIM to MAXDIM

getSub(self, bounds, action, ratio, zoombounds)

source code 
gets a subvolume from a given resolution level and loads it into the Viewer

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

source code 
Creates a new volume object.

setTransfomation(self, dx, dy, dz)

source code 
Sets the volume transformation matrix.

loadNewVolume(self, vlivol, arrPtr)

source code 
Loads new volume object in to the viewer.

doit_thread(self, bounds, action, ratio, zoombounds)

source code 
Executes method getSub() in a new thread.

updateZoomTool(self)

source code 
Updates the size of the crop box or geometry box after a new volume has been loaded.

doit(self, zoombounds=None, action=None, nextresol=None, newdata=None, **kw)

source code 
Computes bounds of subvolume when zooming in/out. Creates and loads new volume.
Overrides: ViewerFramework.VFCommand.Command.doit

__call__(self, zoombounds=None, action=None, resolution=None, newdata=None, **kw)
(Call operator)

source code 
None <- Zoom(zoombounds=None, action=None,
                resolution=None, newdata=None, **kw)
zoombounds: the bounds of the zooming box,
a tuple(Xmin, Xmax, Ymin, Ymax, Zmin, Zmax), if None - no zooming
action is performed;
action: 'zoom in' or 'zoom out'. If None - no zooming action is
performed;
resolution: zoom to resolution, an integer of power of 2. If None -
no zooming action is performed;
newdata - a text file containing data information

Overrides: ViewerFramework.VFCommand.Command.__call__

zoomin_callback(self, *arg)

source code 
Called when 'Zoom in' button is pressed. Gets the bounds of current zoomtool (crop box or geometry box). Calls doitWrapper() method.

zoomout_callback(self, *arg)

source code 
Called when 'Zoom out' button is pressed. Gets the bounds of current zoomtool (crop box or geometry box). Calls doitWrapper() method.

zoomto_callback(self)

source code 
Called when 'Zoom To...' button is pressed. Creates a subinput for to specify a zooming level.

cancel_cb(self)

source code 
Withdraws the GUI.

zoomtolevel(self)

source code 
Called when 'Zoom' button of 'Zoom To' input form is pressed.

maxboxsizeinfo(self)

source code 
None

showParentVolume(self)

source code 
None

update_volumeBoundBox(self)

source code 
Checks if the volume bounding box needs to be updated.

getVolumeScale(self)

source code 
Get current scale of the volume object.

getvolume_callback(self)

source code 
gets bounds of another subvolume of parent volume at current level in 'move' mode. (Parent volume is the one with highest resolution).