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
30 #ifndef vtkImageMapper_h
31 #define vtkImageMapper_h
32 
33 #include "vtkMapper2D.h"
34 #include "vtkRenderingCoreModule.h" // For export macro
35 
36 VTK_ABI_NAMESPACE_BEGIN
37 class vtkWindow;
38 class vtkViewport;
39 class vtkActor2D;
40 class vtkImageData;
41 
42 class VTKRENDERINGCORE_EXPORT vtkImageMapper : public vtkMapper2D
43 {
44 public:
45  vtkTypeMacro(vtkImageMapper, vtkMapper2D);
46  static vtkImageMapper* New();
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
52  vtkMTimeType GetMTime() override;
53 
55 
58  vtkSetMacro(ColorWindow, double);
59  vtkGetMacro(ColorWindow, double);
61 
63 
66  vtkSetMacro(ColorLevel, double);
67  vtkGetMacro(ColorLevel, double);
69 
71 
80  vtkSetMacro(ZSlice, int);
81  vtkGetMacro(ZSlice, int);
82  int GetWholeZMin();
83  int GetWholeZMax();
85 
89  void RenderStart(vtkViewport* viewport, vtkActor2D* actor);
90 
95 
97 
100  double GetColorShift();
101  double GetColorScale();
103 
104  // Public for templated functions. * * Should remove this * *
105  int DisplayExtent[6];
106 
108 
111  virtual void SetInputData(vtkImageData* input);
114 
116 
121  vtkSetMacro(RenderToRectangle, vtkTypeBool);
122  vtkGetMacro(RenderToRectangle, vtkTypeBool);
123  vtkBooleanMacro(RenderToRectangle, vtkTypeBool);
125 
127 
134  vtkSetMacro(UseCustomExtents, vtkTypeBool);
135  vtkGetMacro(UseCustomExtents, vtkTypeBool);
136  vtkBooleanMacro(UseCustomExtents, vtkTypeBool);
138 
140 
145  vtkSetVectorMacro(CustomDisplayExtents, int, 4);
146  vtkGetVectorMacro(CustomDisplayExtents, int, 4);
148 
149 protected:
151  ~vtkImageMapper() override;
152 
153  double ColorWindow;
154  double ColorLevel;
155 
156  int PositionAdjustment[2];
157  int ZSlice;
159  int CustomDisplayExtents[4];
161 
163 
164 private:
165  vtkImageMapper(const vtkImageMapper&) = delete;
166  void operator=(const vtkImageMapper&) = delete;
167 };
168 
169 VTK_ABI_NAMESPACE_END
170 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:44
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
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:38
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:54
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270