This class manipulates images. More...
#include "../include/ImageMath.h"
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) |
This class manipulates images.
| int ImageMath::blank | ( | Image & | img, | |
| EarthPoint & | ept1, | |||
| EarthPoint & | ept2 | |||
| ) | [static] |
Blanks area of image outside of lat lon range
| 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().
Clips an image
| image | Input image to clip | |
| box | Box to clip to |
| 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().
Masks the image if the values are greater than the values in the grid
References WXP::Grid::getValue(), WXP::Const::MISS, WXP::GridPoint::set(), WXP::Image::setPixel(), and WXP::Image::tran().
Masks the image if the values are less than the values in the grid
References WXP::Grid::getValue(), WXP::Const::MISS, WXP::GridPoint::set(), WXP::Image::setPixel(), and WXP::Image::tran().
Merges the two image
| bimg | Base image | |
| img | Image to merge |
References WXP::Domain::getDx(), WXP::Domain::getDy(), WXP::Image::getLimits(), WXP::Domain::getNx(), WXP::Domain::getNy(), WXP::Image::getPixel(), WXP::Image::setPixel(), WXP::Image::tran(), WXP::Point::x, and WXP::Point::y.
Remaps an image to a new domain
| image | Input image to remap | |
| new_domain | New domain to map image into |
| 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().
Converts an image from direct color to gray scale
| image | Input direct color image |
| 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().
Converts an image from direct color to index color
| image | Input direct color image | |
| rdepth | New depth |
| 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().
Converts an image from index color to direct color
| image | Input index color image | |
| rdepth | New depth |
| 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().
1.6.1