VTK
9.7.20260910
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
Rendering
WebGPU
vtkWebGPUImageSliceMapper.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
19
#ifndef vtkWebGPUImageSliceMapper_h
20
#define vtkWebGPUImageSliceMapper_h
21
22
#include "
vtkImageSliceMapper.h
"
23
#include "
vtkNew.h
"
// for ivars
24
#include "vtkRenderingWebGPUModule.h"
// For export macro
25
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
26
27
VTK_ABI_NAMESPACE_BEGIN
28
class
vtkActor
;
29
class
vtkImageSlice
;
30
class
vtkOverrideAttribute
;
31
class
vtkPolyData
;
32
class
vtkRenderer
;
33
class
vtkTexture
;
34
class
vtkWindow
;
35
36
class
VTKRENDERINGWEBGPU_EXPORT
VTK_MARSHALAUTO
vtkWebGPUImageSliceMapper
37
:
public
vtkImageSliceMapper
38
{
39
public
:
40
vtkTypeMacro(
vtkWebGPUImageSliceMapper
,
vtkImageSliceMapper
);
41
static
vtkWebGPUImageSliceMapper
*
New
();
42
VTK_NEWINSTANCE
43
static
vtkOverrideAttribute
*
CreateOverrideAttributes
();
44
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
45
49
void
Render
(
vtkRenderer
* renderer,
vtkImageSlice
* prop)
override
;
50
54
void
ReleaseGraphicsResources
(
vtkWindow
* window)
override
;
55
56
protected
:
57
vtkWebGPUImageSliceMapper
();
58
~vtkWebGPUImageSliceMapper
()
override
;
59
63
void
BuildTexturedQuad
(
vtkImageSlice
* prop);
64
65
vtkNew<vtkActor>
ProxyActor
;
66
vtkNew<vtkPolyData>
Quad
;
67
vtkNew<vtkTexture>
Texture
;
68
69
// The quad and the texture are rebuilt when the input, the displayed extent
70
// or the image property changes.
71
vtkTimeStamp
BuildTime
;
72
int
BuiltExtent
[6] = { 0, -1, 0, -1, 0, -1 };
73
// What the texture currently holds. MakeTextureData reads these to decide
74
// whether it can reuse the existing texture and the input's own memory.
75
int
TextureSize
[2] = { 0, 0 };
76
int
TextureBytesPerPixel
= 4;
77
78
private
:
79
vtkWebGPUImageSliceMapper
(
const
vtkWebGPUImageSliceMapper
&) =
delete
;
80
void
operator=(
const
vtkWebGPUImageSliceMapper
&) =
delete
;
81
};
82
#define vtkWebGPUImageSliceMapper_OVERRIDE_ATTRIBUTES \
83
vtkWebGPUImageSliceMapper::CreateOverrideAttributes()
84
VTK_ABI_NAMESPACE_END
85
#endif
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition
vtkActor.h:151
vtkImageSliceMapper::vtkImageSliceMapper
vtkImageSliceMapper()
vtkImageSlice
represents an image in a 3D scene
Definition
vtkImageSlice.h:149
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:108
vtkNew
Allocate and hold a VTK object.
Definition
vtkNew.h:168
vtkOverrideAttribute
Attribute for vtkObjectFactory overrides.
Definition
vtkOverrideAttribute.h:51
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition
vtkPolyData.h:180
vtkRenderer
abstract specification for renderers
Definition
vtkRenderer.h:173
vtkTexture
handles properties associated with a texture map
Definition
vtkTexture.h:168
vtkTimeStamp
record modification and/or execution time
Definition
vtkTimeStamp.h:44
vtkWebGPUImageSliceMapper::CreateOverrideAttributes
static vtkOverrideAttribute * CreateOverrideAttributes()
vtkWebGPUImageSliceMapper::BuildTexturedQuad
void BuildTexturedQuad(vtkImageSlice *prop)
Rebuild the quad and the texture that the proxy actor draws.
vtkWebGPUImageSliceMapper::ProxyActor
vtkNew< vtkActor > ProxyActor
Definition
vtkWebGPUImageSliceMapper.h:65
vtkWebGPUImageSliceMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkWebGPUImageSliceMapper::Texture
vtkNew< vtkTexture > Texture
Definition
vtkWebGPUImageSliceMapper.h:67
vtkWebGPUImageSliceMapper::Render
void Render(vtkRenderer *renderer, vtkImageSlice *prop) override
Draw the slice.
vtkWebGPUImageSliceMapper::TextureBytesPerPixel
int TextureBytesPerPixel
Definition
vtkWebGPUImageSliceMapper.h:76
vtkWebGPUImageSliceMapper::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *window) override
Release any graphics resources held by the proxy actor and its texture.
vtkWebGPUImageSliceMapper::New
static vtkWebGPUImageSliceMapper * New()
vtkWebGPUImageSliceMapper::BuildTime
vtkTimeStamp BuildTime
Definition
vtkWebGPUImageSliceMapper.h:71
vtkWebGPUImageSliceMapper::BuiltExtent
int BuiltExtent[6]
Definition
vtkWebGPUImageSliceMapper.h:72
vtkWebGPUImageSliceMapper::TextureSize
int TextureSize[2]
Definition
vtkWebGPUImageSliceMapper.h:75
vtkWebGPUImageSliceMapper::vtkWebGPUImageSliceMapper
vtkWebGPUImageSliceMapper()
vtkWebGPUImageSliceMapper::~vtkWebGPUImageSliceMapper
~vtkWebGPUImageSliceMapper() override
vtkWebGPUImageSliceMapper::Quad
vtkNew< vtkPolyData > Quad
Definition
vtkWebGPUImageSliceMapper.h:66
vtkWindow
window superclass for vtkRenderWindow
Definition
vtkWindow.h:62
vtkImageSliceMapper.h
vtkNew.h
vtkWrappingHints.h
VTK_MARSHALAUTO
#define VTK_MARSHALAUTO
Definition
vtkWrappingHints.h:78
VTK_NEWINSTANCE
#define VTK_NEWINSTANCE
Definition
vtkWrappingHints.h:72
Generated on
for VTK by
1.16.1