WXP::ImageMath Class Reference

This class manipulates images. More...

#include "../include/ImageMath.h"

List of all members.

Static Public Member Functions

static int clip (Image &image, GeomBox &box, Image &new_image)
static int remap (Image &image, Domain &domain, Image &new_image)
static int toIndex (Image &image, int rdepth, Image &new_image)
static int toIndex (Image &image, Image &new_image)
static int toGray (Image &image, Image &new_image)
static int toTrueColor (Image &image, int rdepth, Image &new_image)
static int toTrueColor (Image &image, Image &new_image)
static int compressColor (Image &image)
static int merge (Image &oimg, Image &img)
static int blank (Image &img, EarthPoint &ept1, EarthPoint &ept2)
static int blank (Image &img, float angle)
static int maskLesser (Image &oimg, Image &img, Grid &grid)
static int maskGreater (Image &oimg, Image &img, Grid &grid)

Detailed Description

This class manipulates images.

Author:
Dan Vietor

Member Function Documentation

int ImageMath::blank ( Image img,
EarthPoint ept1,
EarthPoint ept2 
) [static]

Blanks area of image outside of lat lon range

Parameters:
img Base image
ept1 Upper left corner
ept2 Lower right corner

References WXP::EarthPoint::lat, WXP::EarthPoint::lon, WXP::GridPoint::set(), WXP::Image::setPixel(), and WXP::Image::tran().

int ImageMath::clip ( Image image,
GeomBox box,
Image new_image 
) [static]

Clips an image

Parameters:
image Input image to clip
box Box to clip to
Return values:
new_image Output image

References WXP::Image::allocData(), WXP::DomainVal::clat, WXP::DomainVal::clon, WXP::Image::getPixel(), WXP::EarthPoint::lat, WXP::EarthPoint::lon, WXP::DomainVal::nx, WXP::DomainVal::ny, WXP::GridPoint::set(), WXP::Image::setPixel(), and WXP::Image::tran().

Referenced by WXP::ImagePlot::drawImage().

int ImageMath::maskGreater ( Image oimg,
Image img,
Grid grid 
) [static]

Masks the image if the values are greater than the values in the grid

Parameters:
oimg Output image
img Image to change
grid Grid to use as a mask

References WXP::Grid::getValue(), WXP::Const::MISS, WXP::GridPoint::set(), WXP::Image::setPixel(), and WXP::Image::tran().

int ImageMath::maskLesser ( Image oimg,
Image img,
Grid grid 
) [static]

Masks the image if the values are less than the values in the grid

Parameters:
oimg Output image
img Image to change
grid Grid to use as a mask

References WXP::Grid::getValue(), WXP::Const::MISS, WXP::GridPoint::set(), WXP::Image::setPixel(), and WXP::Image::tran().

int ImageMath::merge ( Image bimg,
Image img 
) [static]
int ImageMath::remap ( Image image,
Domain new_domain,
Image new_image 
) [static]

Remaps an image to a new domain

Parameters:
image Input image to remap
new_domain New domain to map image into
Return values:
new_image Output image

References WXP::Image::allocData(), WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::Domain::get(), WXP::Image::getLimits(), WXP::Image::getPixel(), WXP::Domain::getProj(), WXP::Const::MISS, WXP::DomainVal::nx, WXP::DomainVal::ny, WXP::Image::setPixel(), WXP::Image::tran(), WXP::Point::x, and WXP::Point::y.

Referenced by WXP::ImagePlot::drawImage().

int ImageMath::toGray ( Image image,
Image new_image 
) [static]

Converts an image from direct color to gray scale

Parameters:
image Input direct color image
Return values:
new_image Output image

References WXP::Image::allocColors(), WXP::Image::allocData(), WXP::ImageColor::b, WXP::RGB::blu, WXP::ImageColor::g, WXP::RGB::grn, WXP::Image::init(), WXP::ImageColor::r, WXP::RGB::red, and WXP::Image::setPixel().

int ImageMath::toIndex ( Image image,
int  rdepth,
Image new_image 
) [static]

Converts an image from direct color to index color

Parameters:
image Input direct color image
rdepth New depth
Return values:
new_image Output image

References WXP::Image::allocColors(), WXP::Image::allocData(), WXP::ImageColor::b, WXP::RGB::blu, WXP::ImageColor::g, WXP::RGB::grn, WXP::Image::init(), WXP::ImageColor::r, WXP::RGB::red, and WXP::Image::setPixel().

Referenced by WXP::PngFile::write(), and WXP::GifFile::write().

int ImageMath::toTrueColor ( Image image,
int  rdepth,
Image new_image 
) [static]

Converts an image from index color to direct color

Parameters:
image Input index color image
rdepth New depth
Return values:
new_image Output image

References WXP::Image::allocData(), WXP::ImageColor::b, WXP::ImageColor::g, WXP::Image::getPixel(), WXP::Image::getVal(), WXP::Image::init(), WXP::ImageColor::r, and WXP::Image::setPixel().


The documentation for this class was generated from the following files:

Generated on 8 Jan 2010 for WXP C++ Library by  doxygen 1.6.1