15 #include <vtkProperty.h> 27 vtkSmartPointer<vtkProp> prop =
GetVtkProp(renderer);
30 prop->SetVisibility(
false);
35 prop->SetVisibility(
true);
49 if (!renderer || !vtkrenderer)
52 vtkSmartPointer<vtkProp> vtkProp =
GetVtkProp(renderer);
53 if (renderer && vtkrenderer && !vtkrenderer->HasViewProp(vtkProp))
55 vtkrenderer->AddViewProp(vtkProp);
69 if (!renderer || !vtkrenderer)
71 vtkSmartPointer<vtkProp> vtkProp =
GetVtkProp(renderer);
72 if (vtkrenderer->HasViewProp(vtkProp))
74 vtkrenderer->RemoveViewProp(vtkProp);
vtkRenderer * GetVtkRenderer() const
~VtkAnnotation() override
virtual destructor in order to derive from this class
VtkAnnotation()
explicit constructor which disallows implicit conversions
virtual vtkProp * GetVtkProp(BaseRenderer *renderer) const =0
This method is implemented by the specific VTKAnnotation in order to create the element as a vtkProp...
bool IsVisible(const std::string &propertyKey="visible", bool defaultIsOn=true) const
Convenience access method for visibility properties (instances of BoolProperty). Return value is the ...
Organizes the rendering process.
static RenderingManager * GetInstance()
void AddToRenderer(BaseRenderer *renderer, vtkRenderer *vtkrenderer) override
Adds the Annotation to the specified renderer. Update Annotation should be called soon in order to ap...
void AddToBaseRenderer(BaseRenderer *renderer) override
Adds the Annotation to the specified renderer. Update Annotation should be called soon in order to ap...
void RemoveFromBaseRenderer(BaseRenderer *renderer) override
Removes the Annotation from the specified renderer. It is not visible anymore then.
virtual void UpdateVtkAnnotation(BaseRenderer *renderer)=0
void RemoveFromRenderer(BaseRenderer *renderer, vtkRenderer *vtkrenderer) override
Removes the Annotation from the specified renderer. It is not visible anymore then.
void RequestUpdate(vtkRenderWindow *renderWindow)
void Paint(BaseRenderer *renderer)
Paints the Annotation.
void Update(BaseRenderer *renderer) override
Applies all properties and should be called before the rendering procedure.