OrsDatasetCropper

Creates subsets of datasets by cropping

author:ORS Team
contact:http://theobjects.com
email:info@theobjects.com
organization:Object Research Systems (ORS), Inc.
address:760 St-Paul West, suite 101, Montréal, Québec, Canada, H3C 1M4
copyright:Object Research Systems (ORS), Inc. All rights reserved 2018.
date:Aug 04 2015 17:43
dragonflyVersion:
 3.0
UUID:6c71e7e8761111e7be64448a5b5d70c0

Class Code

class OrsPythonPlugins.OrsDatasetCropper.OrsDatasetCropper.OrsDatasetCropper(varname=None, managed=True)
OrsStateClipBoxManipulate = 'OrsStateClipBoxManipulate'
UIDescriptors = [<ORSServiceClass.OrsPlugin.uidescriptor.UIDescriptor object>]
closable = True
closeWidget(name)
classmethod contextualMenu(context)
interfacemethod crop(structuredGrid, xMin, yMin, zMin, tMin, xMax, yMax, zMax, tMax, createNewStructuredGrid)

Crop a structured grid by index range.

Parameters:
  • structuredGrid (ORSModel.ors.StructuredGrid) – the structured grid to crop
  • xMin (int) – minimal cropping index in X
  • yMin (int) – minimal cropping index in Y
  • zMin (int) – minimal cropping index in Z
  • tMin (int) – minimal cropping index in T
  • xMax (int) – maximal cropping index in X
  • yMax (int) – maximal cropping index in Y
  • zMax (int) – maximal cropping index in Z
  • tMax (int) – maximal cropping index in T
  • createNewStructuredGrid (bool) – if True, a new dataset will be generated. If False, the input structuredGrid will be modified.
Returns:

newStructuredGrid (ORSModel.ors.StructuredGrid) – cropped dataset. If createNewStructuredGrid is False, None is returned.

interfacemethod cropFromBox(structuredGrid, createNewStructuredGrid, aBox=None, tMin=0, tMax=0)

Crop a structured grid using a box.

Parameters:
  • structuredGrid (ORSModel.ors.StructuredGrid) – the structured grid to crop
  • createNewStructuredGrid (bool) – if True, a new dataset will be generated. If False, the input structuredGrid will be modified.
  • aBox (ORSModel.ors.Box) – the box used to set the cropping range. If None, the box of the structured grid to crop is used.
  • tMin (int) – minimal cropping index in T
  • tMax (int) – maximal cropping index in T
Returns:

newStructuredGrid (ORSModel.ors.StructuredGrid) – cropped dataset. If createNewStructuredGrid is False, None is returned.

classmethod findAllDisplaysWhereStructuredGridIsVisible(structuredGrid)
getSourceStructuredGrid()
getStructuredGridGUID()
handleChanged(oldHandleName, newHandleName)

This method is called when the state of the application is changed.

Parameters:
  • oldState (str) – name of the old (previous) state
  • newState (str) – name of the new (current) state
handleTriggered(eventdata)

This method is called on every user input (mouse move, mouse click, key press, …) when the current state of the application is one of those declared by the plugin. This method can be used to perform specific tasks even if no action is currently in progress.

Parameters:eventData (OrsEvent.eventdata.InputEventData) – the event data
keepAlive = False
classmethod menuItemCrop()
multiple = False
classmethod openDatasetCropperAction(structuredGridGUID)
openWidget(name, dock=None, tab=None, x=-1, y=-1, w=-1, l=-1, order=-1)
orsCurrentDisplayChange()
savable = False
selectedObjectsChanged()
setSourceStructuredGrid(structuredGrid)
stateDescriptors = [<ORSServiceClass.OrsPlugin.statedescriptor.StateDescriptor object>]