VTK  9.6.20260204
vtkOpenGLImageSliceMapper.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
13
14#ifndef vtkOpenGLImageSliceMapper_h
15#define vtkOpenGLImageSliceMapper_h
16
17#include "vtkImageSliceMapper.h"
18#include "vtkRenderingOpenGL2Module.h" // For export macro
19#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
20
21VTK_ABI_NAMESPACE_BEGIN
22// Forward declarations
23class vtkActor;
25class vtkOpenGLHelper;
27class vtkRenderWindow;
28
29class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkOpenGLImageSliceMapper
30 : public vtkImageSliceMapper
31{
32public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
42 void Render(vtkRenderer* ren, vtkImageSlice* prop) override;
43
50
51protected:
54
61 vtkImageData* image, int extent[6], bool recursive);
62
68 int extent[6], bool recursive);
69
74 void RenderPolygon(vtkActor* actor, vtkPoints* points, const int extent[6], vtkRenderer* ren);
75
80 void RenderBackground(vtkActor* actor, vtkPoints* points, const int extent[6], vtkRenderer* ren);
81
87
96 const int extent[6], int& xdim, int& ydim, int imageSize[2], int textureSize[2]) override;
97
102 bool TextureSizeOK(const int size[2], vtkRenderer* ren);
103
104 vtkRenderWindow* RenderWindow; // RenderWindow used for previous render
109
114
116
117private:
119 void operator=(const vtkOpenGLImageSliceMapper&) = delete;
120};
121#define vtkOpenGLImageSliceMapper_OVERRIDE_ATTRIBUTES \
122 vtkOpenGLImageSliceMapper::CreateOverrideAttributes()
123VTK_ABI_NAMESPACE_END
124#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
topologically and geometrically regular array of data
image display properties
represents an image in a 3D scene
a simple class to control print indentation
Definition vtkIndent.h:108
~vtkOpenGLImageSliceMapper() override
void RecursiveRenderTexturedPolygon(vtkRenderer *ren, vtkImageProperty *property, vtkImageData *image, int extent[6], bool recursive)
Recursive internal method, will call the non-recursive method as many times as necessary if the textu...
void ComputeTextureSize(const int extent[6], int &xdim, int &ydim, int imageSize[2], int textureSize[2]) override
Given an extent that describes a slice (it must have unit thickness in one of the three directions),...
void RenderPolygon(vtkActor *actor, vtkPoints *points, const int extent[6], vtkRenderer *ren)
Basic polygon rendering, if the textured parameter is set the tcoords are included,...
void RenderTexturedPolygon(vtkRenderer *ren, vtkImageProperty *property, vtkImageData *image, int extent[6], bool recursive)
Non-recursive internal method, generate a single texture and its corresponding geometry.
static vtkOpenGLImageSliceMapper * New()
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper, the image texture in particula...
bool TextureSizeOK(const int size[2], vtkRenderer *ren)
Test whether a given texture size is supported.
void RenderForSelection(vtkRenderer *ren, vtkImageSlice *prop, vtkHardwareSelector *selector)
Render for selection.
static vtkOverrideAttribute * CreateOverrideAttributes()
void RenderBackground(vtkActor *actor, vtkPoints *points, const int extent[6], vtkRenderer *ren)
Render the background, which means rendering everything within the plane of the image except for the ...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Render(vtkRenderer *ren, vtkImageSlice *prop) override
Implement base class method.
Attribute for vtkObjectFactory overrides.
represent and manipulate 3D points
Definition vtkPoints.h:139
create a window for renderers to draw into
abstract specification for renderers
record modification and/or execution time
window superclass for vtkRenderWindow
Definition vtkWindow.h:61
#define VTK_MARSHALAUTO
#define VTK_NEWINSTANCE