Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxRgbLabel Class Template Reference

Labeled display. More...

#include <HxRgbLabel.h>

List of all members.

Public Types

typedef ValDoubleT ArithTypeDouble
 The "double" arithtype. More...


Public Methods

 HxRgbLabel (HxTagList &)
 Constructor : creates LUT. More...

int doIt (const ValT &pixV)
 Actual operation for the "standard" arithtype. More...

int doItDouble (const ValDoubleT &pixV)
 Actual operation for the "double" arithtype. More...


Static Public Methods

HxString className ()
 The name : "Label". More...


Detailed Description

template<class ValT, class ValDoubleT>
class HxRgbLabel< ValT, ValDoubleT >

Labeled display.

PixV is mapped onto 1 of 8 colors.


Member Typedef Documentation

template<class ValT, class ValDoubleT>
typedef ValDoubleT HxRgbLabel::ArithTypeDouble
 

The "double" arithtype.


Constructor & Destructor Documentation

template<class ValT, class ValDoubleT>
HxRgbLabel< ValT, ValDoubleT >::HxRgbLabel HxTagList  
 

Constructor : creates LUT.

00058 {
00059     colorTable[0] = (255 << 24) | (127 << 16) | (127 << 8) | 127; // 50% grey
00060     colorTable[1] = (255 << 24) | (255 << 16) | (  0 << 8) |   0; // red
00061     colorTable[2] = (255 << 24) | (  0 << 16) | (255 << 8) |   0; // green
00062     colorTable[3] = (255 << 24) | (255 << 16) | (255 << 8) |   0; // yellow
00063     colorTable[4] = (255 << 24) | (  0 << 16) | (  0 << 8) | 255; // blue
00064     colorTable[5] = (255 << 24) | (255 << 16) | (  0 << 8) | 255; // magenta
00065     colorTable[6] = (255 << 24) | (  0 << 16) | (255 << 8) | 255; // cyan
00066     colorTable[7] = (255 << 24) | (255 << 16) | (255 << 8) | 255; // white
00067     colorTable[8] = (255 << 24) | (  0 << 16) | (  0 << 8) |   0; // black
00068 }


Member Function Documentation

template<class ValT, class ValDoubleT>
int HxRgbLabel< ValT, ValDoubleT >::doIt const ValT &    pixV [inline]
 

Actual operation for the "standard" arithtype.

00033                             {
00034                                 int pix = (int) pixV.x();
00035                                 int mask = (pix == 0) ? 8 : pix % 8;
00036                                 return colorTable[mask];
00037                             }

template<class ValT, class ValDoubleT>
int HxRgbLabel< ValT, ValDoubleT >::doItDouble const ValDoubleT &    pixV [inline]
 

Actual operation for the "double" arithtype.

00041                             {
00042                                 int pix = (int) pixV.x();
00043                                 int mask = (pix == 0) ? 8 : pix % 8;
00044                                 return colorTable[mask];
00045                             }

template<class ValT, class ValDoubleT>
HxString HxRgbLabel< ValT, ValDoubleT >::className   [inline, static]
 

The name : "Label".

00049                             { return HxString("Label"); }


The documentation for this class was generated from the following file:
Generated on Tue Feb 3 14:19:07 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001