VTK  9.3.20240419
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
70 #ifndef vtkImageMapper_h
71 #define vtkImageMapper_h
72 
73 #include "vtkMapper2D.h"
74 #include "vtkRenderingCoreModule.h" // For export macro
75 
76 VTK_ABI_NAMESPACE_BEGIN
77 class vtkWindow;
78 class vtkViewport;
79 class vtkActor2D;
80 class vtkImageData;
81 
82 class VTKRENDERINGCORE_EXPORT vtkImageMapper : public vtkMapper2D
83 {
84 public:
85  vtkTypeMacro(vtkImageMapper, vtkMapper2D);
86  static vtkImageMapper* New();
87  void PrintSelf(ostream& os, vtkIndent indent) override;
88 
92  vtkMTimeType GetMTime() override;
93 
95 
98  vtkSetMacro(ColorWindow, double);
99  vtkGetMacro(ColorWindow, double);
101 
103 
106  vtkSetMacro(ColorLevel, double);
107  vtkGetMacro(ColorLevel, double);
109 
111 
120  vtkSetMacro(ZSlice, int);
121  vtkGetMacro(ZSlice, int);
125 
129  void RenderStart(vtkViewport* viewport, vtkActor2D* actor);
130 
135 
137 
140  double GetColorShift();
141  double GetColorScale();
143 
144  // Public for templated functions. * * Should remove this * *
145  int DisplayExtent[6];
146 
148 
151  virtual void SetInputData(vtkImageData* input);
154 
156 
161  vtkSetMacro(RenderToRectangle, vtkTypeBool);
162  vtkGetMacro(RenderToRectangle, vtkTypeBool);
163  vtkBooleanMacro(RenderToRectangle, vtkTypeBool);
165 
167 
174  vtkSetMacro(UseCustomExtents, vtkTypeBool);
175  vtkGetMacro(UseCustomExtents, vtkTypeBool);
176  vtkBooleanMacro(UseCustomExtents, vtkTypeBool);
178 
180 
185  vtkSetVectorMacro(CustomDisplayExtents, int, 4);
186  vtkGetVectorMacro(CustomDisplayExtents, int, 4);
188 
189 protected:
191  ~vtkImageMapper() override;
192 
193  double ColorWindow;
194  double ColorLevel;
195 
196  int PositionAdjustment[2];
197  int ZSlice;
199  int CustomDisplayExtents[4];
201 
203 
204 private:
205  vtkImageMapper(const vtkImageMapper&) = delete;
206  void operator=(const vtkImageMapper&) = delete;
207 };
208 
209 VTK_ABI_NAMESPACE_END
210 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:145
topologically and geometrically regular array of data
Definition: vtkImageData.h:156
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:108
Store vtkAlgorithm input/output information.
abstract class specifies interface for objects which render 2D actors
Definition: vtkMapper2D.h:26
abstract specification for Viewports
Definition: vtkViewport.h:65
window superclass for vtkRenderWindow
Definition: vtkWindow.h:48
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270