VTK  9.2.6
vtkImageItem.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageItem.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15
27
28#ifndef vtkImageItem_h
29#define vtkImageItem_h
30
31#include "vtkContextItem.h"
32#include "vtkRenderingContext2DModule.h" // For export macro
33#include "vtkSmartPointer.h" // For SP ivars.
34
35class vtkImageData;
36
37class VTKRENDERINGCONTEXT2D_EXPORT vtkImageItem : public vtkContextItem
38{
39public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
43 static vtkImageItem* New();
44
48 bool Paint(vtkContext2D* painter) override;
49
53 void SetImage(vtkImageData* image);
54
56
59 vtkGetObjectMacro(Image, vtkImageData);
61
63
66 vtkSetVector2Macro(Position, float);
68
70
73 vtkGetVector2Macro(Position, float);
75
76protected:
78 ~vtkImageItem() override;
79
80 float Position[2];
81
83
84private:
85 vtkImageItem(const vtkImageItem&) = delete;
86 void operator=(const vtkImageItem&) = delete;
87};
88
89#endif // vtkImageItem_h
Class for drawing 2D primitives to a graphical context.
vtkContextItem()=default
topologically and geometrically regular array of data
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
float Position[2]
~vtkImageItem() override
void SetImage(vtkImageData *image)
Set the image of the item.
a simple class to control print indentation
Definition vtkIndent.h:40