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

mitkColorTable Class Reference

mitkColorTable - a table mapping pixel value to color More...

#include <mitkColorTable.h>

Inherits mitkObject.

Inheritance diagram for mitkColorTable:

Inheritance graph
[legend]
Collaboration diagram for mitkColorTable:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
 mitkColorTable ()
void SetDefaultColor (int r, int g, int b, int a=0)
void AddColor (double pixVal, int r, int g, int b, int a=0)
void RemoveColor (double pixVal)
void RemoveColor (int index)
void RemoveAllColors ()
int GetColorCount ()
bool SetColor (int index, int r, int g, int b, int a=0)
bool SetValue (int index, double pixVal)
bool SetValueColor (int index, double pixVal, int r, int g, int b, int a=0)
bool GetColor (double pixVal, int &r, int &g, int &b)
bool GetColor (double pixVal, int &r, int &g, int &b, int &a)
bool GetColor (double pixVal, unsigned char &r, unsigned char &g, unsigned char &b)
bool GetColor (double pixVal, unsigned char color[3])
bool GetColor (int index, int &r, int &g, int &b)
bool GetColor (int index, int &r, int &g, int &b, int &a)
bool GetColor (int index, unsigned char &r, unsigned char &g, unsigned char &b)
bool GetColor (int index, unsigned char color[3])
bool GetValue (int index, double &pixVal)
bool GetValueColor (int index, double &pixVal, int &r, int &g, int &b)
bool GetValueColor (int index, double &pixVal, int &r, int &g, int &b, int &a)
bool GetValueColor (int index, double &pixVal, unsigned char &r, unsigned char &g, unsigned char &b)
bool GetValueColor (int index, double &pixVal, unsigned char color[3])
void Copy (mitkColorTable *src)

Detailed Description

mitkColorTable - a table mapping pixel value to color

mitkColorTable is a table mapping pixel value to color. The data type of the pixel value is double. It records some double value regions. Each region is mapped to one RGBA color.


Constructor & Destructor Documentation

mitkColorTable::mitkColorTable  ) 
 

Default constructor.


Member Function Documentation

void mitkColorTable::AddColor double  pixVal,
int  r,
int  g,
int  b,
int  a = 0
 

Add a mapping entity into the table. After this operation, the pixel values which >= pixVal and < the minimum pixel value which > pixVal in the former table will be mapper to color (r,g,b,a).

Parameters:
pixVal the new pixel value delimiter to be added to the table
r the red component of the color
g the green component of the color
b the blue component of the color
a the alpha component of the color, the default value is 0

void mitkColorTable::Copy mitkColorTable src  ) 
 

Copy the entities from another color table.

Parameters:
src the source color table to copy from

bool mitkColorTable::GetColor int  index,
unsigned char  color[3]
 

Get the color of the entity indicated by index.

Parameters:
index the index of the entity
color[0] return the red component of the color
color[1] return the green component of the color
color[2] return the blue component of the color
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

bool mitkColorTable::GetColor int  index,
unsigned char &  r,
unsigned char &  g,
unsigned char &  b
 

Get the color of the entity indicated by index.

Parameters:
index the index of the entity
r return the red component of the color
g return the green component of the color
b return the blue component of the color
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

bool mitkColorTable::GetColor int  index,
int &  r,
int &  g,
int &  b,
int &  a
 

Get the color of the entity indicated by index.

Parameters:
index the index of the entity
r return the red component of the color
g return the green component of the color
b return the blue component of the color
a return the alpha component of the color
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

bool mitkColorTable::GetColor int  index,
int &  r,
int &  g,
int &  b
 

Get the color of the entity indicated by index.

Parameters:
index the index of the entity
r return the red component of the color
g return the green component of the color
b return the blue component of the color
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

bool mitkColorTable::GetColor double  pixVal,
unsigned char  color[3]
 

Get the color pixVal is mapping to according to the table.

Parameters:
pixVal the pixel value
color[0] return the red component of the color
color[1] return the green component of the color
color[2] return the blue component of the color
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

bool mitkColorTable::GetColor double  pixVal,
unsigned char &  r,
unsigned char &  g,
unsigned char &  b
 

Get the color pixVal is mapping to according to the table.

Parameters:
pixVal the pixel value
r return the red component of the color
g return the green component of the color
b return the blue component of the color
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

bool mitkColorTable::GetColor double  pixVal,
int &  r,
int &  g,
int &  b,
int &  a
 

Get the color pixVal is mapping to according to the table.

Parameters:
pixVal the pixel value
r return the red component of the color
g return the green component of the color
b return the blue component of the color
a return the alpha component of the color
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

bool mitkColorTable::GetColor double  pixVal,
int &  r,
int &  g,
int &  b
 

Get the color pixVal is mapping to according to the table.

Parameters:
pixVal the pixel value
r return the red component of the color
g return the green component of the color
b return the blue component of the color
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

int mitkColorTable::GetColorCount  ) 
 

Get the number of mapping entities in the table.

bool mitkColorTable::GetValue int  index,
double &  pixVal
 

Get the pixel value delimiter of the entity indicated by index.

Parameters:
index the index of the entity
pixVal return the pixel value delimiter of the entity
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

bool mitkColorTable::GetValueColor int  index,
double &  pixVal,
unsigned char  color[3]
 

Get the pixel value delimiter and the color of the entity indicated by index.

Parameters:
index the index of the entity
pixVal return the pixel value delimiter of the entity
color[0] return the red component of the color
color[1] return the green component of the color
color[2] return the blue component of the color
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

bool mitkColorTable::GetValueColor int  index,
double &  pixVal,
unsigned char &  r,
unsigned char &  g,
unsigned char &  b
 

Get the pixel value delimiter and the color of the entity indicated by index.

Parameters:
index the index of the entity
pixVal return the pixel value delimiter of the entity
r return the red component of the color
g return the green component of the color
b return the blue component of the color
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

bool mitkColorTable::GetValueColor int  index,
double &  pixVal,
int &  r,
int &  g,
int &  b,
int &  a
 

Get the pixel value delimiter and the color of the entity indicated by index.

Parameters:
index the index of the entity
pixVal return the pixel value delimiter of the entity
r return the red component of the color
g return the green component of the color
b return the blue component of the color
a return the alpha component of the color
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

bool mitkColorTable::GetValueColor int  index,
double &  pixVal,
int &  r,
int &  g,
int &  b
 

Get the pixel value delimiter and the color of the entity indicated by index.

Parameters:
index the index of the entity
pixVal return the pixel value delimiter of the entity
r return the red component of the color
g return the green component of the color
b return the blue component of the color
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

virtual void mitkColorTable::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 mitkColorTable::RemoveAllColors  ) 
 

Remove all mapping entities.

void mitkColorTable::RemoveColor int  index  ) 
 

Remove a mapping entity by index.

Parameters:
index the index of the entity to be removed from the table

void mitkColorTable::RemoveColor double  pixVal  ) 
 

Remove a mapping entity decided by the pixel value delimiter pixVal from the table.

Parameters:
pixVal the pixel value delimiter to be removed from the table

bool mitkColorTable::SetColor int  index,
int  r,
int  g,
int  b,
int  a = 0
 

Set the color of the mapping entity indicated by index to (r,g,b,a).

Parameters:
index the index of the entity
r the red component of the color to be set
g the green component of the color to be set
b the blue component of the color to be set
a the alpha component of the color to be set, the default value is 0
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

void mitkColorTable::SetDefaultColor int  r,
int  g,
int  b,
int  a = 0
 

Set the default color.

Parameters:
r the red component of the color
g the green component of the color
b the blue component of the color
a the alpha component of the color, the default value is 0

bool mitkColorTable::SetValue int  index,
double  pixVal
 

Set the pixel value delimiter of the mapping entity indicated by index to pixVal.

Parameters:
index the index of the entity
pixVal the pixel value delimiter to be set
Returns:
Return true if the operation is accomplished successfully, otherwise return false.

bool mitkColorTable::SetValueColor int  index,
double  pixVal,
int  r,
int  g,
int  b,
int  a = 0
 

Set the pixel value delimiter and the color of the mapping entity indicated by index to pixVal and (r,g,b,a).

Parameters:
index the index of the entity
pixVal the pixel value delimiter to be set
r the red component of the color to be set
g the green component of the color to be set
b the blue component of the color to be set
a the alpha component of the color to be set, the default value is 0
Returns:
Return true if the operation is accomplished successfully, otherwise return false.


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