VTK
vtkImageSliceMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageSliceMapper.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 =========================================================================*/
32 #ifndef vtkImageSliceMapper_h
33 #define vtkImageSliceMapper_h
34 
35 #include "vtkRenderingCoreModule.h" // For export macro
36 #include "vtkImageMapper3D.h"
37 
38 class vtkCamera;
39 class vtkPoints;
40 
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49 
50  virtual void SetSliceNumber(int slice);
51  virtual int GetSliceNumber();
53 
55 
58  virtual int GetSliceNumberMinValue();
59  virtual int GetSliceNumberMaxValue();
61 
63 
65  vtkSetClampMacro(Orientation, int, 0, 2);
66  vtkGetMacro(Orientation, int);
67  void SetOrientationToX() { this->SetOrientation(0); }
68  void SetOrientationToY() { this->SetOrientation(1); }
69  void SetOrientationToZ() { this->SetOrientation(2); }
71 
73 
75  vtkSetMacro(Cropping, int);
76  vtkBooleanMacro(Cropping, int);
77  vtkGetMacro(Cropping, int);
79 
81 
82  vtkSetVector6Macro(CroppingRegion, int);
83  vtkGetVector6Macro(CroppingRegion, int);
85 
87 
88  virtual void Update();
89  virtual void Update(int port);
91 
93  virtual void Render(vtkRenderer *renderer, vtkImageSlice *prop);
94 
99 
101  unsigned long GetMTime();
102 
104 
106  double *GetBounds();
107  void GetBounds(double bounds[6]) {
108  this->vtkAbstractMapper3D::GetBounds(bounds); };
110 
112 
115  virtual void GetSlicePlaneInDataCoords(vtkMatrix4x4 *propMatrix,
116  double plane[4]);
118 
120 
121  virtual int ProcessRequest(vtkInformation* request,
122  vtkInformationVector** inInfo,
123  vtkInformationVector* outInfo);
125 
126 protected:
129 
131 
134  vtkPoints *GetPoints() { return this->Points; }
136 
138 
140  void SetExactPixelMatch(int v) {
141  this->ExactPixelMatch = (v != 0); }
143 
145 
147  void SetPassColorData(int v) {
148  this->PassColorData = (v != 0); }
150 
152 
154  void SetDisplayExtent(int extent[6]) {
155  this->DisplayExtent[0] = extent[0];
156  this->DisplayExtent[1] = extent[1];
157  this->DisplayExtent[2] = extent[2];
158  this->DisplayExtent[3] = extent[3];
159  this->DisplayExtent[4] = extent[4];
160  this->DisplayExtent[5] = extent[5]; }
162 
167 
169  int GetSliceFromCamera(vtkMatrix4x4 *propMatrix, vtkCamera *camera);
170 
172  static void GetDimensionIndices(int orientation, int &xdim, int &ydim);
173 
178  int Cropping;
179  int CroppingRegion[6];
180  int DisplayExtent[6];
185 
186 private:
187  vtkImageSliceMapper(const vtkImageSliceMapper&); // Not implemented.
188  void operator=(const vtkImageSliceMapper&); // Not implemented.
189 
190  friend class vtkImageResliceMapper;
191 };
192 
193 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkGetVector6Macro
#define vtkGetVector6Macro(name, type)
Definition: vtkSetGet.h:380
vtkImageSliceMapper::UpdateTime
vtkTimeStamp UpdateTime
Definition: vtkImageSliceMapper.h:184
vtkImageSliceMapper::SetOrientationToY
void SetOrientationToY()
Definition: vtkImageSliceMapper.h:68
vtkImageSliceMapper::ProcessRequest
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkAbstractMapper3D::GetBounds
virtual double * GetBounds()=0
vtkImageSliceMapper::ExactPixelMatch
int ExactPixelMatch
Definition: vtkImageSliceMapper.h:181
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkImageSliceMapper::SetPoints
void SetPoints(vtkPoints *points)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkgl::v
const GLdouble * v
Definition: vtkgl.h:11595
vtkImageSliceMapper::SetOrientationToZ
void SetOrientationToZ()
Definition: vtkImageSliceMapper.h:69
vtkgl::points
GLsizei const GLfloat * points
Definition: vtkgl.h:14786
vtkImageSliceMapper
map a slice of a vtkImageData to the screen
Definition: vtkImageSliceMapper.h:42
vtkImageSliceMapper::Render
virtual void Render(vtkRenderer *renderer, vtkImageSlice *prop)
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkImageSlice
represents an image in a 3D scene
Definition: vtkImageSlice.h:52
vtkImageSliceMapper::SetExactPixelMatch
void SetExactPixelMatch(int v)
Definition: vtkImageSliceMapper.h:140
vtkImageSliceMapper::GetOrientationFromCamera
int GetOrientationFromCamera(vtkMatrix4x4 *propMatrix, vtkCamera *camera)
vtkImageSliceMapper::SliceNumberMaxValue
int SliceNumberMaxValue
Definition: vtkImageSliceMapper.h:176
vtkImageSliceMapper::~vtkImageSliceMapper
~vtkImageSliceMapper()
vtkImageSliceMapper::SetSliceNumber
virtual void SetSliceNumber(int slice)
vtkImageSliceMapper::GetSlicePlaneInDataCoords
virtual void GetSlicePlaneInDataCoords(vtkMatrix4x4 *propMatrix, double plane[4])
vtkImageSliceMapper::GetBounds
double * GetBounds()
vtkImageSliceMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:39
vtkRenderingCoreModule.h
vtkImageResliceMapper
map a slice of a vtkImageData to the screen
Definition: vtkImageResliceMapper.h:52
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:49
vtkImageSliceMapper::GetMTime
unsigned long GetMTime()
vtkImageSliceMapper::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkImageSliceMapper::Cropping
int Cropping
Definition: vtkImageSliceMapper.h:178
vtkImageSliceMapper::vtkImageSliceMapper
vtkImageSliceMapper()
vtkImageSliceMapper::SliceNumberMinValue
int SliceNumberMinValue
Definition: vtkImageSliceMapper.h:175
vtkImageSliceMapper::SetDisplayExtent
void SetDisplayExtent(int extent[6])
Definition: vtkImageSliceMapper.h:154
vtkImageSliceMapper::Points
vtkPoints * Points
Definition: vtkImageSliceMapper.h:183
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkImageSliceMapper::Update
virtual void Update(int port)
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkImageMapper3D
abstract class for mapping images to the screen
Definition: vtkImageMapper3D.h:50
vtkImageSliceMapper::Update
virtual void Update()
vtkImageSliceMapper::GetBounds
void GetBounds(double bounds[6])
Definition: vtkImageSliceMapper.h:107
vtkX3D::orientation
@ orientation
Definition: vtkX3D.h:262
vtkImageSliceMapper::GetSliceNumber
virtual int GetSliceNumber()
vtkImageSliceMapper::SetOrientationToX
void SetOrientationToX()
Definition: vtkImageSliceMapper.h:67
vtkImageSliceMapper::GetDimensionIndices
static void GetDimensionIndices(int orientation, int &xdim, int &ydim)
vtkImageSliceMapper::New
static vtkImageSliceMapper * New()
vtkImageSliceMapper::Orientation
int Orientation
Definition: vtkImageSliceMapper.h:177
vtkImageSliceMapper::GetSliceNumberMaxValue
virtual int GetSliceNumberMaxValue()
vtkImageSliceMapper::GetSliceNumberMinValue
virtual int GetSliceNumberMinValue()
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkImageMapper3D.h
vtkSetVector6Macro
#define vtkSetVector6Macro(name, type)
Definition: vtkSetGet.h:360
vtkImageSliceMapper::SetPassColorData
void SetPassColorData(int v)
Definition: vtkImageSliceMapper.h:147
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
vtkImageSliceMapper::GetSliceFromCamera
int GetSliceFromCamera(vtkMatrix4x4 *propMatrix, vtkCamera *camera)
VTKRENDERINGCORE_EXPORT
#define VTKRENDERINGCORE_EXPORT
Definition: vtkRenderingCoreModule.h:15
vtkImageSliceMapper::PassColorData
int PassColorData
Definition: vtkImageSliceMapper.h:182
vtkImageSliceMapper::GetPoints
vtkPoints * GetPoints()
Definition: vtkImageSliceMapper.h:134
vtkImageSliceMapper::SliceNumber
int SliceNumber
Definition: vtkImageSliceMapper.h:174