VTK  9.3.0
vtkImageMapper.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
21 #ifndef vtkImageMapper_h
22 #define vtkImageMapper_h
23 
24 #include "vtkMapper2D.h"
25 #include "vtkRenderingCoreModule.h" // For export macro
26 
27 VTK_ABI_NAMESPACE_BEGIN
28 class vtkWindow;
29 class vtkViewport;
30 class vtkActor2D;
31 class vtkImageData;
32 
33 class VTKRENDERINGCORE_EXPORT vtkImageMapper : public vtkMapper2D
34 {
35 public:
36  vtkTypeMacro(vtkImageMapper, vtkMapper2D);
37  static vtkImageMapper* New();
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
43  vtkMTimeType GetMTime() override;
44 
46 
49  vtkSetMacro(ColorWindow, double);
50  vtkGetMacro(ColorWindow, double);
52 
54 
57  vtkSetMacro(ColorLevel, double);
58  vtkGetMacro(ColorLevel, double);
60 
62 
71  vtkSetMacro(ZSlice, int);
72  vtkGetMacro(ZSlice, int);
73  int GetWholeZMin();
74  int GetWholeZMax();
76 
80  void RenderStart(vtkViewport* viewport, vtkActor2D* actor);
81 
86 
88 
91  double GetColorShift();
92  double GetColorScale();
94 
95  // Public for templated functions. * * Should remove this * *
96  int DisplayExtent[6];
97 
99 
102  virtual void SetInputData(vtkImageData* input);
105 
107 
112  vtkSetMacro(RenderToRectangle, vtkTypeBool);
113  vtkGetMacro(RenderToRectangle, vtkTypeBool);
114  vtkBooleanMacro(RenderToRectangle, vtkTypeBool);
116 
118 
125  vtkSetMacro(UseCustomExtents, vtkTypeBool);
126  vtkGetMacro(UseCustomExtents, vtkTypeBool);
127  vtkBooleanMacro(UseCustomExtents, vtkTypeBool);
129 
131 
136  vtkSetVectorMacro(CustomDisplayExtents, int, 4);
137  vtkGetVectorMacro(CustomDisplayExtents, int, 4);
139 
140 protected:
142  ~vtkImageMapper() override;
143 
144  double ColorWindow;
145  double ColorLevel;
146 
147  int PositionAdjustment[2];
148  int ZSlice;
150  int CustomDisplayExtents[4];
152 
154 
155 private:
156  vtkImageMapper(const vtkImageMapper&) = delete;
157  void operator=(const vtkImageMapper&) = delete;
158 };
159 
160 VTK_ABI_NAMESPACE_END
161 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:35
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
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:29
Store vtkAlgorithm input/output information.
abstract class specifies interface for objects which render 2D actors
Definition: vtkMapper2D.h:25
abstract specification for Viewports
Definition: vtkViewport.h:45
window superclass for vtkRenderWindow
Definition: vtkWindow.h:28
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270