VTK  9.0.20200807
vtkOpenGLImageMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLImageMapper.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef vtkOpenGLImageMapper_h
31 #define vtkOpenGLImageMapper_h
32 
33 #include "vtkImageMapper.h"
34 #include "vtkRenderingOpenGL2Module.h" // For export macro
35 
36 class vtkActor2D;
37 class vtkTexturedActor2D;
38 
39 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLImageMapper : public vtkImageMapper
40 {
41 public:
42  static vtkOpenGLImageMapper* New();
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
49  void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor) override
50  {
51  this->RenderStart(viewport, actor);
52  }
53 
58  void RenderData(vtkViewport* viewport, vtkImageData* data, vtkActor2D* actor) override;
59 
64  void DrawPixels(vtkViewport* viewport, int width, int height, int numComponents, void* data);
65 
70  void ReleaseGraphicsResources(vtkWindow*) override;
71 
72 protected:
74  ~vtkOpenGLImageMapper() override;
75 
77 
78 private:
80  void operator=(const vtkOpenGLImageMapper&) = delete;
81 };
82 
83 #endif
vtkImageMapper::RenderStart
void RenderStart(vtkViewport *viewport, vtkActor2D *actor)
Draw the image to the screen.
vtkImageMapper::New
static vtkImageMapper * New()
vtkOpenGLImageMapper
2D image display support for OpenGL
Definition: vtkOpenGLImageMapper.h:39
vtkImageMapper.h
vtkOpenGLImageMapper::Actor
vtkTexturedActor2D * Actor
Definition: vtkOpenGLImageMapper.h:76
vtkTexturedActor2D
actor that draws 2D data with texture support
Definition: vtkTexturedActor2D.h:38
vtkX3D::data
Definition: vtkX3D.h:321
vtkImageMapper
2D image display
Definition: vtkImageMapper.h:41
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkX3D::height
Definition: vtkX3D.h:260
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkImageMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAbstractMapper::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this mapper.
Definition: vtkAbstractMapper.h:68
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkOpenGLImageMapper::RenderOverlay
void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor) override
Handle the render method.
Definition: vtkOpenGLImageMapper.h:49
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:39
vtkImageMapper::RenderData
virtual void RenderData(vtkViewport *, vtkImageData *, vtkActor2D *)
Function called by Render to actually draw the image to to the screen.
Definition: vtkImageMapper.h:93