VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Rendering
vtkMesaImageSliceMapper.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkMesaImageSliceMapper.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
=========================================================================*/
25
#ifndef __vtkMesaImageSliceMapper_h
26
#define __vtkMesaImageSliceMapper_h
27
28
#include "
vtkImageSliceMapper.h
"
29
30
class
vtkWindow
;
31
class
vtkRenderer
;
32
class
vtkRenderWindow
;
33
class
vtkMesaRenderWindow
;
34
class
vtkImageSlice
;
35
class
vtkImageProperty
;
36
class
vtkImageData
;
37
38
class
VTK_RENDERING_EXPORT
vtkMesaImageSliceMapper
:
39
public
vtkImageSliceMapper
40
{
41
public
:
42
static
vtkMesaImageSliceMapper
*
New
();
43
vtkTypeMacro(
vtkMesaImageSliceMapper
,
vtkImageSliceMapper
);
44
virtual
void
PrintSelf
(ostream& os,
vtkIndent
indent);
45
47
void
Render
(
vtkRenderer
*ren,
vtkImageSlice
*prop);
48
52
void
ReleaseGraphicsResources
(
vtkWindow
*);
53
54
protected
:
55
vtkMesaImageSliceMapper
();
56
~
vtkMesaImageSliceMapper
();
57
59
60
void
RenderColorAndLighting(
61
double
red,
double
green,
double
blue,
62
double
alpha
,
double
ambient,
double
diffuse);
64
67
void
RenderBackingPolygon();
68
70
73
void
RecursiveRenderTexturedPolygon(
74
vtkRenderer
*ren,
vtkImageProperty
*property,
75
vtkImageData
*
image
,
int
extent
[6],
bool
recursive);
77
79
81
void
RenderTexturedPolygon(
82
vtkRenderer
*ren,
vtkImageProperty
*property,
83
vtkImageData
*
image
,
int
extent
[6],
bool
recursive);
85
87
vtkStdString
BuildFragmentProgram(
vtkImageProperty
*property);
88
90
95
void
ComputeTextureSize
(
96
const
int
extent
[6],
int
&xdim,
int
&ydim,
97
int
imageSize[2],
int
textureSize[2]);
99
102
bool
TextureSizeOK(
const
int
size
[2]);
103
105
void
CheckOpenGLCapabilities(
vtkMesaRenderWindow
*renWin);
106
107
long
Index
;
// OpenGL ID for texture or display list
108
long
FragmentShaderIndex
;
// OpenGL ID for fragment shader
109
vtkRenderWindow
*
RenderWindow
;
// RenderWindow used for previous render
110
int
TextureSize[2];
111
int
TextureBytesPerPixel
;
112
int
LastOrientation
;
113
int
LastSliceNumber
;
114
115
vtkTimeStamp
LoadTime
;
116
int
LoadCount
;
117
118
bool
UsePowerOfTwoTextures
;
119
bool
UseClampToEdge
;
120
bool
UseFragmentProgram
;
121
122
private
:
123
vtkMesaImageSliceMapper
(
const
vtkMesaImageSliceMapper
&);
// Not implemented.
124
void
operator=(
const
vtkMesaImageSliceMapper
&);
// Not implemented.
125
};
126
127
#endif
Generated on Tue Jan 8 2013 05:45:38 for VTK by
1.8.1.2