VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Rendering
vtkOpenGLImageSliceMapper.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkOpenGLImageSliceMapper.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 __vtkOpenGLImageSliceMapper_h
26
#define __vtkOpenGLImageSliceMapper_h
27
28
#include "
vtkImageSliceMapper.h
"
29
30
class
vtkWindow
;
31
class
vtkRenderer
;
32
class
vtkRenderWindow
;
33
class
vtkOpenGLRenderWindow
;
34
class
vtkImageSlice
;
35
class
vtkImageProperty
;
36
class
vtkImageData
;
37
38
class
VTK_RENDERING_EXPORT
vtkOpenGLImageSliceMapper
:
39
public
vtkImageSliceMapper
40
{
41
public
:
42
static
vtkOpenGLImageSliceMapper
*
New
();
43
vtkTypeMacro(
vtkOpenGLImageSliceMapper
,
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
vtkOpenGLImageSliceMapper
();
56
~
vtkOpenGLImageSliceMapper
();
57
59
60
void
RenderColorAndLighting(
61
double
red,
double
green,
double
blue,
62
double
alpha
,
double
ambient,
double
diffuse);
64
66
69
void
RecursiveRenderTexturedPolygon(
70
vtkRenderer
*ren,
vtkImageProperty
*property,
71
vtkImageData
*
image
,
int
extent
[6],
bool
recursive);
73
75
77
void
RenderTexturedPolygon(
78
vtkRenderer
*ren,
vtkImageProperty
*property,
79
vtkImageData
*
image
,
int
extent
[6],
bool
recursive);
81
84
void
RenderPolygon(
vtkPoints
*
points
,
const
int
extent
[6],
bool
textured);
85
87
90
void
RenderBackground(
91
vtkPoints
*
points
,
const
int
extent
[6],
bool
textured);
93
95
void
BindFragmentProgram(
vtkRenderer
*ren,
vtkImageProperty
*property);
96
98
vtkStdString
BuildFragmentProgram(
vtkImageProperty
*property);
99
101
106
void
ComputeTextureSize
(
107
const
int
extent
[6],
int
&xdim,
int
&ydim,
108
int
imageSize[2],
int
textureSize[2]);
110
113
bool
TextureSizeOK(
const
int
size
[2]);
114
116
void
CheckOpenGLCapabilities(
vtkOpenGLRenderWindow
*renWin);
117
118
long
TextureIndex
;
// OpenGL ID for texture or display list
119
long
BackgroundTextureIndex
;
// OpenGL ID for texture or display list
120
long
FragmentShaderIndex
;
// OpenGL ID for fragment shader
121
vtkRenderWindow
*
RenderWindow
;
// RenderWindow used for previous render
122
int
TextureSize[2];
123
int
TextureBytesPerPixel
;
124
int
LastOrientation
;
125
int
LastSliceNumber
;
126
127
vtkTimeStamp
LoadTime
;
128
int
LoadCount
;
129
130
bool
UsePowerOfTwoTextures
;
131
bool
UseClampToEdge
;
132
bool
UseFragmentProgram
;
133
134
private
:
135
vtkOpenGLImageSliceMapper
(
const
vtkOpenGLImageSliceMapper
&);
// Not implemented.
136
void
operator=(
const
vtkOpenGLImageSliceMapper
&);
// Not implemented.
137
};
138
139
#endif
Generated on Tue Jan 8 2013 05:45:38 for VTK by
1.8.1.2