rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvIntervalColorModel Class Reference

This class implements a color model that performs a linear interpolation to compute the pixel colors with intervals specified by the user. More...

#include <ilviews/maps/rendering/cmodel.h>

Inheritance diagram for IlvIntervalColorModel:
IlvMapColorModel

List of all members.

Public Member Functions

 IlvIntervalColorModel (const IlvIntervalColorModel &model)
 Creates a new instance of IlvIntervalColorModel by copying the specified color model.
 IlvIntervalColorModel (const IlUChar *redMap, const IlUChar *greenMap, const IlUChar *blueMap, IlUInt colorCount, const IlInt *limits, IlUInt limitCount)
 Creates an instance of IlvIntervalColorModel.
virtual IlvMapColorModelcopy () const
 Returns a copy of the object.
virtual IlUChar getAlpha (IlInt pixel) const
 Returns the Alpha component for the specified pixel value.
virtual IlUChar getBlue (IlInt pixel) const
 Returns the Blue component for the specified pixel value.
IlUInt getColors (IlUChar *&redmap, IlUChar *&greenmap, IlUChar *&bluemap) const
 Returns the color array.
virtual IlUChar getGreen (IlInt pixel) const
 Returns the Green component for the specified pixel value.
IlUInt getLimits (IlInt *&limits) const
 Returns the limit array.
virtual IlUChar getRed (IlInt pixel) const
 Returns the Red component for the specified pixel value.
IlBoolean isPersistent () const
 Returns IlTrue if this color model is persistent.
virtual void write (IlvOutputFile &) const
 Writes the color model to an IlvOutputFile.

Static Public Member Functions

static IlvIntervalColorModelMakeElevationColorModel ()
 Returns a predefined interval color model with values adapted to renderer elevation rasters.

Detailed Description

This class implements a color model that performs a linear interpolation to compute the pixel colors with intervals specified by the user.

This color model can be used to create images from an IlvMapRaster.

See also:
IlvDefaultRasterRenderer Library: ilvmaps

Constructor & Destructor Documentation

IlvIntervalColorModel::IlvIntervalColorModel ( const IlUChar redMap,
const IlUChar greenMap,
const IlUChar blueMap,
IlUInt  colorCount,
const IlInt limits,
IlUInt  limitCount 
)

Creates an instance of IlvIntervalColorModel.

Parameters:
redMap The value of chars indicating the red component of the colors for the interval limits. The value can be between 0 and 255. The first value of the array is for MinInt and the last value is for MaxInt. Intermediate limits are specified in the limits array.
greenMap The value of chars indicating the green component of the colors for the interval limits. The value can be between 0 and 255. The first value of the array is for MinInt and the last value is for MaxInt. Intermediate limits are specified in the limits array.
blueMap The value of chars indicating the blue component of the colors for the interval limits. The value can be between 0 and 255. The first value of the array is for MinInt and the last value is for MaxInt. Intermediate limits are specified in the limits array.
colorCount The size of the arrays redMap, greenMap and blueMap.
limits The values of the interval limits.
limitCount The size of the array limits.
Warning:
[note] The number of limits must be colorCount - 2.
IlvIntervalColorModel::IlvIntervalColorModel ( const IlvIntervalColorModel model  ) 

Creates a new instance of IlvIntervalColorModel by copying the specified color model.

Parameters:
model The model to be copied.

Member Function Documentation

virtual IlvMapColorModel* IlvIntervalColorModel::copy (  )  const [virtual]

Returns a copy of the object.

Returns:
The copy of the object.

Implements IlvMapColorModel.

virtual IlUChar IlvIntervalColorModel::getAlpha ( IlInt  pixel  )  const [virtual]

Returns the Alpha component for the specified pixel value.

Parameters:
pixel The pixel value.
Returns:
The Alpha component for the specified pixel value.

Implements IlvMapColorModel.

virtual IlUChar IlvIntervalColorModel::getBlue ( IlInt  pixel  )  const [virtual]

Returns the Blue component for the specified pixel value.

Parameters:
pixel The pixel value.
Returns:
The Blue component for the specified pixel value.

Implements IlvMapColorModel.

IlUInt IlvIntervalColorModel::getColors ( IlUChar *&  redmap,
IlUChar *&  greenmap,
IlUChar *&  bluemap 
) const

Returns the color array.

Parameters:
redmap Returns a pointer to the internal array of red map.
greenmap Returns a pointer to the internal array of green map.
bluemap Returns a pointer to the internal array of blue map.
Returns:
The number of colors.
virtual IlUChar IlvIntervalColorModel::getGreen ( IlInt  pixel  )  const [virtual]

Returns the Green component for the specified pixel value.

Parameters:
pixel The pixel value.
Returns:
The Green component for the specified pixel value.

Implements IlvMapColorModel.

IlUInt IlvIntervalColorModel::getLimits ( IlInt *&  limits  )  const

Returns the limit array.

Parameters:
limits Returns a pointer to the internal array of limits.
Returns:
The number of limits.
virtual IlUChar IlvIntervalColorModel::getRed ( IlInt  pixel  )  const [virtual]

Returns the Red component for the specified pixel value.

Parameters:
pixel The pixel value.
Returns:
The Red component for the specified pixel value.

Implements IlvMapColorModel.

IlBoolean IlvIntervalColorModel::isPersistent (  )  const [virtual]

Returns IlTrue if this color model is persistent.

Returns:
IlTrue.

Reimplemented from IlvMapColorModel.

static IlvIntervalColorModel* IlvIntervalColorModel::MakeElevationColorModel (  )  [static]

Returns a predefined interval color model with values adapted to renderer elevation rasters.

Returns:
An IlvIntervalColorModel object that must be deleted by the user.
virtual void IlvIntervalColorModel::write ( IlvOutputFile file  )  const [virtual]

Writes the color model to an IlvOutputFile.

Parameters:
file The output file.

Implements IlvMapColorModel.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.