VTK  9.3.0
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
23VTK_ABI_NAMESPACE_BEGIN
24class vtkImageData;
25
26class VTKRENDERINGCONTEXT2D_EXPORT vtkImageItem : public vtkContextItem
27{
28public:
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
65protected:
67 ~vtkImageItem() override;
68
69 float Position[2];
70
72
73private:
74 vtkImageItem(const vtkImageItem&) = delete;
75 void operator=(const vtkImageItem&) = delete;
76};
77
78VTK_ABI_NAMESPACE_END
79#endif // vtkImageItem_h
Class for drawing 2D primitives to a graphical context.
base class for items that are part of a vtkContextScene.
topologically and geometrically regular array of data
a vtkContextItem that draws a supplied image in the scene.
static vtkImageItem * New()
bool Paint(vtkContext2D *painter) override
Paint event for the item.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageData * Image
~vtkImageItem() override
void SetImage(vtkImageData *image)
Set the image of the item.
a simple class to control print indentation
Definition vtkIndent.h:29