VTK
|
OpenGL mapper for image slice display. More...
#include <vtkOpenGLImageSliceMapper.h>
OpenGL mapper for image slice display.
vtkOpenGLImageSliceMapper is a concrete implementation of the abstract class vtkImageSliceMapper that interfaces to the OpenGL library.
Definition at line 39 of file vtkOpenGLImageSliceMapper.h.
Reimplemented from vtkImageSliceMapper.
Definition at line 44 of file vtkOpenGLImageSliceMapper.h.
vtkOpenGLImageSliceMapper::vtkOpenGLImageSliceMapper | ( | ) | [protected] |
vtkOpenGLImageSliceMapper::~vtkOpenGLImageSliceMapper | ( | ) | [protected] |
static vtkOpenGLImageSliceMapper* vtkOpenGLImageSliceMapper::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkImageSliceMapper.
static int vtkOpenGLImageSliceMapper::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkImageSliceMapper.
virtual int vtkOpenGLImageSliceMapper::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkImageSliceMapper.
static vtkOpenGLImageSliceMapper* vtkOpenGLImageSliceMapper::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkImageSliceMapper.
virtual vtkObjectBase* vtkOpenGLImageSliceMapper::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkImageSliceMapper.
Reimplemented from vtkImageSliceMapper.
virtual void vtkOpenGLImageSliceMapper::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkImageSliceMapper.
void vtkOpenGLImageSliceMapper::Render | ( | vtkRenderer * | ren, |
vtkImageSlice * | prop | ||
) | [virtual] |
Implement base class method. Perform the render.
Reimplemented from vtkImageSliceMapper.
void vtkOpenGLImageSliceMapper::ReleaseGraphicsResources | ( | vtkWindow * | ) | [virtual] |
Release any graphics resources that are being consumed by this mapper, the image texture in particular. Using the same texture in multiple render windows is NOT currently supported.
Reimplemented from vtkImageSliceMapper.
void vtkOpenGLImageSliceMapper::RenderColorAndLighting | ( | double | red, |
double | green, | ||
double | blue, | ||
double | alpha, | ||
double | ambient, | ||
double | diffuse | ||
) | [protected] |
Call the OpenGL code that does color and lighting.
void vtkOpenGLImageSliceMapper::RecursiveRenderTexturedPolygon | ( | vtkRenderer * | ren, |
vtkImageProperty * | property, | ||
vtkImageData * | image, | ||
int | extent[6], | ||
bool | recursive | ||
) | [protected] |
Recursive internal method, will call the non-recursive method as many times as necessary if the texture must be broken up into pieces that are small enough for the GPU to render
void vtkOpenGLImageSliceMapper::RenderTexturedPolygon | ( | vtkRenderer * | ren, |
vtkImageProperty * | property, | ||
vtkImageData * | image, | ||
int | extent[6], | ||
bool | recursive | ||
) | [protected] |
Non-recursive internal method, generate a single texture and its corresponding geometry.
void vtkOpenGLImageSliceMapper::RenderPolygon | ( | vtkPoints * | points, |
const int | extent[6], | ||
bool | textured | ||
) | [protected] |
Basic polygon rendering, if the textured parameter is set the tcoords are included, otherwise they aren't.
void vtkOpenGLImageSliceMapper::RenderBackground | ( | vtkPoints * | points, |
const int | extent[6], | ||
bool | textured | ||
) | [protected] |
Render the background, which means rendering everything within the plane of the image except for the polygon that displays the image data.
void vtkOpenGLImageSliceMapper::BindFragmentProgram | ( | vtkRenderer * | ren, |
vtkImageProperty * | property | ||
) | [protected] |
Bind the fragment program, and generate it first if necessary.
vtkStdString vtkOpenGLImageSliceMapper::BuildFragmentProgram | ( | vtkImageProperty * | property | ) | [protected] |
Build the fragment program to use with the texture.
void vtkOpenGLImageSliceMapper::ComputeTextureSize | ( | const int | extent[6], |
int & | xdim, | ||
int & | ydim, | ||
int | imageSize[2], | ||
int | textureSize[2] | ||
) | [protected, virtual] |
Given an extent that describes a slice (it must have unit thickness in one of the three directions), return the dimension indices that correspond to the texture "x" and "y", provide the x, y image size, and provide the texture size (padded to a power of two if the hardware requires).
Reimplemented from vtkImageMapper3D.
bool vtkOpenGLImageSliceMapper::TextureSizeOK | ( | const int | size[2] | ) | [protected] |
Test whether a given texture size is supported. This includes a check of whether the texture will fit into texture memory.
void vtkOpenGLImageSliceMapper::CheckOpenGLCapabilities | ( | vtkOpenGLRenderWindow * | renWin | ) | [protected] |
Check various OpenGL capabilities
long vtkOpenGLImageSliceMapper::TextureIndex [protected] |
Definition at line 119 of file vtkOpenGLImageSliceMapper.h.
long vtkOpenGLImageSliceMapper::BackgroundTextureIndex [protected] |
Definition at line 120 of file vtkOpenGLImageSliceMapper.h.
long vtkOpenGLImageSliceMapper::FragmentShaderIndex [protected] |
Definition at line 121 of file vtkOpenGLImageSliceMapper.h.
vtkRenderWindow* vtkOpenGLImageSliceMapper::RenderWindow [protected] |
Definition at line 122 of file vtkOpenGLImageSliceMapper.h.
int vtkOpenGLImageSliceMapper::TextureSize[2] [protected] |
Definition at line 123 of file vtkOpenGLImageSliceMapper.h.
int vtkOpenGLImageSliceMapper::TextureBytesPerPixel [protected] |
Definition at line 124 of file vtkOpenGLImageSliceMapper.h.
int vtkOpenGLImageSliceMapper::LastOrientation [protected] |
Definition at line 125 of file vtkOpenGLImageSliceMapper.h.
int vtkOpenGLImageSliceMapper::LastSliceNumber [protected] |
Definition at line 126 of file vtkOpenGLImageSliceMapper.h.
vtkTimeStamp vtkOpenGLImageSliceMapper::LoadTime [protected] |
Definition at line 128 of file vtkOpenGLImageSliceMapper.h.
int vtkOpenGLImageSliceMapper::LoadCount [protected] |
Definition at line 129 of file vtkOpenGLImageSliceMapper.h.
bool vtkOpenGLImageSliceMapper::UsePowerOfTwoTextures [protected] |
Definition at line 131 of file vtkOpenGLImageSliceMapper.h.
bool vtkOpenGLImageSliceMapper::UseClampToEdge [protected] |
Definition at line 132 of file vtkOpenGLImageSliceMapper.h.
bool vtkOpenGLImageSliceMapper::UseFragmentProgram [protected] |
Definition at line 133 of file vtkOpenGLImageSliceMapper.h.