VTK  9.3.1
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);
103  vtkImageData* GetInput();
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:
141  vtkImageMapper();
142  ~vtkImageMapper() override;
143 
144  double ColorWindow;
145  double ColorLevel;
146 
147  int PositionAdjustment[2];
148  int ZSlice;
150  int CustomDisplayExtents[4];
152 
153  int FillInputPortInformation(int, vtkInformation*) override;
154 
155 private:
156  vtkImageMapper(const vtkImageMapper&) = delete;
157  void operator=(const vtkImageMapper&) = delete;
158 };
159 
160 VTK_ABI_NAMESPACE_END
161 #endif
vtkTypeBool RenderToRectangle
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkMTimeType GetMTime() override
Override Modifiedtime as we have added Clipping planes.
vtkTypeBool UseCustomExtents
a actor that draws 2D data
Definition: vtkActor2D.h:34
int vtkTypeBool
Definition: vtkABI.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
virtual void RenderData(vtkViewport *, vtkImageData *, vtkActor2D *)
Function called by Render to actually draw the image to to the screen.
2D image display
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract class specifies interface for objects which render 2D actors
Definition: vtkMapper2D.h:24