Tools::TransferFunction::Ramp Class Reference

#include <ramp.h>

List of all members.


Detailed Description

Display and manipulate a Ramp.

ramp.png

	 *                 |               /-----------|
	 * left border     |             /             | right border
	 *                 |-----------/               |
	 *            ---------------------------------------
	 *               left       low    high      right
	 * 

Here data intensities between low and high as well as data intensities beyond high will appear as bright pixels. Everything below low will not appear. Top controls the opacity.

Color transition is from black to low color to high color.

As with the histogram, it is possible to visualize only a portion of the ramp, and to zoom and pan it.

Public Member Functions

 Ramp ()
 Ramp (float low, float high, float opacity=1)
 ~Ramp ()
void update (float low, float high, float opacity)
void clamp (float left, float right)
void display () const
bool mouse (float x, float y)
bool motion (float x, float y)
void get (float i, float &r, float &g, float &b, float &a) const
void setColor (float r, float g, float b)
void reshape (int w, int h)


Constructor & Destructor Documentation

Tools::TransferFunction::Ramp::Ramp (  ) 

Tools::TransferFunction::Ramp::Ramp ( float  low,
float  high,
float  opacity = 1 
)

Tools::TransferFunction::Ramp::~Ramp (  ) 


Member Function Documentation

void Tools::TransferFunction::Ramp::update ( float  low,
float  high,
float  opacity 
)

update ramp

void Tools::TransferFunction::Ramp::clamp ( float  left,
float  right 
)

update border (visualize only portion of the ramp)

void Tools::TransferFunction::Ramp::display (  )  const

display ramp line and squares

bool Tools::TransferFunction::Ramp::mouse ( float  x,
float  y 
)

did mouse pick a ramp feature (xy normalized 0..1)

bool Tools::TransferFunction::Ramp::motion ( float  x,
float  y 
)

handle mouse motion after a mouse pick (xy normalized 0..1)

void Tools::TransferFunction::Ramp::get ( float  i,
float &  r,
float &  g,
float &  b,
float &  a 
) const

get the ramp value (rgba 0..1) for a given intensity

void Tools::TransferFunction::Ramp::setColor ( float  r,
float  g,
float  b 
)

set color of the selected feature

void Tools::TransferFunction::Ramp::reshape ( int  w,
int  h 
)

update aspect ratio (w/h) so square appears as square


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

Generated on Tue Aug 4 17:57:43 2009 for libvd by  doxygen 1.5.5