28 #ifndef TRIALDISPLAY_PIXELCANVASCOLORTABLE_H
29 #define TRIALDISPLAY_PIXELCANVASCOLORTABLE_H
295 int shiftAmount,
int colorCount )
const;
virtual casacore::Bool staticSize()
Is the hardware colormap resizeable? ie.
Class to manage registration of colormaps on PixelCanvasColorTables.
Abstract interface to underlying graphics library's colortable.
casacore::uInt getColorAmount(const casacore::uInt *posMatrix, const casacore::uInt *endMatrix, int shiftAmount, int colorCount) const
std::list< void * > resizeCBList_
casacore::List of resize callbacks
ColormapManager dcmapMgr_
The colormap manager.
virtual casacore::Bool colorSpaceMap(Display::ColorModel, const casacore::Array< casacore::Float > &chan1in, const casacore::Array< casacore::Float > &chan2in, const casacore::Array< casacore::Float > &chan3in, casacore::Array< casacore::Float > &chan1out, casacore::Array< casacore::Float > &chan2out, casacore::Array< casacore::Float > &chan3out)=0
(Multichannel Color) Transform arrays from the passed color model into the colormodel of the XPCCT...
casacore::uInt getColormapSize(const Colormap *cmap) const
Return the allocation size of some Colormap.
virtual casacore::Bool installRGBColors(const casacore::Vector< casacore::Float > &r, const casacore::Vector< casacore::Float > &g, const casacore::Vector< casacore::Float > &b, const casacore::Vector< casacore::Float > &alpha, casacore::uInt offset=0)=0
Install colors into the color table.
Colormap * defaultColormap_
Pointer to the default colormap.
void setDefaultColormap(const Colormap *map)
Return the default map.
PixelCanvasColorTable()
Abstract base class.
void removeResizeCallback(PixelCanvasColorTableResizeCB cb, void *clientData)
Colortable allocation changed (from PixelCanvasColorTable)
ColormapManager & colormapManager()
Return the colormapManager used by this PCCT.
virtual casacore::uInt nColors() const =0
Return the number of colors used to make the map.
virtual Display::ColorModel colorModel() const =0
Return the color model for multichannel color.
bool Bool
Define the standard types used by Casacore.
virtual casacore::uInt depth() const =0
Return the depth of the map in bits.
virtual casacore::uInt nSpareColors() const =0
Return the number of colors that are still unallocated.
std::list< void * > pixelCanvasList_
casacore::List of pixelCanvases on this color table
void doResizeCallbacks(const Display::RefreshReason &reason=Display::ColorTableChange)
casacore::Function that issues resize callbacks
*Colormap * defaultColormap()
std::list< void * > clientDataList_
casacore::List of client data for resize callbacks
casacore::uInt getColormapOffset(const Colormap *map) const
return the offset of a particular colormap.
RefreshReason
Callback reasons for PCRefreshEvent and WCRefreshEvent.
Describes a method of generating a table of colors.
casacore::Bool member(const Colormap *cmap) const
Return whether or not a data colormap is used by this pixel canvas.
virtual ~PixelCanvasColorTable()
Virtual destructor.
virtual void mapToColor(const Colormap *map, casacore::Array< casacore::uChar > &outArray, const casacore::Array< casacore::uChar > &inArray, casacore::Bool rangeCheck=true) const =0
map [0,N-1] into colorpixels, where N is the current colormap size The values are returned as unsigne...
virtual casacore::Bool resize(casacore::uInt newSize)=0
Resize the hardware colormap.
void(* PixelCanvasColorTableResizeCB)(class PixelCanvasColorTable *pccmap, casacore::uInt newSize, void *clientData, Display::RefreshReason reason)
void registerColormap(Colormap *cmap, casacore::Float weight=1.0)
Register a colormap to be managed by the pixel canvas' color table.
virtual void mapToColor3(casacore::Array< casacore::uLong > &out, const casacore::Array< casacore::Float > &chan1in, const casacore::Array< casacore::Float > &chan2in, const casacore::Array< casacore::Float > &chan3in)=0
Functions for dealing with multi-channel mapping.
virtual void mapToColorRGB(const Colormap *map, casacore::Array< casacore::uInt > &outArray, const casacore::Array< casacore::uInt > &inArrayRed, const casacore::Array< casacore::uInt > &inArrayGreen, const casacore::Array< casacore::uInt > &inArrayBlue) const
casacore::uInt getColormapOffset(const Colormap *map) const
Return the current offset of the colormap.
void addResizeCallback(PixelCanvasColorTableResizeCB cb, void *clientData)
Add and remove resize callbacks PixelCanvasColorTableResizeCB is of type: void (*)(class PixelCanvas...
ColorModel
Different ways of handling color on the display.
void unregisterColormap(Colormap *cmap)
Unregister a data colormap reference previously added.