casa
5.7.0-16
|
#include <QtPCColorTable.h>
Public Member Functions | |
QtPCColorTable () | |
virtual | ~QtPCColorTable () |
virtual casacore::Bool | staticSize () |
Is the hardware colormap resizeable? ie. More... | |
virtual casacore::Bool | resize (casacore::uInt, casacore::uInt, casacore::uInt) |
virtual void | nColors (casacore::uInt &n1, casacore::uInt &n2, casacore::uInt &n3) const |
Return the number of colors per component used in the map. More... | |
virtual casacore::uInt | depth () const |
Return the depth of the map in bits. More... | |
virtual Display::ColorModel | colorModel () const |
The non-indexed 'true' color depth that Qt supports, and the number of bits in a Qrgb. More... | |
virtual casacore::uInt | nColors () const |
Initial size of the colortable. More... | |
virtual casacore::uInt | nSpareColors () const |
Current number of slots usable by colormaps. More... | |
virtual casacore::Bool | resize (casacore::uInt newSize) |
Resize the hardware colormap. More... | |
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) |
Called by corresp. More... | |
virtual void | mapToColor (const Colormap *map, casacore::Array< casacore::uInt > &outArray, const casacore::Array< casacore::uInt > &inArray, casacore::Bool rangeCheck=true) const |
Translate casacore::Array of colormap indices into graphics platform's colors. More... | |
virtual void | mapToColor3 (casacore::Array< casacore::uLong > &, const casacore::Array< casacore::uInt > &, const casacore::Array< casacore::uInt > &, const casacore::Array< casacore::uInt > &) |
ColorModels are implemented for QtPixelCanvas. More... | |
virtual void | mapToColor (const Colormap *, casacore::Array< casacore::uChar > &, const casacore::Array< casacore::uChar > &, casacore::Bool=true) const |
map [0,N-1] into colorpixels, where N is the current colormap size The values are returned as unsigned integers in their respective array. More... | |
virtual void | mapToColor (const Colormap *, casacore::Array< casacore::uShort > &, const casacore::Array< casacore::uShort > &, casacore::Bool=true) const |
virtual void | mapToColor (const Colormap *, casacore::Array< casacore::uLong > &, const casacore::Array< casacore::uLong > &, casacore::Bool=true) const |
virtual void | mapToColor (const Colormap *, casacore::Array< casacore::uChar > &, casacore::Bool=true) const |
same as above except the matrix is operated on in place. More... | |
virtual void | mapToColor (const Colormap *, casacore::Array< casacore::uShort > &, casacore::Bool=true) const |
virtual void | mapToColor (const Colormap *, casacore::Array< casacore::uInt > &, casacore::Bool=true) const |
virtual void | mapToColor (const Colormap *, casacore::Array< casacore::uLong > &, casacore::Bool=true) const |
virtual void | mapToColor3 (casacore::Array< casacore::uLong > &, const casacore::Array< casacore::Float > &, const casacore::Array< casacore::Float > &, const casacore::Array< casacore::Float > &) |
Functions for dealing with multi-channel mapping. More... | |
virtual void | mapToColor3 (casacore::Array< casacore::uLong > &, const casacore::Array< casacore::Double > &, const casacore::Array< casacore::Double > &, const casacore::Array< casacore::Double > &) |
virtual void | mapToColor3 (casacore::Array< casacore::uLong > &, const casacore::Array< casacore::uShort > &, const casacore::Array< casacore::uShort > &, const casacore::Array< casacore::uShort > &) |
This one maps values between 0 and the integer maximum value for each channel into a single output image suitable for PixelCanvas::drawImage(). More... | |
virtual casacore::Bool | colorSpaceMap (Display::ColorModel, const casacore::Array< casacore::Float > &, const casacore::Array< casacore::Float > &, const casacore::Array< casacore::Float > &, casacore::Array< casacore::Float > &, casacore::Array< casacore::Float > &, casacore::Array< casacore::Float > &) |
(Multichannel Color) Transform arrays from the passed color model into the colormodel of the XPCCT. More... | |
Public Member Functions inherited from casa::PixelCanvasColorTable | |
virtual | ~PixelCanvasColorTable () |
Virtual destructor. More... | |
void | addResizeCallback (PixelCanvasColorTableResizeCB cb, void *clientData) |
Add and remove resize callbacks PixelCanvasColorTableResizeCB is of type: void (*)(class PixelCanvasColorTable * pcctbl, casacore::uInt newSize, void * clientData, Display::RefreshReason reason) More... | |
void | removeResizeCallback (PixelCanvasColorTableResizeCB cb, void *clientData) |
void | doResizeCallbacks (const Display::RefreshReason &reason=Display::ColorTableChange) |
casacore::Function that issues resize callbacks More... | |
void | registerColormap (Colormap *cmap, casacore::Float weight=1.0) |
Register a colormap to be managed by the pixel canvas' color table. More... | |
void | registerColormap (Colormap *cmap, Colormap *cmapToReplace) |
Register the cmap Colormap on the PixelCanvasColorTable, replacing the cmapToReplace Colormap if possible. More... | |
void | unregisterColormap (Colormap *cmap) |
Unregister a data colormap reference previously added. More... | |
casacore::uInt | getColormapSize (const Colormap *cmap) const |
Return the allocation size of some Colormap. More... | |
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::Bool | member (const Colormap *cmap) const |
Return whether or not a data colormap is used by this pixel canvas. More... | |
void | setDefaultColormap (const Colormap *map) |
Return the default map. More... | |
ColormapManager & | colormapManager () |
Return the colormapManager used by this PCCT. More... | |
void | registerPixelCanvas (const class PixelCanvas *pc) |
void | doRefreshCallbacks () |
*Colormap * | defaultColormap () |
Protected Member Functions | |
casacore::Int | clrByte (casacore::Float f) |
(could move X11 version down to base class and use that – it has no X11 dependencies...) More... | |
Protected Member Functions inherited from casa::PixelCanvasColorTable | |
casacore::uInt | getColormapOffset (const Colormap *map) const |
return the offset of a particular colormap. More... | |
PixelCanvasColorTable () | |
Abstract base class. More... | |
Private Attributes | |
casacore::Vector< casacore::uInt > | maps_ |
translate color component in the range [0., 1. More... | |
casacore::uInt | size_ |
actual storage for the color slots. More... | |
Definition at line 21 of file QtPCColorTable.h.
casa::QtPCColorTable::QtPCColorTable | ( | ) |
|
inlinevirtual |
Definition at line 26 of file QtPCColorTable.h.
|
inlineprotected |
(could move X11 version down to base class and use that – it has no X11 dependencies...)
Definition at line 163 of file QtPCColorTable.h.
References casacore::max(), and casacore::min().
|
inlinevirtual |
The non-indexed 'true' color depth that Qt supports, and the number of bits in a Qrgb.
This includes room for the alpha channel (yay). FYI, component byte order in Qrgb (most- to least-significant) is A-R-G-B.
Implements casa::PixelCanvasColorTable.
Definition at line 53 of file QtPCColorTable.h.
References casa::Display::Index.
|
inlinevirtual |
(Multichannel Color) Transform arrays from the passed color model into the colormodel of the XPCCT.
Does nothing if colorModel is Display::Index. It is assumed that input arrays are in the range of [0,1]
Implements casa::PixelCanvasColorTable.
Definition at line 149 of file QtPCColorTable.h.
|
inlinevirtual |
Return the depth of the map in bits.
Implements casa::PixelCanvasColorTable.
Definition at line 45 of file QtPCColorTable.h.
|
virtual |
Called by corresp.
ColormapManager to actually fill color slots for the Colormaps. r,g,b ahould be in range [0,1].
Implements casa::PixelCanvasColorTable.
|
virtual |
Translate casacore::Array of colormap indices into graphics platform's colors.
Implements casa::PixelCanvasColorTable.
|
inlinevirtual |
map [0,N-1] into colorpixels, where N is the current colormap size The values are returned as unsigned integers in their respective array.
Tip: The choice of what type to use should be guided by the number of graphics bitplanes available; For most systems with 8-bit color, casacore::uChar is optimal; Some systems with 12 bits per pixel with an alpha channel may require using the uLong;
Warning: casacore::uChar type may not have enough bits to hold the pixel index on some high-end graphics systems
Warning: casacore::uShort type may not have enough bits to hold the pixel index on some high-end graphics systems
Implements casa::PixelCanvasColorTable.
Definition at line 104 of file QtPCColorTable.h.
|
inlinevirtual |
Implements casa::PixelCanvasColorTable.
Definition at line 109 of file QtPCColorTable.h.
|
inlinevirtual |
Implements casa::PixelCanvasColorTable.
Definition at line 114 of file QtPCColorTable.h.
|
inlinevirtual |
same as above except the matrix is operated on in place.
Only unsigned values make sense here. I don't really know what to include here. Maybe ask the code cop.
Implements casa::PixelCanvasColorTable.
Definition at line 119 of file QtPCColorTable.h.
|
inlinevirtual |
Implements casa::PixelCanvasColorTable.
Definition at line 123 of file QtPCColorTable.h.
|
inlinevirtual |
Implements casa::PixelCanvasColorTable.
Definition at line 127 of file QtPCColorTable.h.
|
inlinevirtual |
Implements casa::PixelCanvasColorTable.
Definition at line 131 of file QtPCColorTable.h.
|
inlinevirtual |
ColorModels are implemented for QtPixelCanvas.
Implements casa::PixelCanvasColorTable.
Definition at line 97 of file QtPCColorTable.h.
|
inlinevirtual |
Functions for dealing with multi-channel mapping.
(Multichannel Color) Merge separate channel data into an output image. This function maps floating values between 0 and 1 into a output image suitable for PixelCanvas::drawImage().
Implements casa::PixelCanvasColorTable.
Definition at line 135 of file QtPCColorTable.h.
|
inlinevirtual |
Implements casa::PixelCanvasColorTable.
Definition at line 139 of file QtPCColorTable.h.
|
inlinevirtual |
This one maps values between 0 and the integer maximum value for each channel into a single output image suitable for PixelCanvas::drawImage().
Implements casa::PixelCanvasColorTable.
Definition at line 144 of file QtPCColorTable.h.
|
inlinevirtual |
Return the number of colors per component used in the map.
Fails for non-HSV/RGB modes.
Implements casa::PixelCanvasColorTable.
Definition at line 39 of file QtPCColorTable.h.
|
inlinevirtual |
Initial size of the colortable.
Implements casa::PixelCanvasColorTable.
Definition at line 66 of file QtPCColorTable.h.
References size_.
|
inlinevirtual |
Current number of slots usable by colormaps.
can be expanded at runtime up to MAX_QTPCCT_SIZE.
Implements casa::PixelCanvasColorTable.
Definition at line 72 of file QtPCColorTable.h.
References MAX_QTPCCT_SIZE, and size_.
|
inlinevirtual |
Implements casa::PixelCanvasColorTable.
Definition at line 35 of file QtPCColorTable.h.
|
virtual |
Resize the hardware colormap.
Implements casa::PixelCanvasColorTable.
|
inlinevirtual |
Is the hardware colormap resizeable? ie.
is it write-only? Default is to return true, and derived classes should generally override this function.
Reimplemented from casa::PixelCanvasColorTable.
Definition at line 31 of file QtPCColorTable.h.
|
private |
translate color component in the range [0., 1.
] to clrByte, with 0 <= clrByte < 256
Definition at line 171 of file QtPCColorTable.h.
|
private |
actual storage for the color slots.
Definition at line 173 of file QtPCColorTable.h.
Referenced by nColors(), and nSpareColors().