OrsLibraries¶
globalvariables¶
-
class
OrsLibraries.globalvariables.OrsValueDictionary(*args, **kwargs)¶ This wrapper allows the dictionary keys to be accessed as attributes
For example: OrsGlobalVariables = OrsValueDictionary() OrsGlobalVariables.obj = obj print(OrsGlobalVariables.obj == OrsGlobalVariables[‘obj’] ) #prints True
libfilters¶
Bilateral¶
-
class
OrsLibraries.libfilters.Bilateral¶ -
static
apply(inputChannelId, outputChannelId, xMin, yMin, zMin, tMin, xMax, yMax, zMax, tMax, xIndexFirstVoxelInput, yIndexFirstVoxelInput, zIndexFirstVoxelInput, tIndexFirstVoxelInput, xIndexFirstVoxelOutput, yIndexFirstVoxelOutput, zIndexFirstVoxelOutput, tIndexFirstVoxelOutput, progressId, kernelFullsize, sigmaColor, sigmaSpatial)¶
-
static
Gabor¶
-
class
OrsLibraries.libfilters.Gabor¶ -
static
apply(inputChannelId, outputChannelId, xMin, yMin, zMin, tMin, xMax, yMax, zMax, tMax, xIndexFirstVoxelInput, yIndexFirstVoxelInput, zIndexFirstVoxelInput, tIndexFirstVoxelInput, xIndexFirstVoxelOutput, yIndexFirstVoxelOutput, zIndexFirstVoxelOutput, tIndexFirstVoxelOutput, progressId, kSize, sigma, theta, lambd, gamma)¶
-
static
LocalEntropyMinimization¶
-
class
OrsLibraries.libfilters.LocalEntropyMinimization¶ -
static
apply(inputChannelId, outputChannelId, xMin, yMin, zMin, tMin, xMax, yMax, zMax, tMax, xIndexFirstVoxelInput, yIndexFirstVoxelInput, zIndexFirstVoxelInput, tIndexFirstVoxelInput, xIndexFirstVoxelOutput, yIndexFirstVoxelOutput, zIndexFirstVoxelOutput, tIndexFirstVoxelOutput, progressId, nodeCount, iterationCount, compensationMethod)¶
-
static
isLocalEntropyMinimizationAvailable()¶
-
static
MeanShift¶
-
class
OrsLibraries.libfilters.MeanShift¶ -
static
apply(inputChannelId, outputChannelId, xMin, yMin, zMin, tMin, xMax, yMax, zMax, tMax, xIndexFirstVoxelInput, yIndexFirstVoxelInput, zIndexFirstVoxelInput, tIndexFirstVoxelInput, xIndexFirstVoxelOutput, yIndexFirstVoxelOutput, zIndexFirstVoxelOutput, tIndexFirstVoxelOutput, progressId, kernelHalfsizeX, kernelHalfsizeY, kernelHalfsizeZ, maximalDistanceX, maximalDistanceY, noiseSpread)¶
-
static
NonLocalMeans¶
-
class
OrsLibraries.libfilters.NonLocalMeans¶ -
static
apply(inputChannelId, outputChannelId, xMin, yMin, zMin, tMin, xMax, yMax, zMax, tMax, xIndexFirstVoxelInput, yIndexFirstVoxelInput, zIndexFirstVoxelInput, tIndexFirstVoxelInput, xIndexFirstVoxelOutput, yIndexFirstVoxelOutput, zIndexFirstVoxelOutput, tIndexFirstVoxelOutput, progressId, kernelSize, ricianNoise, smoothing)¶
-
static
isNonLocalMeansAvailable()¶
-
static
SamplingRBF2D¶
-
class
OrsLibraries.libfilters.SamplingRBF2D¶ -
static
apply(inputChannelId, outputChannelId, xMin, yMin, zMin, tMin, xMax, yMax, zMax, tMax, xIndexFirstVoxelInput, yIndexFirstVoxelInput, zIndexFirstVoxelInput, tIndexFirstVoxelInput, xIndexFirstVoxelOutput, yIndexFirstVoxelOutput, zIndexFirstVoxelOutput, tIndexFirstVoxelOutput, progressId, kernelSize, primitiveId, smoothing, compensationMethod)¶
-
static
isSamplingRBF2DAvailable()¶
-
static
Sobel¶
-
class
OrsLibraries.libfilters.Sobel¶ -
static
apply(inputChannelId, outputChannelId, xMin, yMin, zMin, tMin, xMax, yMax, zMax, tMax, xIndexFirstVoxelInput, yIndexFirstVoxelInput, zIndexFirstVoxelInput, tIndexFirstVoxelInput, xIndexFirstVoxelOutput, yIndexFirstVoxelOutput, zIndexFirstVoxelOutput, tIndexFirstVoxelOutput, progressId, bUseGradientX, bUseGradientY, bUseGradientZ)¶
-
static
Moments¶
-
class
OrsLibraries.libfilters.Moments¶ -
static
apply(inputChannelId, outputChannelId, xMin, yMin, zMin, tMin, xMax, yMax, zMax, tMax, xIndexFirstVoxelInput, yIndexFirstVoxelInput, zIndexFirstVoxelInput, tIndexFirstVoxelInput, xIndexFirstVoxelOutput, yIndexFirstVoxelOutput, zIndexFirstVoxelOutput, tIndexFirstVoxelOutput, progressId, kernelSizeX, kernelSizeY, kernelSizeZ, order)¶
-
static
HistogramOfIntensities¶
-
class
OrsLibraries.libfilters.HistogramOfIntensities¶ -
static
apply(inputChannelId, outputChannelId, xMin, yMin, zMin, tMin, xMax, yMax, zMax, tMax, xIndexFirstVoxelInput, yIndexFirstVoxelInput, zIndexFirstVoxelInput, tIndexFirstVoxelInput, xIndexFirstVoxelOutput, yIndexFirstVoxelOutput, zIndexFirstVoxelOutput, tIndexFirstVoxelOutput, progressId, kernelSizeX, kernelSizeY, kernelSizeZ, binCounts)¶
-
static
SuperPixel¶
-
class
OrsLibraries.libfilters.SuperPixel¶ -
static
apply(inputChannelId, outputChannelId, xMin, yMin, zMin, tMin, xMax, yMax, zMax, tMax, xIndexFirstVoxelInput, yIndexFirstVoxelInput, zIndexFirstVoxelInput, tIndexFirstVoxelInput, xIndexFirstVoxelOutput, yIndexFirstVoxelOutput, zIndexFirstVoxelOutput, tIndexFirstVoxelOutput, progressId, nSuperpixels, sigma)¶
-
static
libfunctions¶
-
class
OrsLibraries.libfunctions.LibFunctions¶ -
static
checkIfUpdatesAreAvailable()¶
-
static
getDICOMAttributes(file_path)¶
-
static
getDICOMSequenceData(file_path, group=0, element=0)¶
-
static
getIs3DAllowed()¶
-
static
getIsAllowedToUpdate()¶
-
static
getMessageReturnedFromServerWhenCheckingForUpdates()¶
-
static
getObjectsThatIntersectWithSurfaceOfMask(sourceROI, maskROI, tIndex, connectedROI, nonConnectedROI)¶
-
static
getSaveFileNameForViewAnimator(parent=None, view=None)¶
-
static
getShouldCheckIfUpdateIsAvailable()¶
-
static
getUpdateInformation()¶
-
static
libpython¶
libutil¶
-
class
OrsLibraries.libutil.LibUtil¶ -
static
createUpdateDatasetGroup(sGroupID, sGroupName, sGroupDescription, sGroupDemographicChannelGUID)¶
-
static
exportLUTToTFIFile(lutGuid, filename)¶
-
static
getCompanyFolder()¶
-
static
getDatasetDateTime(datasetGuid)¶
-
static
getDatasetDescription(datasetGuid)¶
-
static
getDatasetGroupChannelForDemographicGUID(groupGuid)¶
-
static
getDatasetGroupDescription(groupGuid)¶
-
static
getDatasetGroupName(groupGuid)¶
-
static
getDatasetGroups(datasetGuid)¶
-
static
getDatasetImageCount(datasetGuid)¶
-
static
getDatasetModality(datasetGuid)¶
-
static
getDatasetProtocol(datasetGuid)¶
-
static
getDerivedState(datasetGuid)¶
-
static
getEmptyObjectsOfTypesFoundInFile(filename)¶
-
static
getExistingCredentialsFilePath()¶
-
static
getHideAboutPluginsMenu()¶
-
static
getHideContactSupportMenu()¶
-
static
getHideInfiniteToolbox()¶
-
static
getHideReportAnIssueMenu()¶
-
static
getHideUserProfileMenu()¶
-
static
getIsDatasetGroup(groupGuid)¶
-
static
getProductFolder()¶
-
static
getQPixmapForAbstractMesh(datasetGuid)¶
-
static
getQPixmapForChannel(datasetGuid)¶
-
static
getShowForumMenuItems()¶
-
static
importLUTFromTFIFile(lutGuid, filename)¶
-
static
isOEM()¶
-
static
setDatasetDescription(datasetGuid, description)¶
-
static
setDefaultDatasetMetaData(datasetGuid, title)¶
-
static
logger¶
luteditor¶
MakeAMaze¶
Functions to create 3d maze in a numpy array. Each maze functions return a numpy array that can be made into a channel with createChannelFromNumpyArray()
Use KruskalMaze for huge maze. Creating huge maze may take a while and use lots of memory.
-
class
OrsLibraries.MakeAMaze.BacktrackMaze¶ Backtrack Maze
based on : http://weblog.jamisbuck.org/2010/12/27/maze-generation-recursive-backtracking
-
East= 8¶
-
Nadir= 64¶
-
North= 2¶
-
South= 4¶
-
West= 16¶
-
Zenith= 32¶
-
dx= {2: 0, 4: 0, 8: 2, 16: -2, 32: 0, 64: 0}¶
-
dy= {2: 2, 4: -2, 8: 0, 16: 0, 32: 0, 64: 0}¶
-
dz= {2: 0, 4: 0, 8: 0, 16: 0, 32: 2, 64: -2}¶
-
generate(width, height, depth)¶ Backtrack maze generation algorithm
Parameters: - width (int) –
- height (int) –
- depth (int) –
Returns: grid (numpy array) – A numpy array
-
-
class
OrsLibraries.MakeAMaze.PrimMaze¶ Prim’s Maze
based on : http://weblog.jamisbuck.org/2011/1/10/maze-generation-prim-s-algorithm
-
generate(width, height, depth)¶ Prim”s maze generation algorithm
Parameters: - width (int) –
- height (int) –
- depth (int) –
Returns: grid (numpy array) – A numpy array
-
-
class
OrsLibraries.MakeAMaze.KruskalMaze¶ Kruskal’s Maze
based on : https://www.youtube.com/watch?v=5xosHRdxqHA
-
generate(width, height, depth)¶ Kruskal’s maze generation algorithm
Parameters: - width (int) –
- height (int) –
- depth (int) –
Returns: grid (numpy array) – A numpy array
-
preferences¶
-
class
OrsLibraries.preferences.Preferences¶ -
static
getAttribute(sXPath, sName)¶
-
static
getBoolAttribute(sXPath, sName)¶
-
static
getBoolValue(sXPath, default=False)¶
-
static
getCOLORREFAttribute(sXPath, sName)¶
-
static
getCOLORREFValue(sXPath, default=0)¶
-
static
getDefaultAngleUnit()¶
-
static
getDefaultLengthUnit()¶
-
static
getDefaultSurfaceUnit()¶
-
static
getDefaultUnitOfSameType(dimensionUnit)¶
-
static
getDefaultVolumeUnit()¶
-
static
getDoubleAttribute(sXPath, sName)¶
-
static
getDoubleValue(sXPath, default=0)¶
-
static
getGenericDiscreteUnit()¶
-
static
getInt64Attribute(sXPath, sName)¶
-
static
getInt64Value(sXPath, default=0)¶
-
static
getORSColorAttribute(sXPath)¶
-
static
getORSColorValue(sXPath, default=0)¶
-
static
getPrecisionOfMeasures()¶
-
static
getQColorAttribute(sXPath)¶
-
static
getQColorValue(sXPath)¶
-
static
getRGBAttribute(sXPath)¶
-
static
getRGBValue(sXPath, default=0)¶
-
static
getUInt64Attribute(sXPath, sName)¶
-
static
getUInt64Value(sXPath, default=0)¶
-
static
getUnitTypeFromUnitId(id)¶
-
static
getValue(sXPath, default='')¶
-
static
getZoomAtCursorPosition()¶
-
unitFactory= orsObj('34311488114600629372CxvDimensionUnit')¶
-
static
savedstate¶
-
class
OrsLibraries.savedstate.SavedState¶ -
static
addRecentDataset(filename)¶
-
static
addRecentImageProcessingOperations(filename)¶
-
static
addRecentMesh(filename)¶
-
static
addRecentSession(filename)¶
-
static
getNumericStateData(key, defaultvalue=None)¶
-
static
getRecentDatasets()¶
-
static
getRecentDatasetsCount()¶
-
static
getRecentImageProcessingOperations()¶
-
static
getRecentImageProcessingOperationsCount()¶
-
static
getRecentMeshes()¶
-
static
getRecentMeshesCount()¶
-
static
getRecentSessions()¶
-
static
getRecentSessionsCount()¶
-
static
getStringStateData(key, defaultvalue=None)¶
-
static
removeRecentImageProcessingOperations(filename)¶
-
static
removeRecentSession(filename)¶
-
static
setNonUnicodeStringStateData(key, value)¶
-
static
setNumericStateData(key, value)¶
-
static
setStringStateData(key, value)¶
-
static
thicknessoperator¶
-
class
OrsLibraries.thicknessoperator.ThicknessOperator¶ -
computeThicknessMesh(tIndex, bShowProgress, bAllowToCancelProgress, iResult, smoothingIterationsCount=0)¶ Return: a Mesh
-
computeThicknessMeshSampled(xSampling, ySampling, zSampling, tIndex, bShowProgress, bAllowToCancelProgress, iResult, smoothingIterationsCount=0)¶ Return: a Mesh
-
computeThicknessMeshWithOutMeshAsInput(ioMesh, tIndex, bShowProgress, bAllowToCancelProgress, iResult)¶ Return: True if worked, else False ..note: Compute Thickness Mesh with output mesh as an input
-
classmethod
computeVolumeThickness(source, tIndex, IProgress, iResult)¶ Returns: output – a channel of the volume thickness
-
visualmain¶
workingcontext¶
-
class
OrsLibraries.workingcontext.WorkingContext¶ -
static
actOnClickedMenu(instance, aMenuParams, actionData)¶
-
static
addMultipleToEntities(instance, entityClass, values)¶ Add multiples values to an entity class name :param instance: context instance :param entityClass: entity class name (str) :param values: a list of str
-
static
addOrsWidget(impl, widgetName, widget, dock=None, tab=None, x=-1, y=-1, w=-1, l=-1, order=-1, show=True)¶
-
static
addToEntities(instance, entityClass, value)¶ Add a value to an entity class name :param instance: context instance :param entityClass: entity class name (str) :param value: a str
-
static
addToNamedEntities(instance, entityClass, entityName, value)¶
-
static
addWorkingArea(instance, widget)¶
-
static
callEntryPointNoArguments(instance, name)¶
-
static
callEntryPointOneArgument(instance, name, param=None)¶
-
static
callEntryPointTwoArguments(instance, name, param1=None, param2=None)¶
-
static
clearEntities(instance, entityClass)¶
-
static
clearNamedEntities(instance, entityClass, entityName)¶
-
static
closeWidget(instance, name)¶
-
static
deleteContext(instance)¶
-
static
deletePlugin(instance)¶
-
static
deregisterOrsWidget(pluginName, instance, widget)¶
-
static
executeActionNamed(instance, action_name)¶
-
static
forbidActions(instance, actions=None)¶
-
static
forbidMenuItemIds(instance, ids=None)¶
-
static
forbidStates(instance, states=None)¶
-
static
getContextNameFor(instance)¶
-
static
getCurrentContextVariableName()¶
-
static
getCurrentContextWindow() → PyQt5.QtWidgets.QMainWindow¶
-
static
getCurrentEntity(instance, entityClass)¶ Get the value associated to an entity class name :param instance: context instance :param entityClass: entity class name (str) :return: a str
-
static
getCurrentGlobalState(instance)¶ Gets the current global state :param instance: context instance :return: the state (str)
-
static
getCurrentNamedEntity(instance, entityClass, entityName)¶ Get the named value associated to an entity class name :param instance: context instance :param entityClass: entity class name (str) :param entityName: entity name (str) :return: a str
-
static
getCurrentState()¶
-
static
getCurrentView(instance) → ORSModel.ors.View¶ Returns the currently active view :param instance: context instance :return: a View or None
-
static
getCursorFileForHandle(instance, handlename)¶
-
static
getEntities(instance, entityClass)¶
-
static
getEntitiesCount(instance, entityClass)¶
-
static
getEntitiesDataFlattened(instance)¶
-
static
getEntitiesOfClass(instance, entityClass, progid)¶
-
static
getEntitiesOfClassAsObjects(instance, entityClass, progid)¶
-
static
getEntityDataFlattened(instance)¶
-
static
getEntityNamesForMultipleEntities(instance, entityClass)¶
-
static
getEntityNamesForSingleEntity(instance, entityClass)¶
-
static
getEventData(instance)¶ Deprecated since version 4.0.
Note
The event data should be obtained from the input argument of
ORSServiceClass.OrsPlugin.orsPlugin.OrsPlugin.handleTriggered()or of the action methods.
-
static
getExistsInEntities(instance, entityClass, value)¶
-
static
getExistsInNamedEntities(instance, entityClass, entityName, value)¶
-
static
getForbiddenActions(instance)¶
-
static
getForbiddenMenuItemIds(instance)¶
-
static
getForbiddenStates(instance)¶
-
static
getListOfPluginsThatCanBeOpened()¶
-
static
getNamedEntities(instance, entityClass, entityName)¶
-
static
getNamedEntitiesCount(instance, entityClass, entityName)¶
-
static
getNamedEntitiesDataFlattened(instance)¶
-
static
getNamedEntitiesOfClass(instance, entityClass, entityName, progid)¶
-
static
getNamedEntitiesOfClassAsObjects(instance, entityClass, entityName, progid)¶
-
static
getNamedEntityDataFlattened(instance)¶
-
static
getOrsMenu(instance, aClassMenu, guidsList)¶
-
static
getStateTitle(instance, state)¶ Get’s the title of the state :param instance: context instance :param state: state (str) :return: a string
-
static
getUIEnabled(instance)¶
-
static
getVariableNameForClass(className)¶
-
static
getViewUnderCursor(instance) → ORSModel.ors.View¶ Returns the view under the cursor :param instance: context instance :return: a View or None
-
static
getWidgetDisposition(instance, plugin_name, form_name)¶
-
static
initContext(name, varName)¶
-
static
initMenus()¶
-
static
initOrsMenu(menu, aMenuParams)¶
-
static
initPlugin(name, varName)¶
-
static
initPythonPlugin(name, varName)¶
-
static
isPluginInCurrentContext(instance)¶
-
static
numScreens()¶
-
static
openWidget(instance, name, dock=None, tab=None, x=-1, y=-1, w=-1, l=-1, order=-1)¶
-
static
postInitPlugin(instance)¶
-
static
postLoadSession(instance)¶
-
static
prePublishInSession(instance)¶
-
static
pushContext(name, varName)¶
-
static
pythonPluginRemoved(instance)¶
-
static
refreshAllUI()¶
-
static
refreshUIFromModel(instance)¶
-
static
registerOrsWidget(pluginName, instance, widgetName, widget)¶
-
static
removeCurrentNamedEntity(instance, entityClass, entityName)¶ Remove a named value associated to an entity class name :param instance: context instance :param entityClass: entity class name (str) :param entityName: entity name (str)
-
static
removeFromEntities(instance, entityClass, value)¶ Remove a value from an entity class name :param instance: context instance :param entityClass: entity class name (str) :param value: a str
-
static
removeFromEntitiesAllObjectsOfClass(instance, entityClass, progid)¶ Remove all values that represent an object of the given class from an entity class name :param instance: context instance :param entityClass: entity class name (str) :param progid: an ORS class name (str)
-
static
removeFromNamedEntities(instance, entityClass, entityName, value)¶
-
static
removeFromNamedEntitiesAllObjectsOfClass(instance, entityClass, progid)¶
-
static
removeMultipleFromEntities(instance, entityClass, values)¶ Remove multiples values from an entity class name :param instance: context instance :param entityClass: entity class name (str) :param values: a list of str
-
static
removeWorkingArea(instance, widget)¶
-
static
saveAllWidgetDispositions(instance)¶
-
static
saveWidgetDisposition(instance, plugin_name, form_name, state)¶
-
static
setContextName(instance, name)¶
-
static
setCurrentEntity(instance, entityClass, value)¶ Set the value associated to an entity class name :param instance: context instance :param entityClass: entity class name (str) :param value: a str
-
interfacemethod
setCurrentGlobalState(instance, state)¶ Sets the currently active global state
Parameters: - instance (plugin instance) – context instance
- state (str) – new state
Returns: globalStateChangeIsSuccessful (bool) – indicates if the change was successful
-
static
setCurrentNamedEntity(instance, entityClass, entityName, value)¶ Set the named value associated to an entity class name :param instance: context instance :param entityClass: entity class name (str) :param entityName: entity name (str) :param value: a str
-
static
setCurrentView(instance, view)¶ Sets the current view. :param instance: context instance :param view: a View
-
static
setEventConsumed(instance, state=True)¶
-
static
setMultipleEntities(instance, entityClass, values)¶ Sets multiples values to an entity class name, thus erasing any previous values :param instance: context instance :param entityClass: entity class name (str) :param values: a list of str
-
static
setScreen(screen)¶
-
static
setUIEnabled(instance, state)¶
-
static
setWorkingAreaCursor(instance, cursor)¶
-
static
showStatusMessage(instance, message)¶
-
static
stackGlobalState(instance, state)¶ Stacks a new global state. Stacking is used to set a temporary state that will eventually be unstacked :param instance: context instance :param state: new state (str) :return: a Boolean indicate if the change was successful
-
static
unforbidActions(instance, actions=None)¶
-
static
unforbidMenuItemIds(instance, ids=None)¶
-
static
unforbidStates(instance, states=None)¶
-
static
unstackGlobalState(instance)¶ Unstacks the global state :param instance: context instance
-
static
updateContextWindows(instance)¶
-
static