VTK  9.7.1
vtkWebGPUImageMapper.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
9 #ifndef vtkWebGPUImageMapper_h
10 #define vtkWebGPUImageMapper_h
11 
12 #include "vtkImageMapper.h"
13 #include "vtkRenderingWebGPUModule.h" // For export macro
14 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
15 
16 VTK_ABI_NAMESPACE_BEGIN
18 class vtkTexturedActor2D;
19 class vtkWebGPURenderer;
20 class VTKRENDERINGWEBGPU_EXPORT VTK_MARSHALAUTO vtkWebGPUImageMapper : public vtkImageMapper
21 {
22 public:
25  static vtkOverrideAttribute* CreateOverrideAttributes();
26  static vtkWebGPUImageMapper* New();
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28 
29  void ReleaseGraphicsResources(vtkWindow* window) override;
30 
31  void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor) override;
32 
33  void RenderData(vtkViewport* viewport, vtkImageData* image, vtkActor2D* actor) override;
34 
35 protected:
37  ~vtkWebGPUImageMapper() override;
38 
39 private:
41  void operator=(const vtkWebGPUImageMapper&) = delete;
42 
43  vtkNew<vtkTexturedActor2D> ProxyActor;
44 
45  void CreateTextureFromImage(vtkImageData* input, vtkWebGPURenderer* wgpuRenderer);
46 };
47 #define vtkWebGPUImageMapper_OVERRIDE_ATTRIBUTES vtkWebGPUImageMapper::CreateOverrideAttributes()
48 VTK_ABI_NAMESPACE_END
49 #endif
Attribute for vtkObjectFactory overrides.
actor that draws 2D data with texture support
virtual void RenderOverlay(vtkViewport *, vtkActor2D *)
Definition: vtkMapper2D.h:31
abstract specification for Viewports
Definition: vtkViewport.h:46
a actor that draws 2D data
Definition: vtkActor2D.h:35
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
2D image display using webgpu
#define VTK_NEWINSTANCE
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.
2D image display
#define VTK_MARSHALAUTO