OrsIntensityCalibration_02c7804cd04211eba97e0c9d9276653a¶
Class Code¶
- class OrsPythonPlugins.OrsIntensityCalibration_02c7804cd04211eba97e0c9d9276653a.OrsIntensityCalibration_02c7804cd04211eba97e0c9d9276653a.OrsIntensityCalibration_02c7804cd04211eba97e0c9d9276653a(*args, **kwargs)¶
- interfacemethod calibrateIntensity(aDataset: Channel, aDimensionUnit: DimensionUnit, calibrationKey1: str, preCalibratedValue1: float, calibrationKey2: str, preCalibratedValue2: float) None¶
Calibrate the intensity scale of a dataset. This is done by computing the slope and offset required to match the calibration values contained in the dimension unit for the specified calibration keys and pre-calibrated values (expressed in raw, without any slope/offset transformation). The provided dimension unit is also set.
- Parameters:
aDataset (ORSModel.ors.Channel) – source dataset
aDimensionUnit (ORSModel.ors.DimensionUnit) – new dimension unit
calibrationKey1 (str) – calibration key of the first material
preCalibratedValue1 (float) – pre-calibrated value (raw) of the first material
calibrationKey2 (str) – calibration key of the second material
preCalibratedValue2 (float) – pre-calibrated value (raw) of the second material
- interfacemethod calibrateIntensityScale(aChannel: Channel, aDimensionUnit: DimensionUnit, newSlope: float, newOffset: float) None¶
Calibrate the intensity scale of a channel; set the dimension unit, the offset and the slope of the channel.
Deprecated since version 2022.2: Use calibrateIntensity instead
- Parameters:
aChannel (ORSModel.ors.Channel) – source channel
aDimensionUnit (ORSModel.ors.DimensionUnit) – new dimension unit
newSlope (float) – new slope of Channel
newOffset (float) – new offset of Channel
- 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.
- getAcceptedDimensionUnitsForCalibration()¶
Gets the dimension units accepted for calibration (those non canonical units having at least 2 calibration materials defined).
- Return:
list of 2-tuples (dimensionUnitKey, dimensionUnitTitle)
- Rtype:
list of 2-tuples
- classmethod getMainFormClass()¶
Gets the class of the main form
- Returns:
output –
- getPluginExtendedInfrastructureClassInstance(pluginExtendedInfrastructureClass)¶
Gets the instance associated to the plugin extended infrastructure class.
- Parameters:
pluginExtendedInfrastructureClass (plugin extended infrastructure class) – a plugin extended infrastructure class supported by the plugin
- Return:
an instance of the plugin extended infrastructure class
- Rtype:
instance of plugin extended infrastructure class
- classmethod getPluginExtendedInfrastructureClasses()¶
Gets the list of the supported plugin extended infrastructure classes of the plugin.
- Returns:
output (list of classes) – list of the plugin extended infrastructure classes
- 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(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
- classmethod importAllLoggingClasses() list[Type]¶
This method is called to make any class extension available for macro playing. It should:
import all class extension;
return a list of classes where logging is supported.
- Returns:
output (list of classes) – list of classes where logging is supported by the current plugin
- prepareModelDataChanged(beforeChanges: bool, dataKind: MODEL_DATA_CHANGED)¶
Tells the plugin that his model of calibration data is about to be modified or that the changes are complete.
- setCursor(handleName)¶
Sets the current cursor
- Parameters:
state (str) – state associated to the cursor to set
