Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkColorTransferFunction Class Reference

mitkColorTransferFunction - a transfer function to map the scalar value to color More...

#include <mitkColorTransferFunction.h>

Inherits mitkObject.

Inheritance diagram for mitkColorTransferFunction:

Inheritance graph
[legend]
Collaboration diagram for mitkColorTransferFunction:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
void AddPoint (int x, float rColor, float gColor, float bColor)
void RemovePoint (int x)
void RemoveAllPoints ()
int GetPointsCount ()
int GetDataValueAtPoint (int pointIndex)
float GetRedColorAtPoint (int pointIndex)
float GetGreenColorAtPoint (int pointIndex)
float GetBlueColorAtPoint (int pointIndex)
void SetMax (int xMax, float rMax, float gMax, float bMax)
int GetMaxX ()
float GetRedValue (int x)
float GetGreenValue (int x)
float GetBlueValue (int x)
float * GetRData ()
float * GetGData ()
float * GetBData ()
bool IsModified () const
void SetUnmodified ()

Detailed Description

mitkColorTransferFunction - a transfer function to map the scalar value to color

mitkColorTransferFunction is a transfer function to map the scalar value to color. The scalar value has a range. The minimum value is always 0, the maximum value can be set by calling the function SetMax(). In general, you firstly get the maximum value from a volume, and then pass it to mitkColorTransferFunction.


Member Function Documentation

void mitkColorTransferFunction::AddPoint int  x,
float  rColor,
float  gColor,
float  bColor
 

Add a point to the color transfer function

Parameters:
x Specify the scalar value
rColor Specify the red component of mapped color
gColor Specify the green component of mapped color
bColor Specify the blue component of mapped color

float* mitkColorTransferFunction::GetBData  )  [inline]
 

Get the address of the blue component of the colors in the transfer function.

Returns:
Return a pointer to the address of the blue component of the colors in the transfer function. The number of element in this array is
 GetMaxX() + 1 
.

float mitkColorTransferFunction::GetBlueColorAtPoint int  pointIndex  ) 
 

Get the blue color component at pointIndex point

Parameters:
pointIndex Specify zero-based point index
Returns:
Return the blue color component at the specified point

float mitkColorTransferFunction::GetBlueValue int  x  ) 
 

Get the blue component of the color corresponding to the specified scalar value.

Parameters:
x The specified scalar value.
Returns:
Return the blue component of the color corresponding to the scalar value x.

int mitkColorTransferFunction::GetDataValueAtPoint int  pointIndex  ) 
 

Get the data value at pointIndex point

Parameters:
pointIndex Specify zero-based point index
Returns:
Return the data value at the specified point

float* mitkColorTransferFunction::GetGData  )  [inline]
 

Get the address of the green component of the colors in the transfer function.

Returns:
Return a pointer to the address of the green component of the colors in the transfer function. The number of element in this array is
 GetMaxX() + 1 
.

float mitkColorTransferFunction::GetGreenColorAtPoint int  pointIndex  ) 
 

Get the green color component at pointIndex point

Parameters:
pointIndex Specify zero-based point index
Returns:
Return the green color component at the specified point

float mitkColorTransferFunction::GetGreenValue int  x  ) 
 

Get the green component of the color corresponding to the specified scalar value.

Parameters:
x The specified scalar value.
Returns:
Return the green component of the color corresponding to the scalar value x.

int mitkColorTransferFunction::GetMaxX  )  [inline]
 

Get the maximum scalar value of this transfer function.

Returns:
Return the maximum scalar value of this transfer function.

int mitkColorTransferFunction::GetPointsCount  ) 
 

Get the number of points in this transfer function

Returns:
Return the points number

float* mitkColorTransferFunction::GetRData  )  [inline]
 

Get the address of the red component of the colors in the transfer function.

Returns:
Return a pointer to the address of the red component of the colors in the transfer function. The number of element in this array is
 GetMaxX() + 1 
.

float mitkColorTransferFunction::GetRedColorAtPoint int  pointIndex  ) 
 

Get the red color component at pointIndex point

Parameters:
pointIndex Specify zero-based point index
Returns:
Return the red color component at the specified point

float mitkColorTransferFunction::GetRedValue int  x  ) 
 

Get the red component of the color corresponding to the specified scalar value.

Parameters:
x The specified scalar value.
Returns:
Return the red component of the color corresponding to the scalar value x.

bool mitkColorTransferFunction::IsModified  )  const [inline]
 

Test if some of the transfer function is modified.

Returns:
Return true if some of the properties are modified. Otherwise return false.

virtual void mitkColorTransferFunction::PrintSelf ostream &  os  )  [virtual]
 

Print the necessary information about this object for the debugging purpose.

Parameters:
os The specified ostream to output information.

Reimplemented from mitkObject.

void mitkColorTransferFunction::RemoveAllPoints  ) 
 

Remove all points from the color transfer function

void mitkColorTransferFunction::RemovePoint int  x  ) 
 

Remove a point from the color transfer function

Parameters:
x Specify the scalar value. If the color transfer function has a point which scalar value is equal to x, then this point will be removed. Otherwise nothing happens.

void mitkColorTransferFunction::SetMax int  xMax,
float  rMax,
float  gMax,
float  bMax
 

Set the maximum scalar value and its corresponding color.

Parameters:
xMax Specify the maximum scalar value. The scalar value range of this transfer function is from 0 to xMax.
rMax Specify the red component of the corresponding color
gMax Specify the green component of the corresponding color
bMax Specify the blue component of the corresponding color
Note:
This function will call RemoveAllPoints(), so it will clear the previous transfer function. After the calling of this function, the transfer function has two points. One is (0, 0.0, 0.0, 0.0), and the other is (xMax, rMax, gMax, bMax)

void mitkColorTransferFunction::SetUnmodified  )  [inline]
 

Reset to unmodified after changes have been done according to the new transfer function.


The documentation for this class was generated from the following file:
Generated on Tue Feb 25 15:01:25 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3