VTK  9.0.20200808
vtkImageMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageMapper.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef vtkImageMapper_h
31 #define vtkImageMapper_h
32 
33 #include "vtkMapper2D.h"
34 #include "vtkRenderingCoreModule.h" // For export macro
35 
36 class vtkWindow;
37 class vtkViewport;
38 class vtkActor2D;
39 class vtkImageData;
40 
41 class VTKRENDERINGCORE_EXPORT vtkImageMapper : public vtkMapper2D
42 {
43 public:
44  vtkTypeMacro(vtkImageMapper, vtkMapper2D);
45  static vtkImageMapper* New();
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
51  vtkMTimeType GetMTime() override;
52 
54 
57  vtkSetMacro(ColorWindow, double);
58  vtkGetMacro(ColorWindow, double);
60 
62 
65  vtkSetMacro(ColorLevel, double);
66  vtkGetMacro(ColorLevel, double);
68 
70 
79  vtkSetMacro(ZSlice, int);
80  vtkGetMacro(ZSlice, int);
81  int GetWholeZMin();
82  int GetWholeZMax();
84 
88  void RenderStart(vtkViewport* viewport, vtkActor2D* actor);
89 
94 
96 
99  double GetColorShift();
100  double GetColorScale();
102 
103  // Public for templated functions. * * Should remove this * *
104  int DisplayExtent[6];
105 
107 
110  virtual void SetInputData(vtkImageData* input);
111  vtkImageData* GetInput();
113 
115 
120  vtkSetMacro(RenderToRectangle, vtkTypeBool);
121  vtkGetMacro(RenderToRectangle, vtkTypeBool);
122  vtkBooleanMacro(RenderToRectangle, vtkTypeBool);
124 
126 
133  vtkSetMacro(UseCustomExtents, vtkTypeBool);
134  vtkGetMacro(UseCustomExtents, vtkTypeBool);
135  vtkBooleanMacro(UseCustomExtents, vtkTypeBool);
137 
139 
144  vtkSetVectorMacro(CustomDisplayExtents, int, 4);
145  vtkGetVectorMacro(CustomDisplayExtents, int, 4);
147 
148 protected:
149  vtkImageMapper();
150  ~vtkImageMapper() override;
151 
152  double ColorWindow;
153  double ColorLevel;
154 
155  int PositionAdjustment[2];
156  int ZSlice;
158  int CustomDisplayExtents[4];
160 
161  int FillInputPortInformation(int, vtkInformation*) override;
162 
163 private:
164  vtkImageMapper(const vtkImageMapper&) = delete;
165  void operator=(const vtkImageMapper&) = delete;
166 };
167 
168 #endif
vtkImageMapper::RenderToRectangle
vtkTypeBool RenderToRectangle
Definition: vtkImageMapper.h:159
vtkMapper2D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkAbstractMapper::GetMTime
vtkMTimeType GetMTime() override
Override Modifiedtime as we have added Clipping planes.
vtkImageMapper
2D image display
Definition: vtkImageMapper.h:41
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkImageMapper::UseCustomExtents
vtkTypeBool UseCustomExtents
Definition: vtkImageMapper.h:157
vtkImageMapper::ColorLevel
double ColorLevel
Definition: vtkImageMapper.h:153
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkMapper2D.h
vtkMapper2D
abstract class specifies interface for objects which render 2D actors
Definition: vtkMapper2D.h:35
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:39
vtkImageMapper::RenderData
virtual void RenderData(vtkViewport *, vtkImageData *, vtkActor2D *)
Function called by Render to actually draw the image to to the screen.
Definition: vtkImageMapper.h:93
vtkImageMapper::ZSlice
int ZSlice
Definition: vtkImageMapper.h:156
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:285
vtkImageMapper::ColorWindow
double ColorWindow
Definition: vtkImageMapper.h:152