VTK: Rendering/Context2D/vtkImageItem.h Source File

| VTK 9.3.1

vtkImageItem.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
3
16 #ifndef vtkImageItem_h
17 #define vtkImageItem_h
18
19 #include "vtkContextItem.h"
20 #include "vtkRenderingContext2DModule.h" // For export macro
21 #include "vtkSmartPointer.h" // For SP ivars.
22
23 VTK_ABI_NAMESPACE_BEGIN
24 class vtkImageData;
25
26 class VTKRENDERINGCONTEXT2D_EXPORT vtkImageItem : public vtkContextItem
27 {
28 public:
29 vtkTypeMacro(vtkImageItem, vtkContextItem);
30 void PrintSelf(ostream& os, vtkIndent indent) override;
31
32 static vtkImageItem* New();
33
37 bool Paint(vtkContext2D* painter) override;
38
42 void SetImage(vtkImageData* image);
43
45
48 vtkGetObjectMacro(Image, vtkImageData);
50
52
55 vtkSetVector2Macro(Position, float);
57
59
62 vtkGetVector2Macro(Position, float);
64
65 protected:
66 vtkImageItem();
67 ~vtkImageItem() override;
68
69 float Position[2];
70
71 vtkImageData* Image;
72
73 private:
74 vtkImageItem(const vtkImageItem&) = delete;
75 void operator=(const vtkImageItem&) = delete;
76 };
77
78 VTK_ABI_NAMESPACE_END
79 #endif // vtkImageItem_h
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:59
vtkContextItem
base class for items that are part of a vtkContextScene.
Definition: vtkContextItem.h:35
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
vtkImageItem
a vtkContextItem that draws a supplied image in the scene.
Definition: vtkImageItem.h:27
vtkImageItem::vtkImageItem
vtkImageItem()
vtkImageItem::Paint
bool Paint(vtkContext2D *painter) override
Paint event for the item.
vtkImageItem::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageItem::Image
vtkImageData * Image
Definition: vtkImageItem.h:71
vtkImageItem::New
static vtkImageItem * New()
vtkImageItem::~vtkImageItem
~vtkImageItem() override
vtkImageItem::SetImage
void SetImage(vtkImageData *image)
Set the image of the item.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkParticleTracerBaseNamespace::Position
struct Position_t Position
Definition: vtkParticleTracerBase.h:55
vtkX3D::image
@ image
Definition: vtkX3D.h:374
vtkContextItem.h
vtkSmartPointer.h