VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkMesaImageSliceMapper Class Reference

OpenGL mapper for image slice display. More...

#include <vtkMesaImageSliceMapper.h>

Inheritance diagram for vtkMesaImageSliceMapper:
Inheritance graph
[legend]
Collaboration diagram for vtkMesaImageSliceMapper:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkImageSliceMapper Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
virtual void PrintSelf (ostream &os, vtkIndent indent)
void Render (vtkRenderer *ren, vtkImageSlice *prop)
void ReleaseGraphicsResources (vtkWindow *)

Static Public Member Functions

static vtkMesaImageSliceMapperNew ()
static int IsTypeOf (const char *type)
static vtkMesaImageSliceMapperSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkMesaImageSliceMapper ()
 ~vtkMesaImageSliceMapper ()
void RenderBackingPolygon ()
vtkStdString BuildFragmentProgram (vtkImageProperty *property)
bool TextureSizeOK (const int size[2])
void CheckOpenGLCapabilities (vtkMesaRenderWindow *renWin)
void RenderColorAndLighting (double red, double green, double blue, double alpha, double ambient, double diffuse)
void RecursiveRenderTexturedPolygon (vtkRenderer *ren, vtkImageProperty *property, vtkImageData *image, int extent[6], bool recursive)
void RenderTexturedPolygon (vtkRenderer *ren, vtkImageProperty *property, vtkImageData *image, int extent[6], bool recursive)
void ComputeTextureSize (const int extent[6], int &xdim, int &ydim, int imageSize[2], int textureSize[2])

Protected Attributes

long Index
long FragmentShaderIndex
vtkRenderWindowRenderWindow
int TextureSize [2]
int TextureBytesPerPixel
int LastOrientation
int LastSliceNumber
vtkTimeStamp LoadTime
int LoadCount
bool UsePowerOfTwoTextures
bool UseClampToEdge
bool UseFragmentProgram

Detailed Description

OpenGL mapper for image slice display.

vtkMesaImageSliceMapper is a concrete implementation of the abstract class vtkImageSliceMapper that interfaces to the OpenGL library.

Thanks:
Thanks to David Gobbi at the Seaman Family MR Centre and Dept. of Clinical Neurosciences, Foothills Medical Centre, Calgary, for providing this class.

Definition at line 38 of file vtkMesaImageSliceMapper.h.


Member Typedef Documentation

Reimplemented from vtkImageSliceMapper.

Definition at line 43 of file vtkMesaImageSliceMapper.h.


Constructor & Destructor Documentation

vtkMesaImageSliceMapper::vtkMesaImageSliceMapper ( ) [protected]
vtkMesaImageSliceMapper::~vtkMesaImageSliceMapper ( ) [protected]

Member Function Documentation

static vtkMesaImageSliceMapper* vtkMesaImageSliceMapper::New ( ) [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkImageSliceMapper.

virtual const char* vtkMesaImageSliceMapper::GetClassName ( ) [virtual]

Reimplemented from vtkImageSliceMapper.

static int vtkMesaImageSliceMapper::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 vtkMesaImageSliceMapper::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 vtkMesaImageSliceMapper* vtkMesaImageSliceMapper::SafeDownCast ( vtkObject o) [static]

Reimplemented from vtkImageSliceMapper.

virtual void vtkMesaImageSliceMapper::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 vtkMesaImageSliceMapper::Render ( vtkRenderer ren,
vtkImageSlice prop 
) [virtual]

Implement base class method. Perform the render.

Reimplemented from vtkImageSliceMapper.

void vtkMesaImageSliceMapper::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 vtkMesaImageSliceMapper::RenderColorAndLighting ( double  red,
double  green,
double  blue,
double  alpha,
double  ambient,
double  diffuse 
) [protected]

Call the OpenGL code that does color and lighting.

void vtkMesaImageSliceMapper::RenderBackingPolygon ( ) [protected]

Render an opaque polygon behind the image. This is also used in multi-pass rendering to render into the depth buffer.

void vtkMesaImageSliceMapper::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 vtkMesaImageSliceMapper::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.

vtkStdString vtkMesaImageSliceMapper::BuildFragmentProgram ( vtkImageProperty property) [protected]

Build the fragment program to use with the texture.

void vtkMesaImageSliceMapper::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 vtkMesaImageSliceMapper::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 vtkMesaImageSliceMapper::CheckOpenGLCapabilities ( vtkMesaRenderWindow renWin) [protected]

Check various OpenGL capabilities


Member Data Documentation

Definition at line 107 of file vtkMesaImageSliceMapper.h.

Definition at line 108 of file vtkMesaImageSliceMapper.h.

Definition at line 109 of file vtkMesaImageSliceMapper.h.

Definition at line 110 of file vtkMesaImageSliceMapper.h.

Definition at line 111 of file vtkMesaImageSliceMapper.h.

Definition at line 112 of file vtkMesaImageSliceMapper.h.

Definition at line 113 of file vtkMesaImageSliceMapper.h.

Definition at line 115 of file vtkMesaImageSliceMapper.h.

Definition at line 116 of file vtkMesaImageSliceMapper.h.

Definition at line 118 of file vtkMesaImageSliceMapper.h.

Definition at line 119 of file vtkMesaImageSliceMapper.h.

Definition at line 120 of file vtkMesaImageSliceMapper.h.


The documentation for this class was generated from the following file: