VTK
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 
28 #ifndef vtkImageItem_h
29 #define vtkImageItem_h
30 
31 #include "vtkRenderingContext2DModule.h" // For export macro
32 #include "vtkContextItem.h"
33 #include "vtkSmartPointer.h" // For SP ivars.
34 
35 class vtkImageData;
36 
37 class VTKRENDERINGCONTEXT2D_EXPORT vtkImageItem : public vtkContextItem
38 {
39 public:
40  vtkTypeMacro(vtkImageItem, vtkContextItem);
41  virtual void PrintSelf(ostream &os, vtkIndent indent);
42 
43  static vtkImageItem *New();
44 
48  virtual bool Paint(vtkContext2D *painter);
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 
76 protected:
77  vtkImageItem();
78  ~vtkImageItem();
79 
80  float Position[2];
81 
83 
84 private:
85  vtkImageItem(const vtkImageItem &) VTK_DELETE_FUNCTION;
86  void operator=(const vtkImageItem &) VTK_DELETE_FUNCTION;
87 
88 };
89 
90 #endif //vtkImageItem_h
a vtkContextItem that draws a supplied image in the scene.
Definition: vtkImageItem.h:37
base class for items that are part of a vtkContextScene.
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:57
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkImageData * Image
Definition: vtkImageItem.h:82