VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Rendering
OpenGL
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 "vtkRenderingOpenGLModule.h"
// For export macro
29
#include "
vtkImageSliceMapper.h
"
30
31
class
vtkWindow
;
32
class
vtkRenderer
;
33
class
vtkRenderWindow
;
34
class
vtkOpenGLRenderWindow
;
35
class
vtkImageSlice
;
36
class
vtkImageProperty
;
37
class
vtkImageData
;
38
39
class
VTKRENDERINGOPENGL_EXPORT
vtkOpenGLImageSliceMapper
:
40
public
vtkImageSliceMapper
41
{
42
public
:
43
static
vtkOpenGLImageSliceMapper
*
New
();
44
vtkTypeMacro(
vtkOpenGLImageSliceMapper
,
vtkImageSliceMapper
);
45
virtual
void
PrintSelf
(ostream& os,
vtkIndent
indent);
46
48
void
Render
(
vtkRenderer
*ren,
vtkImageSlice
*prop);
49
53
void
ReleaseGraphicsResources
(
vtkWindow
*);
54
55
protected
:
56
vtkOpenGLImageSliceMapper
();
57
~
vtkOpenGLImageSliceMapper
();
58
60
61
void
RenderColorAndLighting(
62
double
red,
double
green,
double
blue,
63
double
alpha
,
double
ambient,
double
diffuse);
65
67
70
void
RecursiveRenderTexturedPolygon(
71
vtkRenderer
*ren,
vtkImageProperty
*property,
72
vtkImageData
*
image
,
int
extent
[6],
bool
recursive);
74
76
78
void
RenderTexturedPolygon(
79
vtkRenderer
*ren,
vtkImageProperty
*property,
80
vtkImageData
*
image
,
int
extent
[6],
bool
recursive);
82
85
void
RenderPolygon(
vtkPoints
*
points
,
const
int
extent
[6],
bool
textured);
86
88
91
void
RenderBackground(
92
vtkPoints
*
points
,
const
int
extent
[6],
bool
textured);
94
96
void
BindFragmentProgram(
vtkRenderer
*ren,
vtkImageProperty
*property);
97
99
vtkStdString
BuildFragmentProgram(
vtkImageProperty
*property);
100
102
107
void
ComputeTextureSize
(
108
const
int
extent
[6],
int
&xdim,
int
&ydim,
109
int
imageSize[2],
int
textureSize[2]);
111
114
bool
TextureSizeOK(
const
int
size
[2]);
115
117
void
CheckOpenGLCapabilities(
vtkOpenGLRenderWindow
*renWin);
118
119
long
TextureIndex
;
// OpenGL ID for texture or display list
120
long
BackgroundTextureIndex
;
// OpenGL ID for texture or display list
121
long
FragmentShaderIndex
;
// OpenGL ID for fragment shader
122
vtkRenderWindow
*
RenderWindow
;
// RenderWindow used for previous render
123
int
TextureSize[2];
124
int
TextureBytesPerPixel
;
125
int
LastOrientation
;
126
int
LastSliceNumber
;
127
128
vtkTimeStamp
LoadTime
;
129
int
LoadCount
;
130
131
bool
UsePowerOfTwoTextures
;
132
bool
UseClampToEdge
;
133
bool
UseFragmentProgram
;
134
135
private
:
136
vtkOpenGLImageSliceMapper
(
const
vtkOpenGLImageSliceMapper
&);
// Not implemented.
137
void
operator=(
const
vtkOpenGLImageSliceMapper
&);
// Not implemented.
138
};
139
140
#endif
Generated on Thu May 24 2012 22:22:36 for VTK by
1.8.1