OrsWindowLeveling

Manages the interaction for controlling the window leveling (brightness and contrast)

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 2020.
date:Oct 20 2015 11:06
dragonflyVersion:
 3.1.0.286 (D)
UUID:a9e331dc761e11e7bb70448a5b5d70c0

Class Code

class OrsPythonPlugins.OrsWindowLeveling.OrsWindowLeveling.OrsWindowLeveling(varName=None, managed=True)
OrsStateLeveling = 'OrsStateLeveling'
OrsStateLevelingActivation()
OrsStateLevelingInfinite = 'OrsStateLevelingInfinite'
OrsStateLevelingInfiniteActivation()
OrsStateWLGamma = 'OrsStateWLGamma'
OrsStateWindowLevelingAreaSelection = 'OrsStateWindowLevelingAreaSelection'
OrsStateWindowLevelingAreaSelectionAction()
UIDescriptors = [<ORSServiceClass.OrsPlugin.uidescriptor.UIDescriptor object>]
classmethod addControlPoint(anAnnotation, timeStep, position)
cleanup()

Deletes the variables managed by the plugin. It is the place to remove callbacks and other references to Python objects that would prevent them to be garbage collected. This method is called during the process of deletion of the plugin. It calls for the cleanup and deletion of the forms.

closable = False
closeWidget(name)
computeOptimalLevelingWithRegion()
enterTemporaryLevelingAction()
enterTemporaryWLGammaAction()
enterWindowLevelingAreaSelectionGlobalStateAction()
getCurrentViewAndDatasetPresenter()
classmethod getGammaInView(datasetPresenter, view)

Gets the gamma for a DatasetPresenter

Parameters:
Returns:

gamma (float) – gamma value. If

getState()

This method is called when saving a plugin instance in a session to obtain the information required to set up the plugin at the loading of the session.

The plugin needs to be savable (see ORSServiceClass.OrsPlugin.abstractPlugin.AbstractPlugin.savable).

Return:a string of information that will be sent back to the setState method
Rtype:str

Note

The usage of the character " is not permitted, unless escaped.

classmethod getWLInView(datasetPresenter, view)

Gets the window leveling of a DatasetPresenter

Parameters:
Returns:
  • width (float) – level width
  • center (float) – level center
handleChanged(oldState, newState)

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(event)

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
multiple = False
openWidget(name, dock=None, tab=None, x=-1, y=-1, w=-1, l=-1, order=-1)
orsCurrentDisplayChange()
orsSelectedObjectChange()
refreshUIFromModel()

Calls the UI to be updated based on the implementation

interfacemethod reset2DWindowLevelFromLayoutGenealogicalName(aSceneLayoutName, dataset)

Resets the dataset 2D window/level and gamma 2D in layout.

Parameters:
  • aSceneLayoutName (str) – a genealogical name of a scene layout
  • dataset (ORSModel.ors.Channel) – a dataset
interfacemethod reset3DWindowLevelFromLayoutGenealogicalName(aSceneLayoutName, dataset)

Resets the dataset 3D window/level and gamma 3D in layout.

Parameters:
  • aSceneLayoutName (str) – a genealogical name of a scene layout
  • dataset (ORSModel.ors.Channel) – a dataset
classmethod resetWLAndGamma(datasetPresenter, view)

Resets the Window Leveling and the gamma for a DatasetPresenter

Parameters:
savable = True
classmethod setGammaInView(datasetPresenter, view, gamma, logging=False)

Sets the gamma for a DatasetPresenter

Parameters:
classmethod setIntensityRangeInView(datasetPresenter, view, minValue, maxValue, logging=False)

Sets the window leveling for a DatasetPresenter

Parameters:
setState(state)

This method is called to set up the plugin when loading a session.

Note

This method is called only if the string returned by ORSServiceClass.OrsPlugin.orsPlugin.OrsPlugin.getState() at the saving of the session was not empty.

Parameters:state (str) – string of information as provided by the getState during the saving of the session
classmethod setWLInView(datasetPresenter, view, width, center, logging=False)

Sets the window leveling for a DatasetPresenter

Parameters:
stateDescriptors = [<ORSServiceClass.OrsPlugin.statedescriptor.StateDescriptor object>, <ORSServiceClass.OrsPlugin.statedescriptor.StateDescriptor object>, <ORSServiceClass.OrsPlugin.statedescriptor.StateDescriptor object>, <ORSServiceClass.OrsPlugin.statedescriptor.StateDescriptor object>]
switchToOrsStateLevelingAction()
temporaryWindowLevelingAreaSelectionAction()