VTK
vtkImageResliceMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageResliceMapper.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 =========================================================================*/
34 #ifndef vtkImageResliceMapper_h
35 #define vtkImageResliceMapper_h
36 
37 #include "vtkRenderingImageModule.h" // For export macro
38 #include "vtkImageMapper3D.h"
39 
41 class vtkRenderer;
42 class vtkRenderWindow;
43 class vtkCamera;
44 class vtkLookupTable;
45 class vtkImageSlice;
46 class vtkImageData;
48 class vtkMatrix4x4;
50 
52 {
53 public:
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
62  virtual void SetSlicePlane(vtkPlane *plane);
63 
65 
69  vtkSetMacro(JumpToNearestSlice, int);
70  vtkBooleanMacro(JumpToNearestSlice, int);
71  vtkGetMacro(JumpToNearestSlice, int);
73 
75 
76  vtkSetMacro(SlabThickness, double);
77  vtkGetMacro(SlabThickness, double);
79 
81 
89  vtkGetMacro(SlabType, int);
91  this->SetSlabType(VTK_IMAGE_SLAB_MIN); };
93  this->SetSlabType(VTK_IMAGE_SLAB_MAX); };
95  this->SetSlabType(VTK_IMAGE_SLAB_MEAN); };
97  this->SetSlabType(VTK_IMAGE_SLAB_SUM); };
98  virtual const char *GetSlabTypeAsString();
100 
102 
105  vtkSetClampMacro(SlabSampleFactor, int, 1, 2);
106  vtkGetMacro(SlabSampleFactor, int);
108 
110 
114  vtkSetClampMacro(ImageSampleFactor, int, 1, 16);
115  vtkGetMacro(ImageSampleFactor, int);
117 
119 
121  vtkSetMacro(AutoAdjustImageQuality, int);
122  vtkBooleanMacro(AutoAdjustImageQuality, int);
123  vtkGetMacro(AutoAdjustImageQuality, int);
125 
127 
130  vtkSetMacro(ResampleToScreenPixels, int);
131  vtkBooleanMacro(ResampleToScreenPixels, int);
132  vtkGetMacro(ResampleToScreenPixels, int);
134 
136 
140  vtkSetMacro(SeparateWindowLevelOperation, int);
141  vtkBooleanMacro(SeparateWindowLevelOperation, int);
142  vtkGetMacro(SeparateWindowLevelOperation, int);
144 
146 
151 
153  virtual void Render(vtkRenderer *renderer, vtkImageSlice *prop);
154 
159 
161  unsigned long GetMTime();
162 
164 
166  double *GetBounds();
167  void GetBounds(double bounds[6])
168  { this->vtkAbstractMapper3D::GetBounds(bounds); };
170 
172 
174  vtkInformationVector** inInfo,
175  vtkInformationVector* outInfo);
177 
178 protected:
181 
183 
185  vtkImageData *input, vtkCamera *camera, vtkImageProperty *property);
187 
190 
194 
197 
201 
204 
207 
210 
212 
213  void Update();
214  void Update(int port);
216 
219 
220  vtkImageSliceMapper *SliceMapper; // Does the OpenGL rendering
221 
222  int JumpToNearestSlice; // Adjust SliceAtFocalPoint
223  int AutoAdjustImageQuality; // LOD-style behavior
224  int SeparateWindowLevelOperation; // Do window/level as a separate step
225  double SlabThickness; // Current slab thickness
226  int SlabType; // Current slab mode
227  int SlabSampleFactor; // Sampling factor for slab mode
228  int ImageSampleFactor; // Sampling factor for image pixels
229  int ResampleToScreenPixels; // Use software interpolation only
230  int InternalResampleToScreenPixels; // Use software interpolation only
231  int ResliceNeedUpdate; // Execute reslice on next render
232  vtkImageResliceToColors *ImageReslice; // For software interpolation
233  vtkMatrix4x4 *ResliceMatrix; // Cached reslice matrix
234  vtkMatrix4x4 *WorldToDataMatrix; // World to Data transform matrix
235  vtkMatrix4x4 *SliceToWorldMatrix; // Slice to World transform matrix
237 
238 private:
239  vtkImageResliceMapper(const vtkImageResliceMapper&); // Not implemented.
240  void operator=(const vtkImageResliceMapper&); // Not implemented.
241 };
242 
243 #endif
vtkImageResliceMapper::UpdateColorInformation
void UpdateColorInformation(vtkImageProperty *property)
vtkImageResliceMapper::New
static vtkImageResliceMapper * New()
vtkImageResliceMapper::ProcessRequest
int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkPlane
perform various plane computations
Definition: vtkPlane.h:37
vtkImageResliceMapper::Update
void Update()
vtkImageResliceMapper::SetSlabTypeToMax
void SetSlabTypeToMax()
Definition: vtkImageResliceMapper.h:92
vtkImageResliceMapper::InternalResampleToScreenPixels
int InternalResampleToScreenPixels
Definition: vtkImageResliceMapper.h:230
vtkAbstractMapper3D::GetBounds
virtual double * GetBounds()=0
vtkImageResliceMapper::SlabThickness
double SlabThickness
Definition: vtkImageResliceMapper.h:225
vtkImageResliceMapper::SliceToWorldMatrix
vtkMatrix4x4 * SliceToWorldMatrix
Definition: vtkImageResliceMapper.h:235
VTK_IMAGE_SLAB_MAX
#define VTK_IMAGE_SLAB_MAX
Definition: vtkSystemIncludes.h:109
vtkImageResliceMapper::UpdateResliceInformation
void UpdateResliceInformation(vtkRenderer *ren)
vtkImageResliceMapper::GetInterpolator
virtual vtkAbstractImageInterpolator * GetInterpolator()
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkImageResliceMapper::GetMTime
unsigned long GetMTime()
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkImageResliceMapper::ImageSampleFactor
int ImageSampleFactor
Definition: vtkImageResliceMapper.h:228
vtkImageResliceMapper::GetSlabTypeAsString
virtual const char * GetSlabTypeAsString()
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkImageResliceMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkImageResliceMapper::SlabType
int SlabType
Definition: vtkImageResliceMapper.h:226
vtkgl::sampler
GLuint sampler
Definition: vtkgl.h:13872
vtkgl::input
GLenum GLenum GLenum input
Definition: vtkgl.h:15941
vtkImageSliceMapper
map a slice of a vtkImageData to the screen
Definition: vtkImageSliceMapper.h:42
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkImageResliceMapper::Update
void Update(int port)
vtkImageResliceMapper::UpdateResliceInterpolation
void UpdateResliceInterpolation(vtkImageProperty *property)
vtkImageResliceMapper::UpdateSliceToWorldMatrix
void UpdateSliceToWorldMatrix(vtkCamera *camera)
vtkImageResliceMapper::SetSlabTypeToMin
void SetSlabTypeToMin()
Definition: vtkImageResliceMapper.h:90
VTK_IMAGE_SLAB_MEAN
#define VTK_IMAGE_SLAB_MEAN
Definition: vtkSystemIncludes.h:110
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkImageResliceMapper::JumpToNearestSlice
int JumpToNearestSlice
Definition: vtkImageResliceMapper.h:222
vtkImageSlice
represents an image in a 3D scene
Definition: vtkImageSlice.h:52
vtkImageProperty
image display properties
Definition: vtkImageProperty.h:42
vtkImageResliceMapper::ReportReferences
void ReportReferences(vtkGarbageCollector *)
vtkImageResliceMapper::Render
virtual void Render(vtkRenderer *renderer, vtkImageSlice *prop)
vtkImageResliceMapper::SlabSampleFactor
int SlabSampleFactor
Definition: vtkImageResliceMapper.h:227
vtkImageResliceMapper::SetSlabTypeToSum
void SetSlabTypeToSum()
Definition: vtkImageResliceMapper.h:96
VTK_IMAGE_SLAB_MIN
#define VTK_IMAGE_SLAB_MIN
Definition: vtkSystemIncludes.h:108
vtkImageResliceMapper::ResampleToScreenPixels
int ResampleToScreenPixels
Definition: vtkImageResliceMapper.h:229
vtkImageResliceMapper::SetInterpolator
virtual void SetInterpolator(vtkAbstractImageInterpolator *sampler)
vtkImageResliceMapper::UpdateResliceMatrix
void UpdateResliceMatrix(vtkRenderer *ren, vtkImageSlice *prop)
vtkImageResliceMapper::WorldToDataMatrix
vtkMatrix4x4 * WorldToDataMatrix
Definition: vtkImageResliceMapper.h:234
vtkImageResliceMapper::ResliceNeedUpdate
int ResliceNeedUpdate
Definition: vtkImageResliceMapper.h:231
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:39
vtkImageResliceMapper::UpdateWorldToDataMatrix
void UpdateWorldToDataMatrix(vtkImageSlice *prop)
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
vtkImageResliceMapper::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
vtkImageResliceMapper::CheckerboardImage
void CheckerboardImage(vtkImageData *input, vtkCamera *camera, vtkImageProperty *property)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkImageResliceMapper::SetSlicePlane
virtual void SetSlicePlane(vtkPlane *plane)
vtkImageResliceMapper::SliceMapper
vtkImageSliceMapper * SliceMapper
Definition: vtkImageResliceMapper.h:220
vtkGarbageCollector
Detect and break reference loops.
Definition: vtkGarbageCollector.h:99
vtkImageResliceMapper::GetBounds
void GetBounds(double bounds[6])
Definition: vtkImageResliceMapper.h:167
vtkImageResliceMapper::GetBounds
double * GetBounds()
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkLookupTable
map scalar values into colors via a lookup table
Definition: vtkLookupTable.h:74
vtkImageMapper3D
abstract class for mapping images to the screen
Definition: vtkImageMapper3D.h:50
vtkImageResliceMapper::UpdateTime
vtkTimeStamp UpdateTime
Definition: vtkImageResliceMapper.h:236
vtkImageResliceMapper::ResliceMatrix
vtkMatrix4x4 * ResliceMatrix
Definition: vtkImageResliceMapper.h:233
VTK_IMAGE_SLAB_SUM
#define VTK_IMAGE_SLAB_SUM
Definition: vtkSystemIncludes.h:111
vtkImageResliceToColors
Reslice and produce color scalars.
Definition: vtkImageResliceToColors.h:43
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkImageResliceMapper::vtkImageResliceMapper
vtkImageResliceMapper()
vtkImageMapper3D.h
vtkImageResliceMapper::AutoAdjustImageQuality
int AutoAdjustImageQuality
Definition: vtkImageResliceMapper.h:223
vtkImageResliceMapper::SeparateWindowLevelOperation
int SeparateWindowLevelOperation
Definition: vtkImageResliceMapper.h:224
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:89
VTKRENDERINGIMAGE_EXPORT
#define VTKRENDERINGIMAGE_EXPORT
Definition: vtkRenderingImageModule.h:15
vtkRenderingImageModule.h
vtkAbstractImageInterpolator
interpolate data values from images
Definition: vtkAbstractImageInterpolator.h:46
vtkImageResliceMapper::UpdatePolygonCoords
void UpdatePolygonCoords(vtkRenderer *ren)
vtkImageResliceMapper::~vtkImageResliceMapper
~vtkImageResliceMapper()
vtkImageResliceMapper::ImageReslice
vtkImageResliceToColors * ImageReslice
Definition: vtkImageResliceMapper.h:232
vtkImageResliceMapper::SetSlabTypeToMean
void SetSlabTypeToMean()
Definition: vtkImageResliceMapper.h:94