VTK  9.4.20250102
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
23
24VTK_ABI_NAMESPACE_BEGIN
25class vtkImageData;
26
27class VTKRENDERINGCONTEXT2D_EXPORT VTK_MARSHALAUTO vtkImageItem : public vtkContextItem
28{
29public:
31 void PrintSelf(ostream& os, vtkIndent indent) override;
32
33 static vtkImageItem* New();
34
38 bool Paint(vtkContext2D* painter) override;
39
43 void SetImage(vtkImageData* image);
44
46
49 vtkGetObjectMacro(Image, vtkImageData);
51
53
56 vtkSetVector2Macro(Position, float);
58
60
63 vtkGetVector2Macro(Position, float);
65
66protected:
68 ~vtkImageItem() override;
69
70 float Position[2];
71
73
74private:
75 vtkImageItem(const vtkImageItem&) = delete;
76 void operator=(const vtkImageItem&) = delete;
77};
78
79VTK_ABI_NAMESPACE_END
80#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:108
#define VTK_MARSHALAUTO