SliceRenderer Class Reference

A slicerenderer renders a slice of the data. More...

#include <SliceRenderer.h>

Inheritance diagram for SliceRenderer:

Inheritance graph
[legend]
Collaboration diagram for SliceRenderer:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Axis { AXIS_X, AXIS_Y, AXIS_Z }

Public Member Functions

 SliceRenderer (Data &aData)
 ~SliceRenderer ()
void setAxis (Axis newAxis)
Axis getAxis () const
void setPosition (unsigned int aPos)
unsigned int getPosition () const
unsigned int maxpos () const
virtual Color getPixelColor (unsigned int x, unsigned int y)
 Gets the color of a specified screen pixel.
virtual Size getImageSize () const
 Gets the intrinsic size of the image per the current settings.
virtual void render (unsigned char *buffer)
 Render the image into a provided buffer, in RGBA (native-endian) format.

Private Member Functions

void calcCoords ()

Private Attributes

DatamData
Axis mAxis
unsigned int mPosition
unsigned int mXIndex
unsigned int mYIndex
unsigned int mPosIndex
unsigned int mCoords [3]

Detailed Description

A slicerenderer renders a slice of the data.

It is constructed using a reference to a data class, which has to outlive the renderer.

It renders one slice of data; which one to render is specified with setAxis and setPosition. This position is the one to be held constant.


Member Enumeration Documentation

enum SliceRenderer::Axis
 

Enumerator:
AXIS_X 
AXIS_Y 
AXIS_Z 


Constructor & Destructor Documentation

SliceRenderer::SliceRenderer Data aData  ) 
 

SliceRenderer::~SliceRenderer  ) 
 


Member Function Documentation

void SliceRenderer::calcCoords  )  [private]
 

SliceRenderer::Axis SliceRenderer::getAxis  )  const
 

Size SliceRenderer::getImageSize  )  const [virtual]
 

Gets the intrinsic size of the image per the current settings.

Implements ARender.

Color SliceRenderer::getPixelColor unsigned int  x,
unsigned int  y
[virtual]
 

Gets the color of a specified screen pixel.

Implements ARender.

unsigned int SliceRenderer::getPosition  )  const
 

unsigned int SliceRenderer::maxpos  )  const
 

void SliceRenderer::render unsigned char *  buffer  )  [virtual]
 

Render the image into a provided buffer, in RGBA (native-endian) format.

Buffer must be of size getImageSize.width() * getImageSize.height() * 4.

Implements ARender.

void SliceRenderer::setAxis Axis  newAxis  ) 
 

void SliceRenderer::setPosition unsigned int  aPos  ) 
 


Member Data Documentation

Axis SliceRenderer::mAxis [private]
 

unsigned int SliceRenderer::mCoords[3] [private]
 

Data& SliceRenderer::mData [private]
 

unsigned int SliceRenderer::mPosIndex [private]
 

unsigned int SliceRenderer::mPosition [private]
 

unsigned int SliceRenderer::mXIndex [private]
 

unsigned int SliceRenderer::mYIndex [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Dec 19 00:13:46 2005 for Visualization by  doxygen 1.4.5