-
class
GrayRaster
: public OverlayRaster
(Return to index)
-
gray-level image with arbitary numeric values.
Type:
Base Classes:
Derived Classes
Include file:
OverlayUnidraw/grayraster.h
Description: pixel type.
Public:
- virtual OverlayRaster*
addgrayramp ( CopyString& cmd, IntCoord x, IntCoord y )
embed gray-level ramp in raster at 'x', 'y', and return 'cmd' string
to reproduce this effect after save/restore.
- virtual OverlayRaster*
addgrayramp ( CopyString& cmd, RampAlignment = R_LT )
embed gray-level ramp in raster at given alignment, and return 'cmd'
string to reproduce this effect after save/restore.
- virtual boolean
gray_flag ()
- virtual boolean
read (istream& in, boolean gray=false)
read raster from istream.
- void
set_minmax (double minval, double maxval, boolean fixminmax = false)
set 'minval' and 'maxval' used for flush().
- boolean
top2bottom () const
orientation of pixel rows. Default is true.
- void
top2bottom (boolean t2b)
set orientation of pixel rows.
- virtual boolean
write (ostream& out, boolean gray=false)
Protected:
- unsigned char*
_data
- double
_maxval
cached maximum pixel value
- int
_minmax_set
true when _minval,_maxval computed
- double
_minval
cached minimum pixel value
- unsigned char*
_pixel_map
map from intensity-byte to colormap-byte
- boolean
_t2b
- AttributeValue::ValueType
_type
- void
gainbias_minmax (double& gain, double& bias, double& dmin, double& dmax) const
determine 'dmin' and 'dmax', then compute 'gain' and 'bias' for
mapping to 0 to 255.
- virtual boolean
grayraster ()
- void
init (AttributeValue::ValueType type =AttributeValue::UCharType, void* data=nil)
initialize raster of 'type' with optional 'data'.
- unsigned char
ipeek (unsigned long x, unsigned long y)
- void
ipoke (unsigned long x, unsigned long y, int byte)
- virtual void
logscale ( ColorIntensity mingray, ColorIntensity maxgray )
immediate-mode logarithmic scaling.
- virtual void
paintgrayramp ( IntCoord left, IntCoord bottom, unsigned width, unsigned height, boolean horiz )
immediate-mode grayramp embedding.
- virtual OverlayRaster*
pseudocolor ( ColorIntensity mingray, ColorIntensity maxgray )
immediate-mode pseudocoloring.
- virtual void
scale ( ColorIntensity mingray, ColorIntensity maxgray )
immediate-mode linear scaling.
- void
vpeek (unsigned long x, unsigned long y, AttributeValue&)
- void
vpoke (unsigned long x, unsigned long y, AttributeValue&)
(more documentation)