VTK: Rendering/OpenGL2/vtkOpenGLImageMapper.h Source File

| 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();
32 vtkTypeMacro(vtkOpenGLImageMapper, vtkImageMapper);
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:
62 vtkOpenGLImageMapper();
63 ~vtkOpenGLImageMapper() override;
64
65 vtkTexturedActor2D* Actor;
66
67 private:
68 vtkOpenGLImageMapper(const vtkOpenGLImageMapper&) = delete;
69 void operator=(const vtkOpenGLImageMapper&) = delete;
70 };
71
72 VTK_ABI_NAMESPACE_END
73 #endif
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:44
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
vtkImageMapper
2D image display
Definition: vtkImageMapper.h:43
vtkImageMapper::RenderStart
void RenderStart(vtkViewport *viewport, vtkActor2D *actor)
Draw the image to the screen.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkOpenGLImageMapper
2D image display support for OpenGL
Definition: vtkOpenGLImageMapper.h:29
vtkOpenGLImageMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOpenGLImageMapper::~vtkOpenGLImageMapper
~vtkOpenGLImageMapper() override
vtkOpenGLImageMapper::Actor
vtkTexturedActor2D * Actor
Definition: vtkOpenGLImageMapper.h:65
vtkOpenGLImageMapper::RenderData
void RenderData(vtkViewport *viewport, vtkImageData *data, vtkActor2D *actor) override
Called by the Render function in vtkImageMapper.
vtkOpenGLImageMapper::DrawPixels
void DrawPixels(vtkViewport *viewport, int width, int height, int numComponents, void *data)
draw the data once it has been converted to uchar, windowed leveled used internally by the templated ...
vtkOpenGLImageMapper::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper, the image texture in particula...
vtkOpenGLImageMapper::RenderOverlay
void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor) override
Handle the render method.
Definition: vtkOpenGLImageMapper.h:38
vtkOpenGLImageMapper::vtkOpenGLImageMapper
vtkOpenGLImageMapper()
vtkOpenGLImageMapper::New
static vtkOpenGLImageMapper * New()
vtkTexturedActor2D
actor that draws 2D data with texture support
Definition: vtkTexturedActor2D.h:31
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:54
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkX3D::height
@ height
Definition: vtkX3D.h:254
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkImageMapper.h