#include <ImageCube.h>
The general purpose of ImageCube is to hold a part of an image, but it could hold the whole image. Pixels can be refereced by xyz coordinates relatice to both image and cube.
Definition at line 15 of file ImageCube.h.
Public Member Functions | |
ImageCube (int x1, int y1, int w1, int h1, ImageInterface *theimage) | |
ImageCube (int x1, int y1, int w1, int h1) | |
constructor, creates a cube and sets the size | |
~ImageCube () | |
destructor | |
std::vector< double > * | getValuesOf (int z) |
int z - z index (band or layer) returns the value for layer (band) z | |
double | getValueAtLocal (int x, int y, int z) |
Uses a local reference (i.e. | |
double | getValueAtOverall (int x, int y, int z) |
Location is specified in terms of the original image. | |
ThreeDPoint | getLowestPoint () |
ThreeDPoint | getHighestPoint () |
bool | addBand (std::vector< double > *vals) |
adds a layer to the end of the current "stack" of layers | |
bool | addBand (std::vector< double > *vals, int layernum) |
add a layer in to a specific location | |
bool | addBands (std::vector< double > *vals) |
adds several layers in consecutive order. | |
Protected Attributes | |
ImageInterface * | image |
int | width |
width of the cube | |
int | height |
height of the cube | |
int | layers |
number of layers in the cube | |
ThreeDPoint | lowestPoint |
where (0,0,0) falls in the original image | |
ThreeDPoint | highestPoint |
where the opposite corner falls in original image | |
std::vector< Layer > | theCube |
holds all the layers, effectivly the cube | |
Classes | |
struct | Layer |
Layer - represents an image band. More... | |
struct | Pixel |
Pixel - a pixel. More... | |
struct | ThreeDPoint |
ThreeDPoint - a point in 3d space. More... |
ImageCube::ImageCube | ( | int | x1, | |
int | y1, | |||
int | w1, | |||
int | h1, | |||
ImageInterface * | theimage | |||
) |
Definition at line 3 of file ImageCube.cpp.
References addBands(), ImageInterface::getBands(), ImageInterface::getCubeAllBands(), height, highestPoint, image, layers, lowestPoint, width, ImageCube::ThreeDPoint::x, ImageCube::ThreeDPoint::y, and ImageCube::ThreeDPoint::z.
ImageCube::ImageCube | ( | int | x1, | |
int | y1, | |||
int | w1, | |||
int | h1 | |||
) |
constructor, creates a cube and sets the size
[in] | x1 | int where the lowest corner is in the original image |
[in] | y1 | int where the lowest corner is in the original image |
[in] | w1 | int the width of the cube |
[in] | h1 | int the height of the cube |
Definition at line 24 of file ImageCube.cpp.
References height, highestPoint, layers, lowestPoint, width, ImageCube::ThreeDPoint::x, ImageCube::ThreeDPoint::y, and ImageCube::ThreeDPoint::z.
ImageCube::~ImageCube | ( | ) |
std::vector< double > * ImageCube::getValuesOf | ( | int | z | ) |
int z - z index (band or layer) returns the value for layer (band) z
Definition at line 48 of file ImageCube.cpp.
References theCube.
double ImageCube::getValueAtLocal | ( | int | x, | |
int | y, | |||
int | z | |||
) |
Uses a local reference (i.e.
starts at 0,0).
[in] | x | int x index |
[in] | y | int y index |
[in] | z | int z index |
Definition at line 53 of file ImageCube.cpp.
References theCube, and width.
Referenced by getValueAtOverall().
double ImageCube::getValueAtOverall | ( | int | x, | |
int | y, | |||
int | z | |||
) |
Location is specified in terms of the original image.
[in] | x | int x index |
[in] | y | int y index |
[in] | z | int z index |
Definition at line 74 of file ImageCube.cpp.
References getValueAtLocal(), lowestPoint, ImageCube::ThreeDPoint::x, and ImageCube::ThreeDPoint::y.
Referenced by ImageSelectionCube::getAsString().
ImageCube::ThreeDPoint ImageCube::getLowestPoint | ( | ) |
Definition at line 80 of file ImageCube.cpp.
References lowestPoint.
ImageCube::ThreeDPoint ImageCube::getHighestPoint | ( | ) |
Definition at line 84 of file ImageCube.cpp.
References highestPoint.
bool ImageCube::addBand | ( | std::vector< double > * | vals | ) |
adds a layer to the end of the current "stack" of layers
[in] | vals | std::vector<double> the values to form the layer |
Definition at line 88 of file ImageCube.cpp.
References ImageCube::Layer::layernum, layers, theCube, and ImageCube::Layer::values.
Referenced by addBands().
bool ImageCube::addBand | ( | std::vector< double > * | vals, | |
int | layernum | |||
) |
add a layer in to a specific location
[in] | vals | std::vector<double> the values to form the layer |
[in] | layernum | int the location of the layer |
Definition at line 99 of file ImageCube.cpp.
References ImageCube::Layer::layernum, layers, theCube, and ImageCube::Layer::values.
bool ImageCube::addBands | ( | std::vector< double > * | vals | ) |
adds several layers in consecutive order.
The size of the cube is determined when initialized, so we can determine each layer from the next based on size
[in] | vals | std::vector<double> the values to form the layer |
Definition at line 125 of file ImageCube.cpp.
References addBand(), height, and width.
Referenced by GtoSConverter::getSelectedShapes(), ImageCube(), and ImageCalculator::testDriver().
ImageInterface* ImageCube::image [protected] |
int ImageCube::width [protected] |
width of the cube
Definition at line 43 of file ImageCube.h.
Referenced by addBands(), ImageArithmaticCube::calculate(), getValueAtLocal(), and ImageCube().
int ImageCube::height [protected] |
height of the cube
Definition at line 44 of file ImageCube.h.
Referenced by addBands(), ImageArithmaticCube::calculate(), and ImageCube().
int ImageCube::layers [protected] |
number of layers in the cube
Definition at line 45 of file ImageCube.h.
Referenced by addBand(), ImageArithmaticCube::calculate(), ImageSelectionCube::getAsString(), and ImageCube().
ThreeDPoint ImageCube::lowestPoint [protected] |
where (0,0,0) falls in the original image
Definition at line 46 of file ImageCube.h.
Referenced by getLowestPoint(), getValueAtOverall(), and ImageCube().
ThreeDPoint ImageCube::highestPoint [protected] |
where the opposite corner falls in original image
Definition at line 47 of file ImageCube.h.
Referenced by getHighestPoint(), and ImageCube().
std::vector<Layer> ImageCube::theCube [protected] |
holds all the layers, effectivly the cube
Definition at line 49 of file ImageCube.h.
Referenced by addBand(), ImageArithmaticCube::calculate(), getValueAtLocal(), getValuesOf(), ~ImageCube(), and ImageSelectionCube::~ImageSelectionCube().
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |