|
WXP C++ Library Version 6.74.9
|
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 | clip (Image &image, EarthRange &range, Image &new_image) |
| static int | clip (Image &image, EarthPoint &ept, int width, int height, Image &new_image) |
| static int | scale (Image &image, float scale, 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 | toIndex (Image &image, ColorMap &cmap, 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.
|
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().
|
static |
Blanks area of image outside of angle from projection centerpoint
| img | Base image |
| angle | Angle from centerpoint |
References WXP::Calc::earthAngle(), WXP::EarthPoint::lat, WXP::EarthPoint::lon, WXP::Const::MISS, WXP::GridPoint::set(), WXP::EarthPoint::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::GeomBox::height, WXP::EarthPoint::lat, WXP::EarthPoint::lon, WXP::DomainVal::nx, WXP::DomainVal::ny, WXP::GridPoint::set(), WXP::Image::setPixel(), WXP::Image::tran(), WXP::GeomBox::width, WXP::GeomBox::x, and WXP::GeomBox::y.
Referenced by WXP::ImagePlot::drawImage().
|
static |
Compresses the color table in an image
| image | The image to perform compression on |
References WXP::RGB::blu, WXP::Image::getVal(), WXP::RGB::grn, WXP::RGB::red, and WXP::Image::setPixel().
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, WXP::Rect::xmin, WXP::Point::y, and WXP::Rect::ymax.
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, WXP::Rect::xmin, WXP::Point::y, and WXP::Rect::ymax.
Referenced by WXP::ImagePlot::drawImage().
Scales an image
| image | Input image to remap |
| scale | Scale factor <1 = smaller image, >1 = larger image |
| new_image | Output image |
References WXP::Image::allocData(), WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::Image::getLimits(), WXP::Image::getPixel(), WXP::DomainVal::nx, WXP::DomainVal::ny, scale(), and WXP::Image::setPixel().
Referenced by scale().
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. Uses colormap in new image and maps colors in input image to nearest color in colormap.
| image | Input direct color image |
| cmap | Colormap to use in new image |
| new_image | Output image |
References WXP::Image::allocColors(), WXP::Image::allocData(), WXP::ImageColor::b, WXP::RGB::blu, WXP::ImageColor::g, WXP::ColorMap::get(), WXP::ColorMap::getNum(), 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 (depth=8)
| image | Input direct color image |
| new_image | Output image |
References toIndex().
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 toIndex(), WXP::GifFile::write(), WXP::LZWComp::write(), and WXP::PngFile::write().
Converts an image from index color to direct color (depth=24)
| image | Input index color image |
| new_image | Output image |
References toTrueColor().
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().
Referenced by toTrueColor().