VTK  9.2.6
vtkImageMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageMapper.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 =========================================================================*/
42 #ifndef vtkImageMapper_h
43 #define vtkImageMapper_h
44 
45 #include "vtkMapper2D.h"
46 #include "vtkRenderingCoreModule.h" // For export macro
47 
48 class vtkWindow;
49 class vtkViewport;
50 class vtkActor2D;
51 class vtkImageData;
52 
53 class VTKRENDERINGCORE_EXPORT vtkImageMapper : public vtkMapper2D
54 {
55 public:
56  vtkTypeMacro(vtkImageMapper, vtkMapper2D);
57  static vtkImageMapper* New();
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
63  vtkMTimeType GetMTime() override;
64 
66 
69  vtkSetMacro(ColorWindow, double);
70  vtkGetMacro(ColorWindow, double);
72 
74 
77  vtkSetMacro(ColorLevel, double);
78  vtkGetMacro(ColorLevel, double);
80 
82 
91  vtkSetMacro(ZSlice, int);
92  vtkGetMacro(ZSlice, int);
93  int GetWholeZMin();
94  int GetWholeZMax();
96 
100  void RenderStart(vtkViewport* viewport, vtkActor2D* actor);
101 
106 
108 
111  double GetColorShift();
112  double GetColorScale();
114 
115  // Public for templated functions. * * Should remove this * *
116  int DisplayExtent[6];
117 
119 
122  virtual void SetInputData(vtkImageData* input);
125 
127 
132  vtkSetMacro(RenderToRectangle, vtkTypeBool);
133  vtkGetMacro(RenderToRectangle, vtkTypeBool);
134  vtkBooleanMacro(RenderToRectangle, vtkTypeBool);
136 
138 
145  vtkSetMacro(UseCustomExtents, vtkTypeBool);
146  vtkGetMacro(UseCustomExtents, vtkTypeBool);
147  vtkBooleanMacro(UseCustomExtents, vtkTypeBool);
149 
151 
156  vtkSetVectorMacro(CustomDisplayExtents, int, 4);
157  vtkGetVectorMacro(CustomDisplayExtents, int, 4);
159 
160 protected:
162  ~vtkImageMapper() override;
163 
164  double ColorWindow;
165  double ColorLevel;
166 
167  int PositionAdjustment[2];
168  int ZSlice;
170  int CustomDisplayExtents[4];
172 
174 
175 private:
176  vtkImageMapper(const vtkImageMapper&) = delete;
177  void operator=(const vtkImageMapper&) = delete;
178 };
179 
180 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:55
topologically and geometrically regular array of data
Definition: vtkImageData.h:63
2D image display
double GetColorShift()
Methods used internally for performing the Window/Level mapping.
vtkImageData * GetInput()
Set the Input of a filter.
virtual void RenderData(vtkViewport *, vtkImageData *, vtkActor2D *)
Function called by Render to actually draw the image to to the screen.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double GetColorScale()
Methods used internally for performing the Window/Level mapping.
void RenderStart(vtkViewport *viewport, vtkActor2D *actor)
Draw the image to the screen.
vtkTypeBool RenderToRectangle
~vtkImageMapper() override
static vtkImageMapper * New()
int GetWholeZMax()
Set/Get the current slice number.
virtual void SetInputData(vtkImageData *input)
Set the Input of a filter.
vtkMTimeType GetMTime() override
Override Modifiedtime as we have added a lookuptable.
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkTypeBool UseCustomExtents
int GetWholeZMin()
Set/Get the current slice number.
a simple class to control print indentation
Definition: vtkIndent.h:49
Store vtkAlgorithm input/output information.
abstract class specifies interface for objects which render 2D actors
Definition: vtkMapper2D.h:36
abstract specification for Viewports
Definition: vtkViewport.h:65
window superclass for vtkRenderWindow
Definition: vtkWindow.h:48
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287