34 itk::Point<double, 2>
Size;
92 void AddProperty(
const std::string &propertyKey,
const BaseProperty::Pointer &property,
bool overwrite =
false);
136 template <
typename T>
139 property =
dynamic_cast<T *
>(GetProperty(propertyKey));
140 return property.IsNotNull();
154 template <
typename T>
155 bool GetProperty(T *&property,
const std::string &propertyKey)
const 157 property =
dynamic_cast<T *
>(GetProperty(propertyKey));
158 return property !=
nullptr;
166 template <
typename T>
183 bool GetBoolProperty(
const std::string &propertyKey,
bool &boolValue)
const;
190 bool GetIntProperty(
const std::string &propertyKey,
int &intValue)
const;
197 bool GetFloatProperty(
const std::string &propertyKey,
float &floatValue)
const;
204 bool GetDoubleProperty(
const std::string &propertyKey,
double &doubleValue)
const;
211 bool GetStringProperty(
const std::string &propertyKey, std::string &
string)
const;
217 void SetIntProperty(
const std::string &propertyKey,
int intValue);
223 void SetBoolProperty(
const std::string &propertyKey,
bool boolValue);
229 void SetFloatProperty(
const std::string &propertyKey,
float floatValue);
235 void SetDoubleProperty(
const std::string &propertyKey,
double doubleValue);
241 void SetStringProperty(
const std::string &propertyKey,
const std::string &
string);
252 bool IsOn(
const std::string &propertyKey,
bool defaultIsOn =
true)
const 254 GetBoolProperty(propertyKey, defaultIsOn);
263 bool GetName(std::string &nodeName,
const std::string &propertyKey =
"name")
const;
274 virtual std::string GetName()
const;
281 virtual void SetName(
const std::string &name);
288 bool GetColor(
float rgb[],
const std::string &propertyKey =
"color")
const;
293 void SetColor(
const mitk::Color &color,
const std::string &propertyKey =
"color");
298 void SetColor(
float red,
float green,
float blue,
const std::string &propertyKey =
"color");
303 void SetColor(
const float rgb[],
const std::string &propertyKey =
"color");
309 bool GetOpacity(
float &opacity,
const std::string &propertyKey =
"opacity")
const;
314 void SetOpacity(
float opacity,
const std::string &propertyKey =
"opacity");
316 void SetText(std::string text);
318 std::string GetText()
const;
320 void SetFontSize(
int fontSize);
322 int GetFontSize()
const;
330 bool GetVisibility(
bool &visible,
const std::string &propertyKey =
"visible")
const;
343 bool IsVisible(
const std::string &propertyKey =
"visible",
bool defaultIsOn =
true)
const;
351 void SetVisibility(
bool visible,
const std::string &propertyKey =
"visible");
356 virtual void AddToBaseRenderer(
BaseRenderer *renderer) = 0;
361 virtual void AddToRenderer(
BaseRenderer *renderer, vtkRenderer *vtkrenderer) = 0;
364 virtual void RemoveFromBaseRenderer(
BaseRenderer *renderer) = 0;
367 virtual void RemoveFromRenderer(
BaseRenderer *renderer, vtkRenderer *vtkrenderer) = 0;
378 void SetForceInForeground(
bool forceForeground);
380 bool IsForceInForeground()
const;
388 std::string GetMicroserviceID();
409 virtual void UnRegisterMicroservice();
411 void AnnotationModified();
435 void SetUSProperty(
const std::string &propertyKey,
us::Any value);
439 bool m_ForceInForeground;
450 unsigned long m_PropertyListModifiedObserverTag;
451 void PropertyListModified(
const itk::Object *,
const itk::EventObject &);
458 #endif // Annotation_H #define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
Container for position and size on the display.
PropertyList::Pointer m_PropertyList
BaseRenderer-independent PropertyList.
bool IsOn(const std::string &propertyKey, bool defaultIsOn=true) const
Convenience access method for boolean properties (instances of BoolProperty). Return value is the val...
itk::Point< double, 2 > Size
static const std::string US_PROPKEY_ID
Organizes the rendering process.
DataCollection - Class to facilitate loading/accessing structured data.
itk::TimeStamp m_LastGenerateDataTime
timestamp of last update of stored data
itk::TimeStamp & GetLastGenerateDataTime()
Key-value list holding instances of BaseProperty.
Base class for mapper specific rendering ressources.
static const std::string US_INTERFACE_NAME
These Constants are used in conjunction with Microservices.
virtual T GetValue() const
itk::TimeStamp m_DataReferenceChangedTime
Timestamp of the last change of m_Data.
static const std::string US_PROPKEY_AnnotationNAME
Abstract base class for properties.
itk::Point< double, 2 > Position
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.
#define mitkClassMacroItkParent(className, SuperClassName)
bool GetPropertyValue(const std::string &propertyKey, T &value) const
Convenience access method for GenericProperty<T> properties (T being the type of the second parameter...
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
US_UNORDERED_MAP_TYPE< std::string, Any > ServiceProperties
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.
Base class for all Annotation This class is to be implemented in order to create Annotation which are...
static const std::string US_PROPKEY_RENDERER_ID
static const std::string US_PROPKEY_AR_ID
static const char * replace[]
This is a dictionary to replace long names of classes, modules, etc. to shorter versions in the conso...
void UpdateGenerateDataTime()
static const std::string US_PROPKEY_MODIFIED