VTK  9.1.0
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
25#ifndef vtkImageItem_h
26#define vtkImageItem_h
27
28#include "vtkContextItem.h"
29#include "vtkRenderingContext2DModule.h" // For export macro
30#include "vtkSmartPointer.h" // For SP ivars.
31
32class vtkImageData;
33
34class VTKRENDERINGCONTEXT2D_EXPORT vtkImageItem : public vtkContextItem
35{
36public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
40 static vtkImageItem* New();
41
45 bool Paint(vtkContext2D* painter) override;
46
50 void SetImage(vtkImageData* image);
51
53
56 vtkGetObjectMacro(Image, vtkImageData);
58
60
63 vtkSetVector2Macro(Position, float);
65
67
70 vtkGetVector2Macro(Position, float);
72
73protected:
75 ~vtkImageItem() override;
76
77 float Position[2];
78
80
81private:
82 vtkImageItem(const vtkImageItem&) = delete;
83 void operator=(const vtkImageItem&) = delete;
84};
85
86#endif // vtkImageItem_h
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:73
base class for items that are part of a vtkContextScene.
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
a vtkContextItem that draws a supplied image in the scene.
Definition: vtkImageItem.h:35
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
Definition: vtkImageItem.h:79
~vtkImageItem() override
void SetImage(vtkImageData *image)
Set the image of the item.
a simple class to control print indentation
Definition: vtkIndent.h:113