Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
Base class for all Annotation This class is to be implemented in order to create Annotation which are managed by a AbstractAnnotationRenderer. This class contains an internal Propertylist for configuring the appearance of the implemented Overlay. More...
#include <mitkAnnotation.h>
Classes | |
class | BaseLocalStorage |
Base class for mapper specific rendering ressources. More... | |
struct | Bounds |
Container for position and size on the display. More... | |
Public Types | |
typedef Annotation | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
void | SetProperty (const std::string &propertyKey, const BaseProperty::Pointer &property) |
Set the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer (if nullptr, use BaseRenderer-independent PropertyList). This is set-by-value. More... | |
void | ReplaceProperty (const std::string &propertyKey, const BaseProperty::Pointer &property) |
Replace the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer (if nullptr, use BaseRenderer-independent PropertyList). This is set-by-reference. More... | |
void | AddProperty (const std::string &propertyKey, const BaseProperty::Pointer &property, bool overwrite=false) |
Add the property (instance of BaseProperty) if it does not exist (or always if overwrite is true) with key propertyKey in the PropertyList of the renderer (if nullptr, use BaseRenderer-independent PropertyList). This is set-by-value. More... | |
void | ConcatenatePropertyList (PropertyList *pList, bool replace=false) |
Add values from another PropertyList. More... | |
mitk::BaseProperty * | GetProperty (const std::string &propertyKey) const |
Get the property (instance of BaseProperty) with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList. More... | |
template<typename T > | |
bool | GetProperty (itk::SmartPointer< T > &property, const std::string &propertyKey) const |
Get the property of type T with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList. More... | |
template<typename T > | |
bool | GetProperty (T *&property, const std::string &propertyKey) const |
Get the property of type T with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList. More... | |
template<typename T > | |
bool | GetPropertyValue (const std::string &propertyKey, T &value) const |
Convenience access method for GenericProperty<T> properties (T being the type of the second parameter) More... | |
bool | GetBoolProperty (const std::string &propertyKey, bool &boolValue) const |
Convenience access method for bool properties (instances of BoolProperty) More... | |
bool | GetIntProperty (const std::string &propertyKey, int &intValue) const |
Convenience access method for int properties (instances of IntProperty) More... | |
bool | GetFloatProperty (const std::string &propertyKey, float &floatValue) const |
Convenience access method for float properties (instances of FloatProperty) More... | |
bool | GetDoubleProperty (const std::string &propertyKey, double &doubleValue) const |
Convenience access method for double properties (instances of DoubleProperty) More... | |
bool | GetStringProperty (const std::string &propertyKey, std::string &string) const |
Convenience access method for string properties (instances of StringProperty) More... | |
void | SetIntProperty (const std::string &propertyKey, int intValue) |
Convenience method for setting int properties (instances of IntProperty) More... | |
void | SetBoolProperty (const std::string &propertyKey, bool boolValue) |
Convenience method for setting int properties (instances of IntProperty) More... | |
void | SetFloatProperty (const std::string &propertyKey, float floatValue) |
Convenience method for setting int properties (instances of IntProperty) More... | |
void | SetDoubleProperty (const std::string &propertyKey, double doubleValue) |
Convenience method for setting int properties (instances of IntProperty) More... | |
void | SetStringProperty (const std::string &propertyKey, const std::string &string) |
Convenience method for setting int properties (instances of IntProperty) More... | |
bool | IsOn (const std::string &propertyKey, bool defaultIsOn=true) const |
Convenience access method for boolean properties (instances of BoolProperty). Return value is the value of the property. If the property is not found, the value of defaultIsOn is returned. More... | |
bool | GetName (std::string &nodeName, const std::string &propertyKey="name") const |
Convenience access method for accessing the name of an object (instance of StringProperty with property-key "name") More... | |
virtual std::string | GetName () const |
Extra convenience access method for accessing the name of an object (instance of StringProperty with property-key "name"). More... | |
virtual void | SetName (const std::string &name) |
Extra convenience access method to set the name of an object. More... | |
bool | GetColor (float rgb[], const std::string &propertyKey="color") const |
Convenience access method for color properties (instances of ColorProperty) More... | |
void | SetColor (const mitk::Color &color, const std::string &propertyKey="color") |
Convenience method for setting color properties (instances of ColorProperty) More... | |
void | SetColor (float red, float green, float blue, const std::string &propertyKey="color") |
Convenience method for setting color properties (instances of ColorProperty) More... | |
void | SetColor (const float rgb[], const std::string &propertyKey="color") |
Convenience method for setting color properties (instances of ColorProperty) More... | |
bool | GetOpacity (float &opacity, const std::string &propertyKey="opacity") const |
Convenience access method for opacity properties (instances of FloatProperty) More... | |
void | SetOpacity (float opacity, const std::string &propertyKey="opacity") |
Convenience method for setting opacity properties (instances of FloatProperty) More... | |
void | SetText (std::string text) |
std::string | GetText () const |
void | SetFontSize (int fontSize) |
int | GetFontSize () const |
bool | GetVisibility (bool &visible, const std::string &propertyKey="visible") const |
Convenience access method for visibility properties (instances of BoolProperty with property-key "visible") More... | |
bool | IsVisible (const std::string &propertyKey="visible", bool defaultIsOn=true) const |
Convenience access method for visibility properties (instances of BoolProperty). Return value is the visibility. Default is visible==true, i.e., true is returned even if the property (propertyKey) is not found. More... | |
void | SetVisibility (bool visible, const std::string &propertyKey="visible") |
Convenience method for setting visibility properties (instances of BoolProperty) More... | |
virtual void | AddToBaseRenderer (BaseRenderer *renderer)=0 |
Adds the Annotation to the specified renderer. Update Annotation should be called soon in order to apply all properties. More... | |
virtual void | AddToRenderer (BaseRenderer *renderer, vtkRenderer *vtkrenderer)=0 |
Adds the Annotation to the specified renderer. Update Annotation should be called soon in order to apply all properties. More... | |
virtual void | RemoveFromBaseRenderer (BaseRenderer *renderer)=0 |
Removes the Annotation from the specified renderer. It is not visible anymore then. More... | |
virtual void | RemoveFromRenderer (BaseRenderer *renderer, vtkRenderer *vtkrenderer)=0 |
Removes the Annotation from the specified renderer. It is not visible anymore then. More... | |
virtual void | Update (BaseRenderer *renderer)=0 |
Applies all properties and should be called before the rendering procedure. More... | |
virtual Bounds | GetBoundsOnDisplay (BaseRenderer *renderer) const |
Returns position and size of the Annotation on the display. More... | |
virtual void | SetBoundsOnDisplay (BaseRenderer *renderer, const Bounds &) |
Sets position and size of the Annotation on the display. More... | |
void | SetForceInForeground (bool forceForeground) |
bool | IsForceInForeground () const |
PropertyList * | GetPropertyList () const |
std::string | GetMicroserviceID () |
Returns the id that this device is registered with. The id will only be valid, if the Annotation has been registered using RegisterAsMicroservice(). More... | |
virtual void | RegisterAsMicroservice (us::ServiceProperties props) |
Registers this object as a Microservice, making it available to every module and/or plugin. To unregister, call UnregisterMicroservice(). More... | |
virtual void | UnRegisterMicroservice () |
Registers this object as a Microservice, making it available to every module and/or plugin. More... | |
void | AnnotationModified () |
virtual std::vector< std::string > | GetClassHierarchy () const |
virtual const char * | GetClassName () const |
Static Public Member Functions | |
static const char * | GetStaticNameOfClass () |
Static Public Attributes | |
static const std::string | US_INTERFACE_NAME |
These Constants are used in conjunction with Microservices. More... | |
static const std::string | US_PROPKEY_AnnotationNAME |
static const std::string | US_PROPKEY_ID |
static const std::string | US_PROPKEY_MODIFIED |
static const std::string | US_PROPKEY_RENDERER_ID |
static const std::string | US_PROPKEY_AR_ID |
Protected Member Functions | |
Annotation () | |
explicit constructor which disallows implicit conversions More... | |
~Annotation () override | |
virtual destructor in order to derive from this class More... | |
void | SetUSProperty (const std::string &propertyKey, us::Any value) |
Protected Attributes | |
PropertyList::Pointer | m_PropertyList |
BaseRenderer-independent PropertyList. More... | |
itk::TimeStamp | m_DataReferenceChangedTime |
Timestamp of the last change of m_Data. More... | |
Base class for all Annotation This class is to be implemented in order to create Annotation which are managed by a AbstractAnnotationRenderer. This class contains an internal Propertylist for configuring the appearance of the implemented Overlay.
Definition at line 27 of file mitkAnnotation.h.
typedef itk::SmartPointer<const Self> mitk::Annotation::ConstPointer |
Definition at line 413 of file mitkAnnotation.h.
Definition at line 413 of file mitkAnnotation.h.
typedef Annotation mitk::Annotation::Self |
Definition at line 413 of file mitkAnnotation.h.
typedef itk::Object mitk::Annotation::Superclass |
Definition at line 413 of file mitkAnnotation.h.
|
protected |
explicit constructor which disallows implicit conversions
Definition at line 23 of file mitkAnnotation.cpp.
References AnnotationModified(), m_PropertyList, mitk::PropertyList::New(), SetName(), SetOpacity(), and SetVisibility().
|
overrideprotected |
virtual destructor in order to derive from this class
Definition at line 40 of file mitkAnnotation.cpp.
References UnRegisterMicroservice().
void mitk::Annotation::AddProperty | ( | const std::string & | propertyKey, |
const BaseProperty::Pointer & | property, | ||
bool | overwrite = false |
||
) |
Add the property (instance of BaseProperty) if it does not exist (or always if overwrite is true) with key propertyKey in the PropertyList of the renderer (if nullptr, use BaseRenderer-independent PropertyList). This is set-by-value.
For overwrite == false the property is not changed if it already exists. For overwrite == true the method is identical to SetProperty.
Definition at line 71 of file mitkAnnotation.cpp.
References GetProperty(), and SetProperty().
|
pure virtual |
Adds the Annotation to the specified renderer. Update Annotation should be called soon in order to apply all properties.
Implemented in mitk::VtkAnnotation.
Referenced by mitk::AbstractAnnotationRenderer::GetID().
|
pure virtual |
Adds the Annotation to the specified renderer. Update Annotation should be called soon in order to apply all properties.
Implemented in mitk::VtkAnnotation.
void mitk::Annotation::AnnotationModified | ( | ) |
Definition at line 344 of file mitkAnnotation.cpp.
References SetUSProperty(), and US_PROPKEY_MODIFIED.
Referenced by Annotation().
void mitk::Annotation::ConcatenatePropertyList | ( | PropertyList * | pList, |
bool | replace = false |
||
) |
Add values from another PropertyList.
Overwrites values in m_PropertyList only when possible (i.e. when types are compatible). If you want to allow for object type changes (replacing a "visible":BoolProperty with "visible":IntProperty, set the
replace. | |
replace | true: if |
pList | contains a property "visible" of type ColorProperty and our m_PropertyList also has a "visible" property of a different type (e.g. BoolProperty), change the type, i.e. replace the objects behind the pointer. |
Definition at line 81 of file mitkAnnotation.cpp.
References m_PropertyList.
bool mitk::Annotation::GetBoolProperty | ( | const std::string & | propertyKey, |
bool & | boolValue | ||
) | const |
Convenience access method for bool properties (instances of BoolProperty)
Definition at line 96 of file mitkAnnotation.cpp.
References GetProperty().
Referenced by GetVisibility(), and mitk::TextAnnotation2D::UpdateVtkAnnotation2D().
|
virtual |
Returns position and size of the Annotation on the display.
Reimplemented in mitk::TextAnnotation2D, and mitk::VtkAnnotation2D.
Definition at line 295 of file mitkAnnotation.cpp.
References mitk::Annotation::Bounds::Position, and mitk::Annotation::Bounds::Size.
Referenced by mitk::LayoutAnnotationRenderer::PrepareLayout().
|
inlinevirtual |
Definition at line 413 of file mitkAnnotation.h.
|
virtual |
bool mitk::Annotation::GetColor | ( | float | rgb[], |
const std::string & | propertyKey = "color" |
||
) | const |
Convenience access method for color properties (instances of ColorProperty)
Definition at line 222 of file mitkAnnotation.cpp.
References GetProperty().
Referenced by mitk::VtkAnnotation2D::UpdateVtkAnnotation(), mitk::TextAnnotation3D::UpdateVtkAnnotation(), mitk::LabelAnnotation3D::UpdateVtkAnnotation(), and mitk::TextAnnotation2D::UpdateVtkAnnotation2D().
bool mitk::Annotation::GetDoubleProperty | ( | const std::string & | propertyKey, |
double & | doubleValue | ||
) | const |
Convenience access method for double properties (instances of DoubleProperty)
bool mitk::Annotation::GetFloatProperty | ( | const std::string & | propertyKey, |
float & | floatValue | ||
) | const |
Convenience access method for float properties (instances of FloatProperty)
Definition at line 116 of file mitkAnnotation.cpp.
References GetProperty().
Referenced by mitk::LogoAnnotation::GetRelativeSize().
int mitk::Annotation::GetFontSize | ( | ) | const |
Definition at line 205 of file mitkAnnotation.cpp.
References GetIntProperty().
Referenced by mitk::TextAnnotation3D::UpdateVtkAnnotation(), and mitk::TextAnnotation2D::UpdateVtkAnnotation2D().
bool mitk::Annotation::GetIntProperty | ( | const std::string & | propertyKey, |
int & | intValue | ||
) | const |
Convenience access method for int properties (instances of IntProperty)
Definition at line 106 of file mitkAnnotation.cpp.
References GetProperty().
Referenced by mitk::LogoAnnotation::GetCornerPosition(), and GetFontSize().
std::string mitk::Annotation::GetMicroserviceID | ( | ) |
Returns the id that this device is registered with. The id will only be valid, if the Annotation has been registered using RegisterAsMicroservice().
Definition at line 321 of file mitkAnnotation.cpp.
References us::ServiceRegistration< I1, I2, I3 >::GetReference(), and US_PROPKEY_ID.
bool mitk::Annotation::GetName | ( | std::string & | nodeName, |
const std::string & | propertyKey = "name" |
||
) | const |
Convenience access method for accessing the name of an object (instance of StringProperty with property-key "name")
Definition at line 183 of file mitkAnnotation.cpp.
References GetStringProperty().
|
virtual |
Extra convenience access method for accessing the name of an object (instance of StringProperty with property-key "name").
This method does not take the renderer specific propertylists into account, because the name of an object should never be renderer specific.
Definition at line 170 of file mitkAnnotation.cpp.
References GetProperty(), and mitk::StringProperty::GetValue().
bool mitk::Annotation::GetOpacity | ( | float & | opacity, |
const std::string & | propertyKey = "opacity" |
||
) | const |
Convenience access method for opacity properties (instances of FloatProperty)
Definition at line 255 of file mitkAnnotation.cpp.
References GetProperty().
Referenced by mitk::VtkAnnotation2D::UpdateVtkAnnotation(), mitk::TextAnnotation3D::UpdateVtkAnnotation(), mitk::LogoAnnotation::UpdateVtkAnnotation(), mitk::LabelAnnotation3D::UpdateVtkAnnotation(), and mitk::TextAnnotation2D::UpdateVtkAnnotation2D().
mitk::BaseProperty * mitk::Annotation::GetProperty | ( | const std::string & | propertyKey | ) | const |
Get the property (instance of BaseProperty) with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList.
If renderer is nullptr or the propertyKey cannot be found in the PropertyList specific to renderer or is disabled there, the BaseRenderer-independent PropertyList of this Annotation is queried.
Definition at line 86 of file mitkAnnotation.cpp.
References m_PropertyList.
Referenced by AddProperty(), GetBoolProperty(), GetColor(), GetFloatProperty(), GetIntProperty(), GetName(), GetOpacity(), and GetStringProperty().
|
inline |
Get the property of type T with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList.
If renderer is nullptr or the propertyKey cannot be found in the PropertyList specific to renderer or is disabled there, the BaseRenderer-independent PropertyList of this Annotation is queried.
Definition at line 136 of file mitkAnnotation.h.
|
inline |
Get the property of type T with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList.
If renderer is nullptr or the propertyKey cannot be found in the PropertyList specific to renderer or is disabled there, the BaseRenderer-independent PropertyList of this Annotation is queried.
Definition at line 154 of file mitkAnnotation.h.
mitk::PropertyList * mitk::Annotation::GetPropertyList | ( | ) | const |
Definition at line 316 of file mitkAnnotation.cpp.
References m_PropertyList.
Referenced by mitk::ColorBarAnnotation::GetAnnotationTextScaling(), mitk::ScaleLegendAnnotation::GetBottomAxisVisibility(), mitk::ScaleLegendAnnotation::GetBottomBorderOffset(), mitk::ScaleLegendAnnotation::GetCornerOffsetFactor(), mitk::ColorBarAnnotation::GetDrawAnnotations(), mitk::ColorBarAnnotation::GetDrawTickLabels(), mitk::ScaleLegendAnnotation::GetFontFactor(), mitk::ScaleLegendAnnotation::GetLeftAxisVisibility(), mitk::ScaleLegendAnnotation::GetLeftBorderOffset(), mitk::ScaleLegendAnnotation::GetLegendVisibility(), mitk::LogoAnnotation::GetLogoImagePath(), mitk::ColorBarAnnotation::GetLookupTable(), mitk::ColorBarAnnotation::GetMaxNumberOfColors(), mitk::ColorBarAnnotation::GetNumberOfLabels(), mitk::ColorBarAnnotation::GetOrientation(), mitk::ScaleLegendAnnotation::GetRightAxisVisibility(), mitk::ScaleLegendAnnotation::GetRightBorderOffset(), mitk::ScaleLegendAnnotation::GetTopAxisVisibility(), mitk::ScaleLegendAnnotation::GetTopBorderOffset(), and mitk::Annotation::BaseLocalStorage::IsGenerateDataRequired().
|
inline |
Convenience access method for GenericProperty<T> properties (T being the type of the second parameter)
Definition at line 166 of file mitkAnnotation.h.
References mitk::GenericProperty< T >::GetValue(), and Json::intValue.
|
inlinestatic |
Definition at line 413 of file mitkAnnotation.h.
bool mitk::Annotation::GetStringProperty | ( | const std::string & | propertyKey, |
std::string & | string | ||
) | const |
Convenience access method for string properties (instances of StringProperty)
Definition at line 126 of file mitkAnnotation.cpp.
References GetProperty().
Referenced by GetName(), GetText(), and mitk::TextAnnotation2D::UpdateVtkAnnotation2D().
std::string mitk::Annotation::GetText | ( | ) | const |
Definition at line 193 of file mitkAnnotation.cpp.
References GetStringProperty().
Referenced by mitk::TextAnnotation3D::UpdateVtkAnnotation(), and mitk::TextAnnotation2D::UpdateVtkAnnotation2D().
bool mitk::Annotation::GetVisibility | ( | bool & | visible, |
const std::string & | propertyKey = "visible" |
||
) | const |
Convenience access method for visibility properties (instances of BoolProperty with property-key "visible")
Definition at line 212 of file mitkAnnotation.cpp.
References GetBoolProperty().
bool mitk::Annotation::IsForceInForeground | ( | ) | const |
Definition at line 311 of file mitkAnnotation.cpp.
|
inline |
Convenience access method for boolean properties (instances of BoolProperty). Return value is the value of the property. If the property is not found, the value of defaultIsOn is returned.
Thus, the return value has a different meaning than in the GetBoolProperty method!
Definition at line 251 of file mitkAnnotation.h.
References GetName(), and Update().
Referenced by IsVisible().
bool mitk::Annotation::IsVisible | ( | const std::string & | propertyKey = "visible" , |
bool | defaultIsOn = true |
||
) | const |
Convenience access method for visibility properties (instances of BoolProperty). Return value is the visibility. Default is visible==true, i.e., true is returned even if the property (propertyKey) is not found.
Thus, the return value has a different meaning than in the GetVisibility method!
Definition at line 217 of file mitkAnnotation.cpp.
References IsOn().
Referenced by mitk::VtkAnnotation::Update().
|
virtual |
Registers this object as a Microservice, making it available to every module and/or plugin. To unregister, call UnregisterMicroservice().
Definition at line 326 of file mitkAnnotation.cpp.
References us::GetModuleContext(), mitk::UIDGenerator::GetUID(), us::ServiceRegistrationBase::Unregister(), and US_PROPKEY_ID.
Referenced by mitk::ManualPlacementAnnotationRenderer::AddAnnotation(), and mitk::LayoutAnnotationRenderer::AddAnnotation().
|
pure virtual |
Removes the Annotation from the specified renderer. It is not visible anymore then.
Implemented in mitk::VtkAnnotation.
|
pure virtual |
Removes the Annotation from the specified renderer. It is not visible anymore then.
Implemented in mitk::VtkAnnotation.
void mitk::Annotation::ReplaceProperty | ( | const std::string & | propertyKey, |
const BaseProperty::Pointer & | property | ||
) |
Replace the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer (if nullptr, use BaseRenderer-independent PropertyList). This is set-by-reference.
If renderer is nullptr the property is set in the BaseRenderer-independent PropertyList of this Annotation.
Definition at line 66 of file mitkAnnotation.cpp.
References m_PropertyList.
void mitk::Annotation::SetBoolProperty | ( | const std::string & | propertyKey, |
bool | boolValue | ||
) |
Convenience method for setting int properties (instances of IntProperty)
Definition at line 146 of file mitkAnnotation.cpp.
References m_PropertyList, and mitk::BoolProperty::New().
Referenced by mitk::ColorBarAnnotation::SetAnnotationTextScaling(), mitk::ScaleLegendAnnotation::SetBottomAxisVisibility(), mitk::ColorBarAnnotation::SetDrawAnnotations(), mitk::ColorBarAnnotation::SetDrawTickLabels(), mitk::ScaleLegendAnnotation::SetLeftAxisVisibility(), mitk::ScaleLegendAnnotation::SetLegendVisibility(), mitk::ScaleLegendAnnotation::SetRightAxisVisibility(), mitk::ScaleLegendAnnotation::SetTopAxisVisibility(), and mitk::TextAnnotation2D::TextAnnotation2D().
|
virtual |
Sets position and size of the Annotation on the display.
Reimplemented in mitk::TextAnnotation2D, and mitk::VtkAnnotation2D.
Definition at line 302 of file mitkAnnotation.cpp.
Referenced by mitk::LayoutAnnotationRenderer::PrepareLayout().
void mitk::Annotation::SetColor | ( | const mitk::Color & | color, |
const std::string & | propertyKey = "color" |
||
) |
Convenience method for setting color properties (instances of ColorProperty)
Definition at line 232 of file mitkAnnotation.cpp.
References m_PropertyList, and mitk::ColorProperty::New().
Referenced by SetColor(), mitk::TextAnnotation2D::TextAnnotation2D(), and mitk::TextAnnotation3D::TextAnnotation3D().
void mitk::Annotation::SetColor | ( | float | red, |
float | green, | ||
float | blue, | ||
const std::string & | propertyKey = "color" |
||
) |
Convenience method for setting color properties (instances of ColorProperty)
Definition at line 239 of file mitkAnnotation.cpp.
References SetColor().
void mitk::Annotation::SetColor | ( | const float | rgb[], |
const std::string & | propertyKey = "color" |
||
) |
Convenience method for setting color properties (instances of ColorProperty)
Definition at line 248 of file mitkAnnotation.cpp.
References m_PropertyList, and mitk::ColorProperty::New().
void mitk::Annotation::SetDoubleProperty | ( | const std::string & | propertyKey, |
double | doubleValue | ||
) |
Convenience method for setting int properties (instances of IntProperty)
Definition at line 158 of file mitkAnnotation.cpp.
References m_PropertyList, and mitk::DoubleProperty::New().
Referenced by mitk::ScaleLegendAnnotation::SetCornerOffsetFactor(), and mitk::ScaleLegendAnnotation::SetFontFactor().
void mitk::Annotation::SetFloatProperty | ( | const std::string & | propertyKey, |
float | floatValue | ||
) |
Convenience method for setting int properties (instances of IntProperty)
Definition at line 152 of file mitkAnnotation.cpp.
References m_PropertyList, and mitk::FloatProperty::New().
Referenced by mitk::LogoAnnotation::SetRelativeSize().
void mitk::Annotation::SetFontSize | ( | int | fontSize | ) |
Definition at line 200 of file mitkAnnotation.cpp.
References SetIntProperty().
Referenced by mitk::TextAnnotation2D::TextAnnotation2D(), and mitk::TextAnnotation3D::TextAnnotation3D().
void mitk::Annotation::SetForceInForeground | ( | bool | forceForeground | ) |
Definition at line 306 of file mitkAnnotation.cpp.
void mitk::Annotation::SetIntProperty | ( | const std::string & | propertyKey, |
int | intValue | ||
) |
Convenience method for setting int properties (instances of IntProperty)
Definition at line 141 of file mitkAnnotation.cpp.
References m_PropertyList, and mitk::IntProperty::New().
Referenced by mitk::ScaleLegendAnnotation::SetBottomBorderOffset(), mitk::LogoAnnotation::SetCornerPosition(), SetFontSize(), mitk::ScaleLegendAnnotation::SetLeftBorderOffset(), mitk::ColorBarAnnotation::SetMaxNumberOfColors(), mitk::ColorBarAnnotation::SetNumberOfLabels(), mitk::ColorBarAnnotation::SetOrientation(), mitk::ScaleLegendAnnotation::SetRightBorderOffset(), and mitk::ScaleLegendAnnotation::SetTopBorderOffset().
|
virtual |
Extra convenience access method to set the name of an object.
The name will be stored in the non-renderer-specific PropertyList in a StringProperty named "name".
Definition at line 178 of file mitkAnnotation.cpp.
References SetStringProperty().
Referenced by Annotation().
void mitk::Annotation::SetOpacity | ( | float | opacity, |
const std::string & | propertyKey = "opacity" |
||
) |
Convenience method for setting opacity properties (instances of FloatProperty)
Definition at line 265 of file mitkAnnotation.cpp.
References m_PropertyList, and mitk::FloatProperty::New().
Referenced by Annotation().
void mitk::Annotation::SetProperty | ( | const std::string & | propertyKey, |
const BaseProperty::Pointer & | property | ||
) |
Set the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer (if nullptr, use BaseRenderer-independent PropertyList). This is set-by-value.
SetProperty( "key", new SomeProperty("value") )
.Definition at line 61 of file mitkAnnotation.cpp.
References m_PropertyList.
Referenced by AddProperty(), mitk::ColorBarAnnotation::SetLookupTable(), mitk::VtkAnnotation3D::SetOffsetVector(), mitk::VtkAnnotation2D::SetOffsetVector(), mitk::LogoAnnotation::SetOffsetVector(), mitk::VtkAnnotation2D::SetPosition2D(), and mitk::VtkAnnotation3D::SetPosition3D().
void mitk::Annotation::SetStringProperty | ( | const std::string & | propertyKey, |
const std::string & | string | ||
) |
Convenience method for setting int properties (instances of IntProperty)
Definition at line 164 of file mitkAnnotation.cpp.
References m_PropertyList, and mitk::StringProperty::New().
Referenced by mitk::LogoAnnotation::SetLogoImagePath(), SetName(), SetText(), and mitk::TextAnnotation2D::TextAnnotation2D().
void mitk::Annotation::SetText | ( | std::string | text | ) |
Definition at line 188 of file mitkAnnotation.cpp.
References SetStringProperty().
Referenced by main(), mitk::TextAnnotation2D::TextAnnotation2D(), and mitk::TextAnnotation3D::TextAnnotation3D().
|
protected |
Definition at line 45 of file mitkAnnotation.cpp.
References us::ServiceRegistration< I1, I2, I3 >::GetReference(), and us::ServiceRegistrationBase::SetProperties().
Referenced by AnnotationModified().
void mitk::Annotation::SetVisibility | ( | bool | visible, |
const std::string & | propertyKey = "visible" |
||
) |
Convenience method for setting visibility properties (instances of BoolProperty)
visible | If set to true, the data will be rendered. If false, the render will skip this data. |
renderer | Specify a renderer if the visibility shall be specific to a renderer |
propertykey | Can be used to specify a user defined name of the visibility propery. |
Definition at line 272 of file mitkAnnotation.cpp.
References m_PropertyList, and mitk::BoolProperty::New().
Referenced by Annotation().
|
virtual |
Registers this object as a Microservice, making it available to every module and/or plugin.
Definition at line 337 of file mitkAnnotation.cpp.
References us::ServiceRegistrationBase::Unregister().
Referenced by ~Annotation().
|
pure virtual |
Applies all properties and should be called before the rendering procedure.
Implemented in mitk::VtkAnnotation.
|
protected |
Timestamp of the last change of m_Data.
Definition at line 433 of file mitkAnnotation.h.
|
protected |
BaseRenderer-independent PropertyList.
Properties herein can be overwritten specifically for each BaseRenderer by the BaseRenderer-specific properties defined in m_MapOfPropertyLists.
Definition at line 428 of file mitkAnnotation.h.
Referenced by Annotation(), ConcatenatePropertyList(), GetProperty(), GetPropertyList(), ReplaceProperty(), SetBoolProperty(), SetColor(), SetDoubleProperty(), SetFloatProperty(), SetIntProperty(), SetOpacity(), SetProperty(), SetStringProperty(), and SetVisibility().
|
static |
These Constants are used in conjunction with Microservices.
Definition at line 393 of file mitkAnnotation.h.
|
static |
Definition at line 394 of file mitkAnnotation.h.
|
static |
Definition at line 398 of file mitkAnnotation.h.
Referenced by mitk::ManualPlacementAnnotationRenderer::AddAnnotation(), and mitk::LayoutAnnotationRenderer::AddAnnotation().
|
static |
Definition at line 395 of file mitkAnnotation.h.
Referenced by mitk::AnnotationUtils::GetAnnotation(), GetMicroserviceID(), and RegisterAsMicroservice().
|
static |
Definition at line 396 of file mitkAnnotation.h.
Referenced by AnnotationModified().
|
static |
Definition at line 397 of file mitkAnnotation.h.
Referenced by mitk::ManualPlacementAnnotationRenderer::AddAnnotation(), and mitk::LayoutAnnotationRenderer::AddAnnotation().