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:
44  static vtkImageSliceMapper *New();
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 
98  virtual void ReleaseGraphicsResources(vtkWindow *);
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 
133  void SetPoints(vtkPoints *points);
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 
166  int GetOrientationFromCamera(vtkMatrix4x4 *propMatrix, vtkCamera *camera);
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
virtual unsigned long GetMTime()
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:38
Store vtkAlgorithm input/output information.
record modification and/or execution time
Definition: vtkTimeStamp.h:34
void SetDisplayExtent(int extent[6])
abstract specification for renderers
Definition: vtkRenderer.h:62
void GetBounds(double bounds[6])
virtual void ReleaseGraphicsResources(vtkWindow *)=0
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract class for mapping images to the screen
map a slice of a vtkImageData to the screen
a virtual camera for 3D rendering
Definition: vtkCamera.h:49
virtual void Render(vtkRenderer *renderer, vtkImageSlice *prop)=0
virtual double * GetBounds()=0
virtual void Update()
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
represents an image in a 3D scene
Definition: vtkImageSlice.h:51
#define VTKRENDERINGCORE_EXPORT
Store zero or more vtkInformation instances.
map a slice of a vtkImageData to the screen
static vtkAlgorithm * New()
virtual void GetSlicePlaneInDataCoords(vtkMatrix4x4 *propMatrix, double plane[4])
void PrintSelf(ostream &os, vtkIndent indent)
represent and manipulate 3D points
Definition: vtkPoints.h:38