VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkWindow;
30 class vtkViewport;
31 class vtkActor2D;
32 class vtkImageData;
33 
34 class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkImageMapper : public vtkMapper2D
35 {
36 public:
37  vtkTypeMacro(vtkImageMapper, vtkMapper2D);
38  static vtkImageMapper* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
44  vtkMTimeType GetMTime() override;
45 
47 
50  vtkSetMacro(ColorWindow, double);
51  vtkGetMacro(ColorWindow, double);
53 
55 
58  vtkSetMacro(ColorLevel, double);
59  vtkGetMacro(ColorLevel, double);
61 
63 
72  vtkSetMacro(ZSlice, int);
73  vtkGetMacro(ZSlice, int);
74  int GetWholeZMin();
75  int GetWholeZMax();
77 
81  void RenderStart(vtkViewport* viewport, vtkActor2D* actor);
82 
87 
89 
92  double GetColorShift();
93  double GetColorScale();
95 
96  // Public for templated functions. * * Should remove this * *
97  int DisplayExtent[6];
98 
100 
103  virtual void SetInputData(vtkImageData* input);
104  vtkImageData* GetInput();
106 
108 
113  vtkSetMacro(RenderToRectangle, vtkTypeBool);
114  vtkGetMacro(RenderToRectangle, vtkTypeBool);
115  vtkBooleanMacro(RenderToRectangle, vtkTypeBool);
117 
119 
126  vtkSetMacro(UseCustomExtents, vtkTypeBool);
127  vtkGetMacro(UseCustomExtents, vtkTypeBool);
128  vtkBooleanMacro(UseCustomExtents, vtkTypeBool);
130 
132 
137  vtkSetVectorMacro(CustomDisplayExtents, int, 4);
138  vtkGetVectorMacro(CustomDisplayExtents, int, 4);
140 
141 protected:
142  vtkImageMapper();
143  ~vtkImageMapper() override;
144 
145  double ColorWindow;
146  double ColorLevel;
147 
148  int PositionAdjustment[2];
149  int ZSlice;
151  int CustomDisplayExtents[4];
153 
154  int FillInputPortInformation(int, vtkInformation*) override;
155 
156 private:
157  vtkImageMapper(const vtkImageMapper&) = delete;
158  void operator=(const vtkImageMapper&) = delete;
159 };
160 
161 VTK_ABI_NAMESPACE_END
162 #endif
vtkTypeBool RenderToRectangle
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
abstract specification for Viewports
Definition: vtkViewport.h:46
vtkMTimeType GetMTime() override
Override Modifiedtime as we have added Clipping planes.
vtkTypeBool UseCustomExtents
a actor that draws 2D data
Definition: vtkActor2D.h:35
int vtkTypeBool
Definition: vtkABI.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
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()
#define VTK_MARSHALAUTO
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:25