VTK  9.3.1
vtkOpenGLImageMapper.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
18 #ifndef vtkOpenGLImageMapper_h
19 #define vtkOpenGLImageMapper_h
20 
21 #include "vtkImageMapper.h"
22 #include "vtkRenderingOpenGL2Module.h" // For export macro
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 class vtkActor2D;
26 class vtkTexturedActor2D;
27 
28 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLImageMapper : public vtkImageMapper
29 {
30 public:
31  static vtkOpenGLImageMapper* New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
38  void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor) override
39  {
40  this->RenderStart(viewport, actor);
41  }
42 
47  void RenderData(vtkViewport* viewport, vtkImageData* data, vtkActor2D* actor) override;
48 
53  void DrawPixels(vtkViewport* viewport, int width, int height, int numComponents, void* data);
54 
59  void ReleaseGraphicsResources(vtkWindow*) override;
60 
61 protected:
63  ~vtkOpenGLImageMapper() override;
64 
66 
67 private:
69  void operator=(const vtkOpenGLImageMapper&) = delete;
70 };
71 
72 VTK_ABI_NAMESPACE_END
73 #endif
actor that draws 2D data with texture support
abstract specification for Viewports
Definition: vtkViewport.h:44
a actor that draws 2D data
Definition: vtkActor2D.h:34
void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor) override
Handle the render method.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
2D image display support for OpenGL
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkImageMapper * New()
virtual void RenderData(vtkViewport *, vtkImageData *, vtkActor2D *)
Function called by Render to actually draw the image to to the screen.
virtual void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this mapper.
vtkTexturedActor2D * Actor
2D image display
void RenderStart(vtkViewport *viewport, vtkActor2D *actor)
Draw the image to the screen.