PCL
Module-Defined View Properties

Typedefs

using pcl::ViewPropertyAttributes = Flags< ViewPropertyAttribute::mask_type >
 

Functions

template<class S >
Variant pcl::View::ComputeOrFetchProperty (const S &property, bool notify=true)
 
Variant pcl::View::ComputeProperty (const IsoString &property, bool notify=true)
 
void pcl::View::DeleteProperty (const IsoString &property, bool notify=true)
 
void pcl::View::DeletePropertyIfExists (const IsoString &property, bool notify=true)
 
bool pcl::View::HasProperty (const IsoString &property) const
 
static bool pcl::View::IsReservedViewPropertyId (const IsoString &id)
 
PropertyArray pcl::View::PermanentProperties () const
 
PropertyArray pcl::View::Properties () const
 
ViewPropertyAttributes pcl::View::PropertyAttributes (const IsoString &property) const
 
PropertyDescriptionArray pcl::View::PropertyDescriptions () const
 
Variant::data_type pcl::View::PropertyType (const IsoString &property) const
 
Variant pcl::View::PropertyValue (const IsoString &property) const
 
void pcl::View::SetProperties (const PropertyArray &properties, bool notify=true, ViewPropertyAttributes attributes=ViewPropertyAttribute::NoChange)
 
void pcl::View::SetPropertyAttributes (const IsoString &property, ViewPropertyAttributes attributes, bool notify=true)
 
void pcl::View::SetPropertyValue (const IsoString &property, const Variant &value, bool notify=true, ViewPropertyAttributes attributes=ViewPropertyAttribute::NoChange)
 
void pcl::View::SetStorablePermanentProperties (const PropertyArray &properties, bool notify=true)
 
void pcl::View::SetStorablePermanentPropertyValue (const IsoString &property, const Variant &value, bool notify=true)
 
void pcl::View::SetStorableProperties (const PropertyArray &properties, bool notify=true)
 
void pcl::View::SetStorablePropertyValue (const IsoString &property, const Variant &value, bool notify=true)
 
PropertyArray pcl::View::StorablePermanentProperties () const
 
PropertyArray pcl::View::StorableProperties () const
 

Detailed Description

Typedef Documentation

◆ ViewPropertyAttributes

using pcl::ViewPropertyAttributes = typedef Flags<ViewPropertyAttribute::mask_type>

A combination of ViewPropertyAttribute flags.

Definition at line 166 of file View.h.

Function Documentation

◆ ComputeOrFetchProperty()

template<class S >
Variant pcl::View::ComputeOrFetchProperty ( const S &  property,
bool  notify = true 
)
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:

if ( HasProperty( property ) )
return PropertyValue( property );
return ComputeProperty( property, notify );
bool HasProperty(const IsoString &property) const
Variant PropertyValue(const IsoString &property) const
Variant ComputeProperty(const IsoString &property, bool notify=true)

See ComputeProperty() for information on reserved view properties.

Definition at line 847 of file View.h.

◆ ComputeProperty()

Variant pcl::View::ComputeProperty ( const IsoString property,
bool  notify = true 
)

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.

See also
IsReservedViewPropertyId()

◆ DeleteProperty()

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.

◆ DeletePropertyIfExists()

void pcl::View::DeletePropertyIfExists ( const IsoString property,
bool  notify = true 
)
inline

Deletes the specified property and its associated value in this view, only if it is currently defined. If property is not defined, calling this member function has no effect.

Definition at line 1049 of file View.h.

◆ HasProperty()

bool pcl::View::HasProperty ( const IsoString property) const

Returns true iff the specified property exists in this view.

◆ IsReservedViewPropertyId()

static bool pcl::View::IsReservedViewPropertyId ( const IsoString id)
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.

See also
ComputeProperty()

◆ PermanentProperties()

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.

See also
SetPermanentProperties()

◆ Properties()

PropertyArray pcl::View::Properties ( ) const

Returns an array with all readable (for the calling module) properties in this view.

◆ PropertyAttributes()

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.

◆ PropertyDescriptions()

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.

◆ PropertyType()

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.

◆ PropertyValue()

Variant pcl::View::PropertyValue ( const IsoString property) const

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.

◆ SetProperties()

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.

Parameters
propertiesThe properties that will be defined.
notifyWhether to notify the platform on the property changes. This is true by default.
attributesOptional 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:

view2.SetProperties( view1.Properties() );

◆ SetPropertyAttributes()

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.

◆ SetPropertyValue()

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.

Parameters
propertyIdentifier of the view property.
valueA valid Variant object transporting the new property value.
notifyWhether to notify the platform on the property change. This is true by default.
attributesOptional 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.

◆ SetStorablePermanentProperties()

void pcl::View::SetStorablePermanentProperties ( const PropertyArray properties,
bool  notify = true 
)
inline

Sets the values of a set of storable and permanent properties in this view.

Calling this function is equivalent to:

SetProperties( properties, notify,
ViewPropertyAttribute::Storable
| ViewPropertyAttribute::Permanent
| ViewPropertyAttribute::NoChange )
void SetProperties(const PropertyArray &properties, bool notify=true, ViewPropertyAttributes attributes=ViewPropertyAttribute::NoChange)

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.

See also
StorableProperties(), PermanentProperties()

Definition at line 771 of file View.h.

◆ SetStorablePermanentPropertyValue()

void pcl::View::SetStorablePermanentPropertyValue ( const IsoString property,
const Variant value,
bool  notify = true 
)
inline

Sets the value of a storable property in this view.

This member function is equivalent to:

SetPropertyValue( property, value, notify,
ViewPropertyAttribute::Storable
| ViewPropertyAttribute::Permanent
| ViewPropertyAttribute::NoChange );
void SetPropertyValue(const IsoString &property, const Variant &value, bool notify=true, ViewPropertyAttributes attributes=ViewPropertyAttribute::NoChange)

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.

Definition at line 937 of file View.h.

◆ SetStorableProperties()

void pcl::View::SetStorableProperties ( const PropertyArray properties,
bool  notify = true 
)
inline

Sets the values of a set of storable properties in this view.

Calling this function is equivalent to:

SetProperties( properties, notify,
ViewPropertyAttribute::Storable
| ViewPropertyAttribute::NoChange )

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.

See also
StorableProperties()

Definition at line 743 of file View.h.

◆ SetStorablePropertyValue()

void pcl::View::SetStorablePropertyValue ( const IsoString property,
const Variant value,
bool  notify = true 
)
inline

Sets the value of a storable property in this view.

This member function is equivalent to:

SetPropertyValue( property, value, notify,
ViewPropertyAttribute::Storable
| ViewPropertyAttribute::NoChange );

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.

Definition at line 906 of file View.h.

◆ StorablePermanentProperties()

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.

See also
SetStorablePermanentProperties()

◆ StorableProperties()

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.

See also
SetStorableProperties()