Shape_Type¶
Bases: NBOBaseClass
Represents the XML complex type Shape.
The shape element contains a single specific ROI shape and links that to any channels, and a timepoint and a z-section. It also records any transform applied to the ROI shape.
fromBase(base)
staticmethod
¶
Cast a NBOBaseClass to a CMOS.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base
|
NBOBaseClass
|
The base class to cast |
required |
Returns:
| Type | Description |
|---|---|
Shape_Type
|
The casted element, or nullptr if the cast fails |
getTypeName()
¶
Returns the class type name.
Returns:
| Type | Description |
|---|---|
string
|
The class type name |
getXMLName()
¶
Returns the XML element name corresponding to this class.
Returns:
| Type | Description |
|---|---|
string
|
The XML element name |
getNBOType()
¶
Returns the NBO Type corresponding to this class.
Returns:
| Type | Description |
|---|---|
int
|
The NBO Type value |
getChildren()
¶
Returns a list of all classes derived from this class.
Returns:
| Type | Description |
|---|---|
List[NBOBaseClass]
|
The list of derived classes |
getSubElements()
¶
Returns a list of all child elements contained in this class.
Returns:
| Type | Description |
|---|---|
List[NBOBaseClass]
|
The list of child classes |
fromJsonFile(path, validate=True)
¶
Populates this object from a JSON file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
string
|
The path to the JSON file |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
fromJsonString(json_string, validate=True)
¶
Populates this object from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_string
|
string
|
The JSON content as a string |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
fromXmlFile(path, validate=True)
¶
Populates this object from a XML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
string
|
The path to the XML file |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
fromXmlString(xml_string, validate=True)
¶
Populates this object from a XML string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xml_string
|
string
|
The XML content as a string |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
toXmlFile(filename, validate=True)
¶
Serializes this object to an XML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
string
|
The path to the output XML file |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
toXmlString(validate=True)
¶
Serializes this object to an XML string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
Returns:
| Type | Description |
|---|---|
string
|
A string containing the XML representation of this object |
setFillColor(value, validate=True)
¶
Sets the value of the FillColor attribute.
The color of the fill - encoded as RGBA The value "-1" is #FFFFFFFF so solid white (it is a signed 32 bit value) NOTE: Prior to the 2012-06 schema the default value was incorrect and produced a transparent red not solid white.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Color_Type
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getFillColor()
¶
Returns the value of the FillColor attribute.
The color of the fill - encoded as RGBA The value "-1" is #FFFFFFFF so solid white (it is a signed 32 bit value) NOTE: Prior to the 2012-06 schema the default value was incorrect and produced a transparent red not solid white.
Returns:
| Type | Description |
|---|---|
Color_Type
|
The value of the attribute |
resetFillColor()
¶
Resets the FillColor attribute to an unset state.
The color of the fill - encoded as RGBA The value "-1" is #FFFFFFFF so solid white (it is a signed 32 bit value) NOTE: Prior to the 2012-06 schema the default value was incorrect and produced a transparent red not solid white.
hasFillColor()
¶
Checks whether the optional FillColor attribute is present.
The color of the fill - encoded as RGBA The value "-1" is #FFFFFFFF so solid white (it is a signed 32 bit value) NOTE: Prior to the 2012-06 schema the default value was incorrect and produced a transparent red not solid white.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the optional attribute has been set, false otherwise |
setFillRule(value, validate=True)
¶
Sets the value of the FillRule attribute.
The rule used to decide which parts of the shape to fill. [enumeration]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
string
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getFillRule()
¶
Returns the value of the FillRule attribute.
The rule used to decide which parts of the shape to fill. [enumeration]
Returns:
| Type | Description |
|---|---|
string
|
The value of the attribute |
resetFillRule()
¶
Resets the FillRule attribute to an unset state.
The rule used to decide which parts of the shape to fill. [enumeration]
hasFillRule()
¶
Checks whether the FillRule attribute is present.
The rule used to decide which parts of the shape to fill. [enumeration]
Returns:
| Type | Description |
|---|---|
boolean
|
true if the attribute has been set, false otherwise |
getFillRuleAllowedValues()
staticmethod
¶
Returns the allowed values for this attribut.
The rule used to decide which parts of the shape to fill. [enumeration]
Returns:
| Type | Description |
|---|---|
std::set< str,std::less< str >,std::allocator< str > >
|
The list of allowed values |
setStrokeColor(value, validate=True)
¶
Sets the value of the StrokeColor attribute.
The color of the stroke - encoded as RGBA The value "-1" is #FFFFFFFF so solid white (it is a signed 32 bit value) NOTE: Prior to the 2012-06 schema the default value was incorrect and produced a transparent red not solid white.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Color_Type
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getStrokeColor()
¶
Returns the value of the StrokeColor attribute.
The color of the stroke - encoded as RGBA The value "-1" is #FFFFFFFF so solid white (it is a signed 32 bit value) NOTE: Prior to the 2012-06 schema the default value was incorrect and produced a transparent red not solid white.
Returns:
| Type | Description |
|---|---|
Color_Type
|
The value of the attribute |
resetStrokeColor()
¶
Resets the StrokeColor attribute to an unset state.
The color of the stroke - encoded as RGBA The value "-1" is #FFFFFFFF so solid white (it is a signed 32 bit value) NOTE: Prior to the 2012-06 schema the default value was incorrect and produced a transparent red not solid white.
hasStrokeColor()
¶
Checks whether the optional StrokeColor attribute is present.
The color of the stroke - encoded as RGBA The value "-1" is #FFFFFFFF so solid white (it is a signed 32 bit value) NOTE: Prior to the 2012-06 schema the default value was incorrect and produced a transparent red not solid white.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the optional attribute has been set, false otherwise |
setStrokeWidth(value, validate=True)
¶
Sets the value of the StrokeWidth attribute.
The width of the stroke. Units are set by StrokeWidthUnit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getStrokeWidth()
¶
Returns the value of the StrokeWidth attribute.
The width of the stroke. Units are set by StrokeWidthUnit.
Returns:
| Type | Description |
|---|---|
float
|
The value of the attribute |
resetStrokeWidth()
¶
Resets the StrokeWidth attribute to an unset state.
The width of the stroke. Units are set by StrokeWidthUnit.
hasStrokeWidth()
¶
Checks whether the StrokeWidth attribute is present.
The width of the stroke. Units are set by StrokeWidthUnit.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the attribute has been set, false otherwise |
setStrokeWidthUnit(value, validate=True)
¶
Sets the value of the StrokeWidthUnit attribute.
The units used for the stroke width.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
UnitsLength_Type
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getStrokeWidthUnit()
¶
Returns the value of the StrokeWidthUnit attribute.
The units used for the stroke width.
Returns:
| Type | Description |
|---|---|
UnitsLength_Type
|
The value of the attribute |
resetStrokeWidthUnit()
¶
Resets the StrokeWidthUnit attribute to an unset state.
The units used for the stroke width.
hasStrokeWidthUnit()
¶
Checks whether the optional StrokeWidthUnit attribute is present.
The units used for the stroke width.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the optional attribute has been set, false otherwise |
setStrokeDashArray(value, validate=True)
¶
Sets the value of the StrokeDashArray attribute.
e.g....................... "none", "10 20 30 10"
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
string
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getStrokeDashArray()
¶
Returns the value of the StrokeDashArray attribute.
e.g....................... "none", "10 20 30 10"
Returns:
| Type | Description |
|---|---|
string
|
The value of the attribute |
resetStrokeDashArray()
¶
Resets the StrokeDashArray attribute to an unset state.
e.g....................... "none", "10 20 30 10"
hasStrokeDashArray()
¶
Checks whether the StrokeDashArray attribute is present.
e.g....................... "none", "10 20 30 10"
Returns:
| Type | Description |
|---|---|
boolean
|
true if the attribute has been set, false otherwise |
getStrokeDashArrayAllowedValues()
staticmethod
¶
Returns the allowed values for this attribut.
e.g....................... "none", "10 20 30 10"
Returns:
| Type | Description |
|---|---|
std::set< str,std::less< str >,std::allocator< str > >
|
The list of allowed values |
setText(value, validate=True)
¶
Sets the value of the Text attribute.
No description available in the XSD standard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
string
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getText()
¶
Returns the value of the Text attribute.
No description available in the XSD standard.
Returns:
| Type | Description |
|---|---|
string
|
The value of the attribute |
resetText()
¶
Resets the Text attribute to an unset state.
No description available in the XSD standard.
hasText()
¶
Checks whether the Text attribute is present.
No description available in the XSD standard.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the attribute has been set, false otherwise |
getTextAllowedValues()
staticmethod
¶
Returns the allowed values for this attribut.
No description available in the XSD standard.
Returns:
| Type | Description |
|---|---|
std::set< str,std::less< str >,std::allocator< str > >
|
The list of allowed values |
setFontFamily(value, validate=True)
¶
Sets the value of the FontFamily attribute.
The font family used to draw the text. [enumeration] Note: these values are all lower case so they match the standard HTML/CSS values. "fantasy" has been included for completeness; we do not recommend its regular use. This attribute is under consideration for removal from the OME-XML schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
string
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getFontFamily()
¶
Returns the value of the FontFamily attribute.
The font family used to draw the text. [enumeration] Note: these values are all lower case so they match the standard HTML/CSS values. "fantasy" has been included for completeness; we do not recommend its regular use. This attribute is under consideration for removal from the OME-XML schema.
Returns:
| Type | Description |
|---|---|
string
|
The value of the attribute |
resetFontFamily()
¶
Resets the FontFamily attribute to an unset state.
The font family used to draw the text. [enumeration] Note: these values are all lower case so they match the standard HTML/CSS values. "fantasy" has been included for completeness; we do not recommend its regular use. This attribute is under consideration for removal from the OME-XML schema.
hasFontFamily()
¶
Checks whether the FontFamily attribute is present.
The font family used to draw the text. [enumeration] Note: these values are all lower case so they match the standard HTML/CSS values. "fantasy" has been included for completeness; we do not recommend its regular use. This attribute is under consideration for removal from the OME-XML schema.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the attribute has been set, false otherwise |
getFontFamilyAllowedValues()
staticmethod
¶
Returns the allowed values for this attribut.
The font family used to draw the text. [enumeration] Note: these values are all lower case so they match the standard HTML/CSS values. "fantasy" has been included for completeness; we do not recommend its regular use. This attribute is under consideration for removal from the OME-XML schema.
Returns:
| Type | Description |
|---|---|
std::set< str,std::less< str >,std::allocator< str > >
|
The list of allowed values |
setFontSize(value, validate=True)
¶
Sets the value of the FontSize attribute.
Size of the font. Units are set by FontSizeUnit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
NonNegativeInt_Type
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getFontSize()
¶
Returns the value of the FontSize attribute.
Size of the font. Units are set by FontSizeUnit.
Returns:
| Type | Description |
|---|---|
NonNegativeInt_Type
|
The value of the attribute |
resetFontSize()
¶
Resets the FontSize attribute to an unset state.
Size of the font. Units are set by FontSizeUnit.
hasFontSize()
¶
Checks whether the optional FontSize attribute is present.
Size of the font. Units are set by FontSizeUnit.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the optional attribute has been set, false otherwise |
setFontSizeUnit(value, validate=True)
¶
Sets the value of the FontSizeUnit attribute.
The units used for the font size.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
UnitsLength_Type
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getFontSizeUnit()
¶
Returns the value of the FontSizeUnit attribute.
The units used for the font size.
Returns:
| Type | Description |
|---|---|
UnitsLength_Type
|
The value of the attribute |
resetFontSizeUnit()
¶
Resets the FontSizeUnit attribute to an unset state.
The units used for the font size.
hasFontSizeUnit()
¶
Checks whether the optional FontSizeUnit attribute is present.
The units used for the font size.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the optional attribute has been set, false otherwise |
setFontStyle(value, validate=True)
¶
Sets the value of the FontStyle attribute.
The style and weight applied to the text. [enumeration] This is a simplified combination of the HTML/CSS attributes font-style AND font-weight.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
string
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getFontStyle()
¶
Returns the value of the FontStyle attribute.
The style and weight applied to the text. [enumeration] This is a simplified combination of the HTML/CSS attributes font-style AND font-weight.
Returns:
| Type | Description |
|---|---|
string
|
The value of the attribute |
resetFontStyle()
¶
Resets the FontStyle attribute to an unset state.
The style and weight applied to the text. [enumeration] This is a simplified combination of the HTML/CSS attributes font-style AND font-weight.
hasFontStyle()
¶
Checks whether the FontStyle attribute is present.
The style and weight applied to the text. [enumeration] This is a simplified combination of the HTML/CSS attributes font-style AND font-weight.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the attribute has been set, false otherwise |
getFontStyleAllowedValues()
staticmethod
¶
Returns the allowed values for this attribut.
The style and weight applied to the text. [enumeration] This is a simplified combination of the HTML/CSS attributes font-style AND font-weight.
Returns:
| Type | Description |
|---|---|
std::set< str,std::less< str >,std::allocator< str > >
|
The list of allowed values |
setLocked(value, validate=True)
¶
Sets the value of the Locked attribute.
Controls whether the shape is locked and read only, true is locked, false is editable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
boolean
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getLocked()
¶
Returns the value of the Locked attribute.
Controls whether the shape is locked and read only, true is locked, false is editable.
Returns:
| Type | Description |
|---|---|
boolean
|
The value of the attribute |
resetLocked()
¶
Resets the Locked attribute to an unset state.
Controls whether the shape is locked and read only, true is locked, false is editable.
hasLocked()
¶
Checks whether the Locked attribute is present.
Controls whether the shape is locked and read only, true is locked, false is editable.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the attribute has been set, false otherwise |
setID(value, validate=True)
¶
Sets the value of the ID attribute.
No description available in the XSD standard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
ShapeID_Type
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getID()
¶
Returns the value of the ID attribute.
No description available in the XSD standard.
Returns:
| Type | Description |
|---|---|
ShapeID_Type
|
The value of the attribute |
resetID()
¶
Resets the ID attribute to an unset state.
No description available in the XSD standard.
hasID()
¶
Checks whether the optional ID attribute is present.
No description available in the XSD standard.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the optional attribute has been set, false otherwise |
setTheZ(value, validate=True)
¶
Sets the value of the TheZ attribute.
No description available in the XSD standard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
NonNegativeInt_Type
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getTheZ()
¶
Returns the value of the TheZ attribute.
No description available in the XSD standard.
Returns:
| Type | Description |
|---|---|
NonNegativeInt_Type
|
The value of the attribute |
resetTheZ()
¶
Resets the TheZ attribute to an unset state.
No description available in the XSD standard.
hasTheZ()
¶
Checks whether the optional TheZ attribute is present.
No description available in the XSD standard.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the optional attribute has been set, false otherwise |
setTheT(value, validate=True)
¶
Sets the value of the TheT attribute.
The timepoint the ROI applies to. If not specified then the ROI applies to all the timepoints of the Image. [units:none] This is numbered from 0.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
NonNegativeInt_Type
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getTheT()
¶
Returns the value of the TheT attribute.
The timepoint the ROI applies to. If not specified then the ROI applies to all the timepoints of the Image. [units:none] This is numbered from 0.
Returns:
| Type | Description |
|---|---|
NonNegativeInt_Type
|
The value of the attribute |
resetTheT()
¶
Resets the TheT attribute to an unset state.
The timepoint the ROI applies to. If not specified then the ROI applies to all the timepoints of the Image. [units:none] This is numbered from 0.
hasTheT()
¶
Checks whether the optional TheT attribute is present.
The timepoint the ROI applies to. If not specified then the ROI applies to all the timepoints of the Image. [units:none] This is numbered from 0.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the optional attribute has been set, false otherwise |
setTheC(value, validate=True)
¶
Sets the value of the TheC attribute.
The Channel the ROI applies to. If not specified then the ROI applies to all the channels of the Image. [units:none] This is numbered from 0.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
NonNegativeInt_Type
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getTheC()
¶
Returns the value of the TheC attribute.
The Channel the ROI applies to. If not specified then the ROI applies to all the channels of the Image. [units:none] This is numbered from 0.
Returns:
| Type | Description |
|---|---|
NonNegativeInt_Type
|
The value of the attribute |
resetTheC()
¶
Resets the TheC attribute to an unset state.
The Channel the ROI applies to. If not specified then the ROI applies to all the channels of the Image. [units:none] This is numbered from 0.
hasTheC()
¶
Checks whether the optional TheC attribute is present.
The Channel the ROI applies to. If not specified then the ROI applies to all the channels of the Image. [units:none] This is numbered from 0.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the optional attribute has been set, false otherwise |
setTransform(value, validate=True)
¶
Sets the value of the Transform element.
This is a matrix used to transform the shape. The element has 6 xsd:float attributes. If the element is present then all 6 values must be included.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
AffineTransform_Type
|
The value to set |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getTransform()
¶
Returns the value of the Transform element.
This is a matrix used to transform the shape. The element has 6 xsd:float attributes. If the element is present then all 6 values must be included.
Returns:
| Type | Description |
|---|---|
AffineTransform_Type
|
The value of the element |
resetTransform()
¶
Resets the Transform element to an unset state.
This is a matrix used to transform the shape. The element has 6 xsd:float attributes. If the element is present then all 6 values must be included.
hasTransform()
¶
Checks whether the optional Transform element is present.
This is a matrix used to transform the shape. The element has 6 xsd:float attributes. If the element is present then all 6 values must be included.
Returns:
| Type | Description |
|---|---|
boolean
|
true if the optional attribute has been set, false otherwise |
setAnnotationRef_List(value, validate=True)
¶
Sets the list of AnnotationRef elements.
No description available in the XSD standard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
List[AnnotationRef]
|
The new list of AnnotationRef elements |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
getAnnotationRef_List()
¶
Returns the list of AnnotationRef elements.
No description available in the XSD standard.
Returns:
| Type | Description |
|---|---|
List[AnnotationRef]
|
The list of AnnotationRef elements |
addToAnnotationRef_List(value, validate=True)
¶
Adds a new AnnotationRef element to this object.
No description available in the XSD standard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
AnnotationRef
|
The element to add |
required |
validate
|
(boolean, optional)
|
If true, validates constraints on value. Default is true. |
True
|
clearAnnotationRef_List()
¶
Clear the list of AnnotationRef.
No description available in the XSD standard.