34 itk::Point<double, 2>
Size;
92 void AddProperty(
const std::string &propertyKey,
const BaseProperty::Pointer &property,
bool overwrite =
false);
135 template <
typename T>
138 property =
dynamic_cast<T *
>(GetProperty(propertyKey));
139 return property.IsNotNull();
153 template <
typename T>
154 bool GetProperty(T *&property,
const std::string &propertyKey)
const 156 property =
dynamic_cast<T *
>(GetProperty(propertyKey));
157 return property !=
nullptr;
165 template <
typename T>
182 bool GetBoolProperty(
const std::string &propertyKey,
bool &boolValue)
const;
189 bool GetIntProperty(
const std::string &propertyKey,
int &
intValue)
const;
196 bool GetFloatProperty(
const std::string &propertyKey,
float &floatValue)
const;
203 bool GetDoubleProperty(
const std::string &propertyKey,
double &doubleValue)
const;
210 bool GetStringProperty(
const std::string &propertyKey, std::string &
string)
const;
216 void SetIntProperty(
const std::string &propertyKey,
int intValue);
222 void SetBoolProperty(
const std::string &propertyKey,
bool boolValue);
228 void SetFloatProperty(
const std::string &propertyKey,
float floatValue);
234 void SetDoubleProperty(
const std::string &propertyKey,
double doubleValue);
240 void SetStringProperty(
const std::string &propertyKey,
const std::string &
string);
251 bool IsOn(
const std::string &propertyKey,
bool defaultIsOn =
true)
const 253 GetBoolProperty(propertyKey, defaultIsOn);
262 bool GetName(std::string &nodeName,
const std::string &propertyKey =
"name")
const;
273 virtual std::string
GetName()
const;
280 virtual void SetName(
const std::string &name);
287 bool GetColor(
float rgb[],
const std::string &propertyKey =
"color")
const;
292 void SetColor(
const mitk::Color &color,
const std::string &propertyKey =
"color");
297 void SetColor(
float red,
float green,
float blue,
const std::string &propertyKey =
"color");
302 void SetColor(
const float rgb[],
const std::string &propertyKey =
"color");
308 bool GetOpacity(
float &opacity,
const std::string &propertyKey =
"opacity")
const;
313 void SetOpacity(
float opacity,
const std::string &propertyKey =
"opacity");
315 void SetText(std::string text);
317 std::string GetText()
const;
319 void SetFontSize(
int fontSize);
321 int GetFontSize()
const;
329 bool GetVisibility(
bool &visible,
const std::string &propertyKey =
"visible")
const;
342 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.
static void Update(vtkPolyData *)
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...
static std::string GetName(std::string fileName, std::string suffix)
void UpdateGenerateDataTime()
static const std::string US_PROPKEY_MODIFIED