OrsImageProcessing¶
Tool to apply a set of filters to datasets
| 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: | Dec 22 2016 11:58 |
| dragonflyVersion: | |
| 3.5 | |
| UUID: | bb7822c0761411e7a1d5448a5b5d70c0 |
Class Code¶
-
class
OrsPythonPlugins.OrsImageProcessing.orsimageprocessing.OrsImageProcessing(varname=None, managed=True)¶ -
classmethod
OrsImageProcessing_openToolbox()¶
-
UIDescriptors= [<ORSServiceClass.OrsPlugin.uidescriptor.UIDescriptor object>, <ORSServiceClass.OrsPlugin.uidescriptor.UIDescriptor object>]¶
-
interfacemethod
addOperation(filterCategory, filterName, configuration='', uuid=None)¶ add an operation to the stack
Parameters: - filterCategory (str) – category of the filter
- filterName (str) – name of the filter
- configuration (str) – xml configuration of the filter
- uuid (str) – str
Returns: output (str) – operationId or empty string if the operation was invalid
-
interfacemethod
addOutputNode(operationId, idx, title)¶ add a node that will result in a new output channel being generated after an operation
Parameters: - operationId (str) – the id of the operation
- idx (int) – the index of the output channel to saave
- title (str) – title of the new channel
Returns: output (ORSModel.ors.Channel) – the new channel
-
classmethod
applyOperationStack(fname, inputDataset, generateOutputDataset)¶
-
interfacemethod
applySetupDescriptionsToOperation(description, operationID)¶ Parameters: - description (str) – xml description of the operation
- operationID (str) –
Returns: output (bool) –
-
availableOperations= []¶
-
availableOperationsDict= {}¶
-
canBeGenericallyOpened= True¶
-
interfacemethod
clearOperations()¶ clear all operations
-
closable= True¶
-
closeWidget(name)¶
-
computeGraph= <networkx.classes.digraph.DiGraph object>¶
-
classmethod
computeOutput(node, outputRange=None)¶ Given an operation, calculate the output
Parameters: - node – an operation
- outputRange – the range to calculate
Returns: output –
-
interfacemethod
computeOutputs()¶ compute the outputs of the compute graph
Returns: output (str) – status
-
computePreviews(previews)¶ - This function will compute previews. The previews is a list of tuples containing:
- the operationId from which the preview is derived,
- the preview Channel GUID to write in
- the View GUID that the output channel is being displayed on
Parameters: previews – Return:
-
interfacemethod
connectOperationOutputToOperationInput(outOperation, outIdx, inOperation, inIdx)¶ set the output from one operation as the input of another operation
Parameters: - outOperation (str) – the id of the output operation
- outIdx (int) – the index of the output channel
- inOperation (str) – the id of the input operation
- inIdx (int) – the index of the input channel
Returns: output (bool) – a boolean if the operation was successful
-
classmethod
copyOutputsToFinalOutputs(isInApply: bool, finalOutputsThatAreToBeKept)¶
-
deletePlugin(aWidget=None)¶
-
classmethod
deleteProgressBar()¶
-
disableSceneSynchronization(views)¶ Disables the scene view synchronization for each view.
- Returns a type containing:
- 1: scene view instance 2: list of status of the zoom sync status 3: list of status of the position sync status
Parameters: views – Return:
-
classmethod
disconnectPredecessorEdge(operationId, previousInput)¶
-
displayTextOnView(text: str, view: ORSModel.ors.View)¶ This is used to show Original and Preview on the display Also, create invisible visualText for channel names
Parameters: - text –
- view –
Return:
-
fitToView(view: ORSModel.ors.View)¶
-
getAnnotationPublishedCallbackId()¶
-
static
getAvailableOperationStacks()¶
-
getBoundedPlaneCoordinatesForInputChannel(channelGUID) -> (<class 'bool'>, <class 'ORSModel.ors.Rectangle'>, <class 'ORSModel.ors.Camera'>, <class 'ORSModel.ors.View'>)¶ returns the visible range of the input channel guid on the display
Parameters: - channelGUID –
- outputChannel –
Return: returns true if the channel is displayed in our context
Return: the rectangle as a box of our view
Return: the current camera of this view
Return: the view
-
getContextualViews() → List[ORSModel.ors.View]¶ Return: Rtype: list[ors.Views]
-
classmethod
getIsOperationsStackValid(fname)¶
-
classmethod
getOperationCategoryFromFilterName(filterName)¶
-
classmethod
getOperationInputChannel(operationId, idx) → str¶
-
classmethod
getOperationsStackDescription(fname)¶
-
classmethod
getOperationsStackOutputChannelName(fname)¶
-
classmethod
getOutputs()¶
-
classmethod
getPluginInstance(operationId)¶
-
classmethod
getProgressBarGUID()¶
-
getVisualChannelCallbackId()¶
-
interfacemethod
inputOutputCountChanged(operationId, nInputs, nOutputs)¶ the number of operations changed for an operation
Parameters: - operationId (str) – id of the operation to change
- nInputs (int) – the new number of inputs
- nOutputs (int) – the new number of outputs
Returns: output (bool) – success
-
keepAlive= False¶
-
classmethod
loadConfiguration(fileLocation)¶
-
loadOperationsStack(fname)¶
-
multiple= False¶
-
static
openGUI()¶
-
static
openToolBox(operationStackFilename=None)¶
-
openWidget(name, dock=None, tab=None, x=-1, y=-1, w=-1, l=-1, order=-1)¶
-
interfacemethod
populateListOfAvailableFilters(refresh=False)¶ Populate the list of available filters
Parameters: refresh (bool) – should the list be refreshed
-
progressBarId= None¶
-
classmethod
reconnectSceneSynchronization(views, sync, zoomSynced, panSynced)¶
-
interfacemethod
removeOperation(operationId)¶ Parameters: operationId (str) – the operation id to remove Returns: output (bool) – true if the operationId existed and is succesfully removed
-
interfacemethod
removeOutputs()¶
-
savable= False¶
-
classmethod
saveConfiguration(fileLocation)¶
-
interfacemethod
setOperationConfiguration(operationId, configuration)¶ Parameters: - operationId (str) –
- configuration (str) – xml configuration obtained from filter.getSetupDescription
Returns: output (bool) – if the function was succesful
-
interfacemethod
setOperationInputChannel(operationId, idx, channel)¶ set the input of an operation to a an existing channel
Parameters: - operationId (str) – the id of the operation
- idx (int) – the index of the input channel to set
- channel (ORSModel.ors.Channel) – the channel
Returns: output (bool) – status
-
interfacemethod
setOperationOutput(outoperation, outIdx, channel)¶ set one of the output operations to an existing channel
Parameters: - outoperation (str) – the operation id
- outIdx (int) – output index
- channel (ORSModel.ors.Channel) – the existing channel
Returns: output (bool) – if the operation was successful
-
classmethod
setOperationOutputRange(operationId, outIdx, outputRange)¶ Internal usage
This will set the index of first voxel for the channel and the range to calculate on
Parameters: - operationId – the output operation id
- outIdx – the index of the operation
- outputRange – the range to calculate [x min, y min, z min, t min, x max, y max, z max, t max] or a bounded plane if the output has a defined shape
Type: str
Type: int
Type: list[str]
Returns: output (bool) – status
-
interfacemethod
setOperationOutputShapeFromStructruredGrid(operationId, structuredGrid)¶ set the shape and position of the output channel from a structured grid.
Parameters: - operationId (str) – the operation id
- structuredGrid (ORSModel.ors.StructuredGrid) – the shape to copy from
Returns: output (bool) – true if operation was succesful, false otherwise
-
interfacemethod
setOperationOutputType(outOperation, outIdx, outputType)¶ set the output type of an operation
Parameters: - outOperation (str) – the operation id
- outIdx (int) – the output index
- outputType (IntEnum CxvChannel_Data_Type) – the output type, defined by ORSDEF
Returns: output (bool) – success or not
-
classmethod
setProgressBar()¶
-
showInToolbar= True¶
-
title= 'OrsImageProcessing'¶
-
classmethod
toolsMenu()¶
-
updateViewVisualText(text: str, channel=None, views=None)¶
-
interfacemethod
validateOperations()¶ Determines if the stack of operations is valid. It will only chec if the parameters of the operation are valid.
Returns a string. If the length of the string is 0, it means it is valid.
Returns: output (str) –
-
classmethod
validateThatAllOperationsLeadingToThisOperationHasInputs(operationId)¶ validate that allOperations leading to this operation has an input and output :param operationId: :return:
-
version= '1.0'¶
-
classmethod