Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
Displays configurable scales on the renderwindow. The scale is determined by the image spacing. More...
#include <mitkScaleLegendAnnotation.h>
Classes | |
class | LocalStorage |
Public Member Functions | |
mitkClassMacro (ScaleLegendAnnotation, mitk::VtkAnnotation) | |
Pointer | Clone () const |
void | SetRightAxisVisibility (bool visibility) |
bool | GetRightAxisVisibility () const |
void | SetLeftAxisVisibility (bool visibility) |
bool | GetLeftAxisVisibility () const |
void | SetTopAxisVisibility (bool visibility) |
bool | GetTopAxisVisibility () const |
void | SetBottomAxisVisibility (bool visibility) |
bool | GetBottomAxisVisibility () const |
void | SetLegendVisibility (bool visibility) |
bool | GetLegendVisibility () const |
void | SetRightBorderOffset (int offset) |
int | GetRightBorderOffset () const |
void | SetLeftBorderOffset (int offset) |
int | GetLeftBorderOffset () const |
void | SetTopBorderOffset (int offset) |
int | GetTopBorderOffset () const |
void | SetBottomBorderOffset (int offset) |
int | GetBottomBorderOffset () const |
void | SetFontFactor (double fontFactor) |
double | GetFontFactor () const |
void | SetCornerOffsetFactor (double offsetFactor) |
double | GetCornerOffsetFactor () const |
![]() | |
mitkClassMacro (VtkAnnotation, Annotation) | |
void | Update (BaseRenderer *renderer) override |
Applies all properties and should be called before the rendering procedure. More... | |
void | AddToBaseRenderer (BaseRenderer *renderer) override |
Adds the Annotation to the specified renderer. Update Annotation should be called soon in order to apply all properties. More... | |
void | AddToRenderer (BaseRenderer *renderer, vtkRenderer *vtkrenderer) override |
Adds the Annotation to the specified renderer. Update Annotation should be called soon in order to apply all properties. More... | |
void | RemoveFromRenderer (BaseRenderer *renderer, vtkRenderer *vtkrenderer) override |
Removes the Annotation from the specified renderer. It is not visible anymore then. More... | |
void | RemoveFromBaseRenderer (BaseRenderer *renderer) override |
Removes the Annotation from the specified renderer. It is not visible anymore then. More... | |
void | Paint (BaseRenderer *renderer) |
Paints the Annotation. More... | |
![]() | |
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 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 Pointer | New () |
![]() | |
static const char * | GetStaticNameOfClass () |
Protected Member Functions | |
vtkProp * | GetVtkProp (BaseRenderer *renderer) const override |
This method is implemented by the specific VTKAnnotation in order to create the element as a vtkProp. More... | |
void | UpdateVtkAnnotation (BaseRenderer *renderer) override |
ScaleLegendAnnotation () | |
explicit constructor which disallows implicit conversions More... | |
~ScaleLegendAnnotation () override | |
virtual destructor in order to derive from this class More... | |
![]() | |
VtkAnnotation () | |
explicit constructor which disallows implicit conversions More... | |
~VtkAnnotation () override | |
virtual destructor in order to derive from this class More... | |
![]() | |
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 | |
mitk::LocalStorageHandler< LocalStorage > | m_LSH |
The LocalStorageHandler holds all LocalStorages for the render windows. More... | |
![]() | |
PropertyList::Pointer | m_PropertyList |
BaseRenderer-independent PropertyList. More... | |
itk::TimeStamp | m_DataReferenceChangedTime |
Timestamp of the last change of m_Data. More... | |
Additional Inherited Members | |
![]() | |
typedef Annotation | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
![]() | |
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 |
Displays configurable scales on the renderwindow. The scale is determined by the image spacing.
Definition at line 26 of file mitkScaleLegendAnnotation.h.
|
explicitprotected |
explicit constructor which disallows implicit conversions
Definition at line 18 of file mitkScaleLegendAnnotation.cpp.
References SetBottomAxisVisibility(), SetBottomBorderOffset(), SetCornerOffsetFactor(), SetFontFactor(), SetLeftAxisVisibility(), SetLeftBorderOffset(), SetLegendVisibility(), SetRightAxisVisibility(), SetRightBorderOffset(), SetTopAxisVisibility(), and SetTopBorderOffset().
|
overrideprotected |
virtual destructor in order to derive from this class
Definition at line 33 of file mitkScaleLegendAnnotation.cpp.
References mitk::LocalStorageHandler< L >::GetRegisteredBaseRenderer(), m_LSH, and mitk::VtkAnnotation::RemoveFromBaseRenderer().
Pointer mitk::ScaleLegendAnnotation::Clone | ( | ) | const |
bool mitk::ScaleLegendAnnotation::GetBottomAxisVisibility | ( | ) | const |
Definition at line 123 of file mitkScaleLegendAnnotation.cpp.
References mitk::PropertyList::GetBoolProperty(), and mitk::Annotation::GetPropertyList().
Referenced by UpdateVtkAnnotation().
int mitk::ScaleLegendAnnotation::GetBottomBorderOffset | ( | ) | const |
Definition at line 183 of file mitkScaleLegendAnnotation.cpp.
References mitk::PropertyList::GetIntProperty(), mitk::Annotation::GetPropertyList(), and offset.
Referenced by UpdateVtkAnnotation().
double mitk::ScaleLegendAnnotation::GetCornerOffsetFactor | ( | ) | const |
Definition at line 195 of file mitkScaleLegendAnnotation.cpp.
References mitk::PropertyList::GetDoubleProperty(), and mitk::Annotation::GetPropertyList().
Referenced by UpdateVtkAnnotation().
double mitk::ScaleLegendAnnotation::GetFontFactor | ( | ) | const |
Definition at line 207 of file mitkScaleLegendAnnotation.cpp.
References mitk::PropertyList::GetDoubleProperty(), and mitk::Annotation::GetPropertyList().
Referenced by UpdateVtkAnnotation().
bool mitk::ScaleLegendAnnotation::GetLeftAxisVisibility | ( | ) | const |
Definition at line 99 of file mitkScaleLegendAnnotation.cpp.
References mitk::PropertyList::GetBoolProperty(), and mitk::Annotation::GetPropertyList().
Referenced by UpdateVtkAnnotation().
int mitk::ScaleLegendAnnotation::GetLeftBorderOffset | ( | ) | const |
Definition at line 159 of file mitkScaleLegendAnnotation.cpp.
References mitk::PropertyList::GetIntProperty(), mitk::Annotation::GetPropertyList(), and offset.
Referenced by UpdateVtkAnnotation().
bool mitk::ScaleLegendAnnotation::GetLegendVisibility | ( | ) | const |
Definition at line 135 of file mitkScaleLegendAnnotation.cpp.
References mitk::PropertyList::GetBoolProperty(), and mitk::Annotation::GetPropertyList().
Referenced by UpdateVtkAnnotation().
bool mitk::ScaleLegendAnnotation::GetRightAxisVisibility | ( | ) | const |
Definition at line 87 of file mitkScaleLegendAnnotation.cpp.
References mitk::PropertyList::GetBoolProperty(), and mitk::Annotation::GetPropertyList().
Referenced by UpdateVtkAnnotation().
int mitk::ScaleLegendAnnotation::GetRightBorderOffset | ( | ) | const |
Definition at line 147 of file mitkScaleLegendAnnotation.cpp.
References mitk::PropertyList::GetIntProperty(), mitk::Annotation::GetPropertyList(), and offset.
Referenced by UpdateVtkAnnotation().
bool mitk::ScaleLegendAnnotation::GetTopAxisVisibility | ( | ) | const |
Definition at line 111 of file mitkScaleLegendAnnotation.cpp.
References mitk::PropertyList::GetBoolProperty(), and mitk::Annotation::GetPropertyList().
Referenced by UpdateVtkAnnotation().
int mitk::ScaleLegendAnnotation::GetTopBorderOffset | ( | ) | const |
Definition at line 171 of file mitkScaleLegendAnnotation.cpp.
References mitk::PropertyList::GetIntProperty(), mitk::Annotation::GetPropertyList(), and offset.
Referenced by UpdateVtkAnnotation().
|
overrideprotectedvirtual |
This method is implemented by the specific VTKAnnotation in order to create the element as a vtkProp.
renderer |
Implements mitk::VtkAnnotation.
Definition at line 76 of file mitkScaleLegendAnnotation.cpp.
References mitk::LocalStorageHandler< L >::GetLocalStorage(), ls, mitk::ScaleLegendAnnotation::LocalStorage::m_legendScaleActor, and m_LSH.
mitk::ScaleLegendAnnotation::mitkClassMacro | ( | ScaleLegendAnnotation | , |
mitk::VtkAnnotation | |||
) |
|
static |
Referenced by QmitkPAUSViewerView::AddOverlays().
void mitk::ScaleLegendAnnotation::SetBottomAxisVisibility | ( | bool | visibility | ) |
Definition at line 118 of file mitkScaleLegendAnnotation.cpp.
References mitk::Annotation::SetBoolProperty().
Referenced by ScaleLegendAnnotation().
void mitk::ScaleLegendAnnotation::SetBottomBorderOffset | ( | int | offset | ) |
Definition at line 178 of file mitkScaleLegendAnnotation.cpp.
References mitk::Annotation::SetIntProperty().
Referenced by ScaleLegendAnnotation().
void mitk::ScaleLegendAnnotation::SetCornerOffsetFactor | ( | double | offsetFactor | ) |
Definition at line 190 of file mitkScaleLegendAnnotation.cpp.
References mitk::Annotation::SetDoubleProperty().
Referenced by ScaleLegendAnnotation().
void mitk::ScaleLegendAnnotation::SetFontFactor | ( | double | fontFactor | ) |
Definition at line 202 of file mitkScaleLegendAnnotation.cpp.
References mitk::Annotation::SetDoubleProperty().
Referenced by ScaleLegendAnnotation().
void mitk::ScaleLegendAnnotation::SetLeftAxisVisibility | ( | bool | visibility | ) |
Definition at line 94 of file mitkScaleLegendAnnotation.cpp.
References mitk::Annotation::SetBoolProperty().
Referenced by ScaleLegendAnnotation().
void mitk::ScaleLegendAnnotation::SetLeftBorderOffset | ( | int | offset | ) |
Definition at line 154 of file mitkScaleLegendAnnotation.cpp.
References mitk::Annotation::SetIntProperty().
Referenced by ScaleLegendAnnotation().
void mitk::ScaleLegendAnnotation::SetLegendVisibility | ( | bool | visibility | ) |
Definition at line 130 of file mitkScaleLegendAnnotation.cpp.
References mitk::Annotation::SetBoolProperty().
Referenced by ScaleLegendAnnotation().
void mitk::ScaleLegendAnnotation::SetRightAxisVisibility | ( | bool | visibility | ) |
Definition at line 82 of file mitkScaleLegendAnnotation.cpp.
References mitk::Annotation::SetBoolProperty().
Referenced by ScaleLegendAnnotation().
void mitk::ScaleLegendAnnotation::SetRightBorderOffset | ( | int | offset | ) |
Definition at line 142 of file mitkScaleLegendAnnotation.cpp.
References mitk::Annotation::SetIntProperty().
Referenced by ScaleLegendAnnotation().
void mitk::ScaleLegendAnnotation::SetTopAxisVisibility | ( | bool | visibility | ) |
Definition at line 106 of file mitkScaleLegendAnnotation.cpp.
References mitk::Annotation::SetBoolProperty().
Referenced by ScaleLegendAnnotation().
void mitk::ScaleLegendAnnotation::SetTopBorderOffset | ( | int | offset | ) |
Definition at line 166 of file mitkScaleLegendAnnotation.cpp.
References mitk::Annotation::SetIntProperty().
Referenced by ScaleLegendAnnotation().
|
overrideprotectedvirtual |
Implements mitk::VtkAnnotation.
Definition at line 53 of file mitkScaleLegendAnnotation.cpp.
References GetBottomAxisVisibility(), GetBottomBorderOffset(), GetCornerOffsetFactor(), GetFontFactor(), GetLeftAxisVisibility(), GetLeftBorderOffset(), GetLegendVisibility(), mitk::LocalStorageHandler< L >::GetLocalStorage(), GetRightAxisVisibility(), GetRightBorderOffset(), GetTopAxisVisibility(), GetTopBorderOffset(), mitk::Annotation::BaseLocalStorage::IsGenerateDataRequired(), ls, mitk::ScaleLegendAnnotation::LocalStorage::m_legendScaleActor, and m_LSH.
|
mutableprotected |
The LocalStorageHandler holds all LocalStorages for the render windows.
Definition at line 83 of file mitkScaleLegendAnnotation.h.
Referenced by GetVtkProp(), UpdateVtkAnnotation(), and ~ScaleLegendAnnotation().