16 #include <vtkScalarBarActor.h> 51 m_ScalarBarActor = vtkSmartPointer<vtkScalarBarActor>::New();
105 lut->SetVtkLookupTable(table);
106 prop->SetLookupTable(lut);
107 SetProperty(
"ColorBarAnnotation.LookupTable", prop.GetPointer());
115 return lut->GetVtkLookupTable();
154 SetIntProperty(
"ColorBarAnnotation.MaximumNumberOfColors", numberOfColors);
161 return numberOfColors;
166 SetIntProperty(
"ColorBarAnnotation.NumberOfLabels", numberOfLabels);
173 return numberOfLabels;
void SetNumberOfLabels(int numberOfLabels)
vtkProp * GetVtkProp(BaseRenderer *renderer) const override
This method is implemented by the specific VTKAnnotation in order to create the element as a vtkProp...
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 ...
L * GetLocalStorage(mitk::BaseRenderer *forRenderer)
Retrieves a LocalStorage for a specific BaseRenderer.
void SetOrientationToHorizontal()
~LocalStorage()
Default deconstructor of the local storage.
bool GetDrawAnnotations() const
std::vector< mitk::BaseRenderer * > GetRegisteredBaseRenderer()
bool GetIntProperty(const char *propertyKey, int &intValue) const
Convenience method to access the value of an IntProperty.
vtkSmartPointer< vtkLookupTable > GetLookupTable() const
vtkSmartPointer< vtkScalarBarActor > m_ScalarBarActor
Actor of a 2D render window.
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all LocalStorages for the render windows.
Organizes the rendering process.
bool IsGenerateDataRequired(mitk::BaseRenderer *renderer, mitk::Annotation *Annotation)
int GetMaxNumberOfColors() const
bool GetAnnotationTextScaling() const
~ColorBarAnnotation() override
virtual destructor in order to derive from this class
void SetOrientation(int orientation)
ColorBarAnnotation()
explicit constructor which disallows implicit conversions
bool GetDrawTickLabels() const
int GetNumberOfLabels() const
The LookupTableProperty class Property to associate mitk::LookupTable to an mitk::DataNode.
void UpdateVtkAnnotation(BaseRenderer *renderer) override
void SetMaxNumberOfColors(int numberOfColors)
void RemoveFromBaseRenderer(BaseRenderer *renderer) override
Removes the Annotation from the specified renderer. It is not visible anymore then.
void SetBoolProperty(const std::string &propertyKey, bool boolValue)
Convenience method for setting int properties (instances of IntProperty)
void SetDrawTickLabels(bool ticks)
void SetOrientationToVertical()
int GetOrientation() const
LocalStorage()
Default constructor of the local storage.
mitk::BaseProperty * GetProperty(const std::string &propertyKey) const
Get a property by its name.
void SetAnnotationTextScaling(bool scale)
void SetLookupTable(vtkSmartPointer< vtkLookupTable > table)
PropertyList * GetPropertyList() const
bool GetBoolProperty(const char *propertyKey, bool &boolValue) const
Convenience method to access the value of a BoolProperty.
void SetIntProperty(const std::string &propertyKey, int intValue)
Convenience method for setting int properties (instances of IntProperty)
void SetDrawAnnotations(bool annotations)