
The Tool_Histo class enable you to draw an histogram of the pixel values of the currently selected frames. When the user move the cursor over the imge of a frame, a white line in the histogram show the value of the pixel under the cursor. You can also display up to 32 bands of colors on the histogram, usually to represent threshold values.
The variables of the Tool_Histo class are:
There is no variable associated with this class.
The methods of the Tool_Histo class are:
|
Tool_Histo( void ) ;
|
Constructor
|
|
~Tool_Histo() ;
|
Destructor
|
|
int Read( void ) ;
|
// There is no "Read" method for this class
|
|
int Set( unsigned short nb, ... ) ;
|
This method enable you to have color bands on the histogram. It expect 3*nb + 1 arguments. The first argument, "nb" define the number of groups of 3 arguments used. Each of these groups contain:
unsigned short tag // The associated Tag valuebbB2
double start // The GLI start value for this tag
double stop // The GLI stop value for this tag
|
The methods shared with the other SliceO_Tool classes are:
|
int Click( int up_down ) ;
|
You must call this method if the user has activated a mouse button while the cursor is inside the tool
|
|
void Draw( void ) ;
|
This method will draw the tool
|
|
int Height( unsigned short nb=10 ) ;
|
This method returns the height (in pixel) of the tool. The "nb" parameter defines how many lines of information will be displayed.
|
|
int Keyboard( int key ) ;
|
You must call this method if the user has activated a keyboard key while the cursor is inside the tool
|
|
void Leave( void ) ;
|
You must call this method if the user move the cursor outside of the tool
|
|
int Motion( int up_down ) ;
|
You must call this method if the user move the cursor inside the tool
|
|
int Resize( Boxs *box ) ;
|
You must call this method to resize the tool. The tool will reside inside the bounding box of the "Boxs" class.
|
|
int Scroll( int val ) ;
|
You must call this method if the user has activated the mouse wheel while the cursor is inside the tool
|
|
void Update( UInt64 flag )
|
You must call this method when external events change the content of the tool. The "flag" parameter is the "Update Flag" defining these changes.
The update should be called if one of the following flags are changed:
UPDATE_ALL_TOOLS
UPDATE_SELECTION // the selected frames have changed
UPDATE_DATA_GLI // the GLI data of a frame has changed
UPDATE_THRESHOLD
UPDATE_COLOR_TAG // the color associated with the TAGs has changed
UPDATE_CUR_TAG // the current TAG has changed
UPDATE_CURSOR // the cursor has moved (needed for the white line)
UPDATE_COLOR_WORK
|
The Histograms in sliceOmatic are controlled by a number of system variables:
Select_GLI_Min
The smallest GLI value in all the selected frames.
You can get a pointer to this variable with:
float *Select_GLI_Min = (float *) Fct_Variable_Get( "$SELECT_GLI_MIN" ) ;
Select_GIL_Max
The largest GLI value in all the selected frames.
You can get a pointer to this variable with:
float *Select_GLI_Max = (float *) Fct_Variable_Get( "$SELECT_GLI_MAX" ) ;
An example of the usage of the Tool_Histo class is given in the Samples\SliceO Tools\Histo demo directory. the resulting interface for this demo look like this:
The tool_histo_ctrl.cpp file from the Tool_Histo demo