Go up one levelGo to Previous Go to Next

ITTInfo(3)

NAME

 
ITTInfo - C++ class for reading and managing MIDAS ITT (intensity
            transfer table) files

SYNOPSIS

 
#include "ITTInfo.h"

// one of these is used to hold ITT info for each ITT
// file read
class ITTInfo {
...
public:
    ITTInfo(char* name, ITTInfo* next = (ITTInfo*)NULL);
    ~ITTInfo();

    // create and return ITT from a file description
    static ITTInfo* read(char* filename, ITTInfo* next = (ITTInfo*)NULL);

    // member access
    char* name() {return name_;}
    ITTInfo* next() {return next_;}

    // Copy the rgb color values from colorCells to copyCells and interpolate based
    // on the ITT table and the count of available colors
    void interpolate(XColor* src, XColor* dest, int colorCount);

    // Copy the rgb color values from colorCells to copyCells as above,
    // and also scale the ITT values by the given amount
    void scale(int amount, XColor* src, XColor* dest, int colorCount);
};

DESCRIPTION

 
This class is used to read in and manage an ITT (intensity transfer
table) file in MIDAS format, which is 256 lines of values between 0.0
and 1.0, which are applied to the colormap color values to modify the
colormap.

Most methods take a colorCount argument, which is the number of colors
allocated in the colormap. The scale method take an integer "amount"
argument, which is typically the difference in mouse movements in some
widget and is used to stretch or squeeze the ITT (and colormap) by the
given amount.

METHODS

 
static ITTInfo* read(char* filename, ITTInfo* next = NULL)
        Create and return an ITTInfo from a file description.  The
        next argument is used to build a list of loaded ITTs.

char* name()
        Return the name (file name) of the ITT loaded.

ITTInfo* next()
        Return a pointer to the next ITT in the list.

void interpolate(XColor* src, XColor* dest, int colorCount)
        Copy the rgb color values from src to dest and interpolate
        based on the ITT table and the count of available colors.

void scale(int amount, XColor* src, XColor* dest, int colorCount);
        Copy the rgb color values from src to dest as above, and also
        scale the ITT values by the given amount. Values greater than
        1.0 "stretch" the ITT/colormap, values between 0.0 and 1.0
        "sqeeze" it.

FILES

 
$RTD_LIBRARY/../colormaps/*.iasc - MIDAS ITT files

SEE ALSO

 
ImageColor, ColorMapInfo(3C++)
 


- - - - - -
Last change: 07 May 99

 


Go up one levelGo to Previous Go to Next

Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory