PCL
|
Typedefs | |
using | pcl::ViewPropertyAttributes = Flags< ViewPropertyAttribute::mask_type > |
using pcl::ViewPropertyAttributes = typedef Flags<ViewPropertyAttribute::mask_type> |
A combination of ViewPropertyAttribute flags.
|
inline |
Returns the value of a reserved view property if it is already available, or computes it otherwise and returns its newly calculated value.
This member function is equivalent to the following sequence:
See ComputeProperty() for information on reserved view properties.
Computes a reserved view property and returns its value.
The PixInsight core application reserves a set of view property identifiers for standard use by all modules. These special properties can only be generated by calling this member function; they cannot be created or modified by other means (for example, by calling the SetPropertyValue() and SetPropertyAttributes() functions). This includes a number of statistical properties that are generated and computed on demand in a highly optimized way.
The set of reserved view property identifiers includes at least the following list:
Mean, Modulus, SumOfSquares, Median, Variance, StdDev, AvgDev, MAD, BWMV, PBMV, Sn, Qn, Minimum, MinimumPos, Maximum, MaximumPos, Histogram16, Histogram20.
If the requested property is not recognized as a reserved view property, this member function returns an invalid Variant object.
void pcl::View::DeleteProperty | ( | const IsoString & | property, |
bool | notify = true |
||
) |
Deletes the specified property and its associated value in this view.
If the requested property is not currently defined for this view, or if the calling module has no write access to it (see ViewPropertyAttribute::WriteProtected), an Error exception will be thrown.
|
inline |
bool pcl::View::HasProperty | ( | const IsoString & | property | ) | const |
Returns true iff the specified property exists in this view.
|
static |
returns true iff the specified string id is the identifier of a reserved view property.
Reserved view properties are computed and maintained automatically by the core application and cannot be modified arbitrarily by modules.
This member function also returns true if the specified identifier starts with the string "PixInsight:". Although these identifiers are not strictly reserved, the core application defines a number of properties in the PixInsight namespace for its internal use. This namespace should not be used by modules.
PropertyArray pcl::View::PermanentProperties | ( | ) | const |
Returns an array with all readable (for the calling module) and permanent properties in this view.
Permanent properties are not stored in processing histories, but unlike volatile properties, they are preserved across undo/redo operations.
PropertyArray pcl::View::Properties | ( | ) | const |
Returns an array with all readable (for the calling module) properties in this view.
ViewPropertyAttributes pcl::View::PropertyAttributes | ( | const IsoString & | property | ) | const |
Returns the set of attributes currently associated with an existing property in this view.
If the requested property has not been defined for this view, an Error exception is thrown.
For a list of available view property attributes, see the ViewPropertyAttribute namespace.
PropertyDescriptionArray pcl::View::PropertyDescriptions | ( | ) | const |
Returns a description of all data properties associated with this view. For each property, the returned array provides information on the unique identifier of a property and its data type.
Returns an empty array if there are no properties in this view.
Variant::data_type pcl::View::PropertyType | ( | const IsoString & | property | ) | const |
Returns the data type of an existing property in this view.
If the requested property has not been defined for this view, this member function returns VariantType::Invalid.
If the property exists but the calling module has no read access to it (see ViewPropertyAttributes::ReadProtected), an Error exception will be thrown.
For a list of available view property types, see the VariantType namespace.
Returns the value of the specified property in this view.
If the requested property has not been defined for this view, the returned Variant object will be invalid (that is, Variant::IsValid() will return false).
If the property exists but the calling module has no read access to it (see ViewPropertyAttributes::ReadProtected), an Error exception will be thrown.
void pcl::View::SetProperties | ( | const PropertyArray & | properties, |
bool | notify = true , |
||
ViewPropertyAttributes | attributes = ViewPropertyAttribute::NoChange |
||
) |
Sets the values of a set of properties in this view.
properties | The properties that will be defined. |
notify | Whether to notify the platform on the property changes. This is true by default. |
attributes | Optional attribute properties. If not specified, the current property attributes will be preserved. If not specified and the property is newly created, a default set of properties will be applied. |
For each item in the properties array, if the requested property is not a reserved property and does not exist in this view, a new one will be created with the specified identifier, value and attributes; see the Property class.
If one or more properties exist but the calling module has no write access to them (see ViewPropertyAttribute::WriteProtected), an Error exception will be thrown.
Reserved properties are simply ignored by this member function without raising exceptions. This allows for copying properties between views safely with a single-line call such as:
void pcl::View::SetPropertyAttributes | ( | const IsoString & | property, |
ViewPropertyAttributes | attributes, | ||
bool | notify = true |
||
) |
Sets new attributes for an existing property in this view.
If the requested property is not currently defined for this view, or if the calling module has no write access to it (see ViewPropertyAttribute::WriteProtected), an Error exception will be thrown.
Note that property attributes can be set for a newly created property with the View::SetPropertyValue() member function. For read-only properties, this is safer because the property never exists as a publicly writable object.
void pcl::View::SetPropertyValue | ( | const IsoString & | property, |
const Variant & | value, | ||
bool | notify = true , |
||
ViewPropertyAttributes | attributes = ViewPropertyAttribute::NoChange |
||
) |
Sets the value and attributes of a property in this view.
property | Identifier of the view property. |
value | A valid Variant object transporting the new property value. |
notify | Whether to notify the platform on the property change. This is true by default. |
attributes | Optional attribute properties. If not specified, the current property attributes will be preserved. If not specified and the property is newly created, a default set of properties will be applied. |
If the requested property does not exist in this view, a new one will be created with the specified identifier, value and attributes.
If the property exists but the calling module has no write access to it (see ViewPropertyAttribute::WriteProtected), an Error exception will be thrown.
|
inline |
Sets the values of a set of storable and permanent properties in this view.
Calling this function is equivalent to:
This function simplifies defining view properties, where the Storable and Permanent attributes are used very often to ensure that properties will be propagated to newly created and updated disk files, as well as preserved in views across process executions and undo/redo operations.
|
inline |
Sets the value of a storable property in this view.
This member function is equivalent to:
This function simplifies defining view properties, where the Storable and Permanent attributes are used very often to ensure that properties will be propagated to newly created and updated disk files, as well as preserved in views across process executions and undo/redo operations.
|
inline |
Sets the values of a set of storable properties in this view.
Calling this function is equivalent to:
This function simplifies defining view properties, where the Storable attribute is used very often to ensure that properties will be propagated to newly created and updated disk files.
|
inline |
Sets the value of a storable property in this view.
This member function is equivalent to:
This function simplifies defining view properties, where the Storable attribute is used very often to ensure that properties will be propagated to newly created and updated disk files.
PropertyArray pcl::View::StorablePermanentProperties | ( | ) | const |
Returns an array with all readable (for the calling module), storable, permanent properties in this view.
Storable properties have the ViewPropertyAttribute::Storable attribute set and are intended to be persistent when writting view images to files.
Permanent properties are not stored in processing histories, but unlike volatile properties, they are preserved across undo/redo operations.
PropertyArray pcl::View::StorableProperties | ( | ) | const |
Returns an array with all readable (for the calling module) and storable properties in this view.
Storable properties have the ViewPropertyAttribute::Storable attribute set and are intended to be persistent when writting view images to files.