WatershedOnGrid

Inheritance diagram

Inheritance diagram of ORSModel.ors.WatershedOnGrid, ORSModel.ors.Watershed, ORSModel.ors.Unmanaged, ORSModel.ors.ORSBaseClass

Classes

WatershedOnGrid

class ORSModel.ors.WatershedOnGrid

Bases: ORSModel.ors.Watershed

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none() → WatershedOnGrid
Returns:output (WatershedOnGrid) –
setGridSize(self, xSize: int, ySize: int, zSize: int) → None
Parameters:
  • xSize (int) –
  • ySize (int) –
  • zSize (int) –

Watershed

class ORSModel.ors.Watershed

Bases: ORSModel.ors.Unmanaged

compute(self, watershedDistance: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel) → None

Creates a distance map starting from all the providedROI sources.

Parameters:
  • watershedDistance (ORSModel.ors.Channel) – the distance map generated by the Dijkstra algorithm (an Channel)
  • lOutputChannelLabel (ORSModel.ors.Channel) – a label channel, can be NULL (an Channel)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getNeighborCount(self) → int

Gets the number of neighbors used by theDijkstra algorithm (the connectivity).

Note

Can be 6, 18 or 26

Returns:output (int) – the number of neighbors (an char)
getROICount(self) → int

Returns the number of ROIs that have been set as sources.

Note

A maximum of 10 ROI can be provided.

Returns:output (int) – the number of ROIs that have been provided (an char)
getVolumeROI(self, index: int) → ROI

Retrieves a particularROI from the index specified slot.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:index (int) – the slot index (an unsigned char)
Returns:output (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot
none() → Watershed
Returns:output (Watershed) –
resetVolumeROIs(self) → None

Empties all the sourceROI slots.

setInputChannelAndWorkingArea(self, inputChannel: ORSModel.ors.Channel, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, currentT: int) → None

Sets the channel that will be used by theDijkstra algorithm to calculate distance.

Note

The min and max boundaries must not describe a space bigger than the input channel.

Parameters:
  • inputChannel (ORSModel.ors.Channel) – the input channel (an Channel)
  • minX (int) – the minimum X index in the input channel (a uint32_t)
  • minY (int) – the minimum Y index in the input channel (a uint32_t)
  • minZ (int) – the minimum Z index in the input channel (a uint32_t)
  • maxX (int) – the maximum X index in the input channel (a uint32_t)
  • maxY (int) – the maximum Y index in the input channel (a uint32_t)
  • maxZ (int) – the maximum Z index in the input channel (a uint32_t)
  • currentT (int) –
setInputLabelsChannel(self, aInputLabelsChannel: ORSModel.ors.Channel) → None
Parameters:aInputLabelsChannel (ORSModel.ors.Channel) –
setInputMultiROI(self, anInputMultiROI: ORSModel.ors.MultiROI) → None
Parameters:anInputMultiROI (ORSModel.ors.MultiROI) –
setMaskROI(self, IMaskROI: ORSModel.ors.ROI) → None
Parameters:IMaskROI (ORSModel.ors.ROI) –
setNeighborCountTo18(self) → None

Sets the number of neighbors used by theDijkstra algorithm to 18 ( Neighbor distance <= sqrt(2)).

setNeighborCountTo26(self) → None

Sets the number of neighbors used by theDijkstra algorithm to 18 ( Neighbor distance <= sqrt(2)).

setNeighborCountTo6(self) → None

Sets the number of neighbors used by theDijkstra algorithm to 18 ( Neighbor distance <= sqrt(2)).

setProgressObject(self, IProgress: ORSModel.ors.Progress) → None
Parameters:IProgress (ORSModel.ors.Progress) –
setVolumeROI(self, index: int, aVolROI: ORSModel.ors.ROI) → None

Fills a particularROI slot to be used as a source for the Dijkstra algorithm.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:
  • index (int) – the slot index (an unsigned short)
  • aVolROI (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI)

Unmanaged

class ORSModel.ors.Unmanaged

Bases: ORSModel.ors.ORSBaseClass

brief_description: Abstract class for objects that are not managed by the core library. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005

atomicLoad(sFilename: str) → Unmanaged

Creates an object from a file where an object was saved.

Parameters:sFilename (str) – path of the file to load
Returns:output (Unmanaged) – a managed object, or none() if the load fails
atomicSave(self, aFilename: str) → int

Saves the object to a file.

Parameters:aFilename (str) – path of the file to save
Returns:output (int) – 0 if successful, otherwise an error code
createFromPythonRepresentation(aPythonRepresentation: str) → Unmanaged

Create aUnmanaged Object from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.Unmanaged) –
fromPythonRepresentation(self, aPythonRepresentation: str) → bool

Create aUnmanaged object from a Python string representation.

Parameters:aPythonRepresentation (str) – a Python evaluable string representation (a string)
Returns:output (bool) – TRUE if parsing worked, FALSE otherwise (a bool)
classmethod getAllSubclasses(outputCollection=None)
classmethod getClassDenomination()
static getClassFromProgId(progId)
getClassName(self) → str

Retrieves the class name of the core object wrapped by this Interface object.

Returns:output (str) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getDataChecksum(self) → str
Returns:output (str) –
getIsInstanceOf(self, pProgId: str) → bool

Queries the object to know if it is an instance of a certain class.

Parameters:pProgId (str) –
Returns:output (bool) –
classmethod getIsSubclassOf(parentClass)
getPythonRepresentation(self) → str

Gets a Python evaluable string representation.

Returns:output (str) –
isNone(self) → bool

Checks if the receiver is none.

Returns:output (bool) –
isNotNone(self) → bool

Checks if the receiver is not none.

Returns:output (bool) –
none() → Unmanaged
Returns:output (Unmanaged) –

ORSBaseClass

class ORSModel.ors.ORSBaseClass

brief_description: An abstract class from which all objects issued from the author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005

getPythonTraceBack() → typing.List[str]

Set the python traceback for a call from python.

Returns:output (typing.List[str]) –
isManaged(self) → bool
Returns:output (bool) –
isNone(self) → bool
Returns:output (bool) –
setPythonTraceBack(tb: ORSModel.ors.typing.List[str]) → None

Set the python traceback for a call from python.

Parameters:tb (typing.List[str]) –