VTK  9.4.20250413
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
76
77VTK_ABI_NAMESPACE_BEGIN
78class vtkWindow;
79class vtkViewport;
80class vtkActor2D;
81class vtkImageData;
82
83class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkImageMapper : public vtkMapper2D
84{
85public:
88 void PrintSelf(ostream& os, vtkIndent indent) override;
89
94
96
99 vtkSetMacro(ColorWindow, double);
100 vtkGetMacro(ColorWindow, double);
102
104
107 vtkSetMacro(ColorLevel, double);
108 vtkGetMacro(ColorLevel, double);
110
112
121 vtkSetMacro(ZSlice, int);
122 vtkGetMacro(ZSlice, int);
126
130 void RenderStart(vtkViewport* viewport, vtkActor2D* actor);
131
136
138
144
145 // Public for templated functions. * * Should remove this * *
146 int DisplayExtent[6];
147
149
152 virtual void SetInputData(vtkImageData* input);
155
157
162 vtkSetMacro(RenderToRectangle, vtkTypeBool);
163 vtkGetMacro(RenderToRectangle, vtkTypeBool);
164 vtkBooleanMacro(RenderToRectangle, vtkTypeBool);
166
168
175 vtkSetMacro(UseCustomExtents, vtkTypeBool);
176 vtkGetMacro(UseCustomExtents, vtkTypeBool);
177 vtkBooleanMacro(UseCustomExtents, vtkTypeBool);
179
181
186 vtkSetVectorMacro(CustomDisplayExtents, int, 4);
187 vtkGetVectorMacro(CustomDisplayExtents, int, 4);
189
190protected:
192 ~vtkImageMapper() override;
193
196
197 int PositionAdjustment[2];
200 int CustomDisplayExtents[4];
202
204
205private:
206 vtkImageMapper(const vtkImageMapper&) = delete;
207 void operator=(const vtkImageMapper&) = delete;
208};
209
210VTK_ABI_NAMESPACE_END
211#endif
a actor that draws 2D data
Definition vtkActor2D.h:145
topologically and geometrically regular array of data
2D image display
double GetColorShift()
Methods used internally for performing the Window/Level mapping.
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
int GetWholeZMax()
Set/Get the current slice number.
vtkImageData * GetInput()
Set the Input of a filter.
virtual void SetInputData(vtkImageData *input)
Set the Input of a filter.
static vtkImageMapper * New()
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:66
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_MARSHALAUTO