#include <PixelArray.h>
PixelProfiles can be added, updated, orobtained through this class. The group of PixelProfiles can also be cleared.
Definition at line 15 of file PixelArray.h.
Public Member Functions | |
PixelArray () | |
~PixelArray () | |
void | clearAll () |
clears all the PixelProfiles leaving an empty PixelArray | |
int | size () |
return the number of PixelProfiles in this PixelArray | |
void | add (int x, int y) |
creates and adds a new Pixel profile with x = x and y = y | |
PixelProfile * | getPixel (int x, int y) |
returns a pointer to the PixelProfile with the input x and y, returns NULL if no matching PixelProfile is found | |
void | addToProfile (int x, int y, double val) |
updates the PixelProfile with input x and y by adding the value val void addToProfile(int x, int y, double val) | |
std::string | getAsString () |
all values from all PixelProfiles are output with each PixelProfile on it's own line. | |
std::string | getAsString (std::string delim) |
same as above, but you can specify the Delimiter std::string getAsString(std::string:delim) std::string:delim - the desired Delimiter | |
std::string | getAsString (std::string delim, std::ofstream &f) |
std::string | runDriverTest () |
runs a driver that creates test PixelProfiles and adds values to them. | |
Protected Attributes | |
std::vector< PixelProfile > | pixels |
the PixelProfiles | |
std::vector< PixelProfile > ::iterator | iter |
a way of navigating |
PixelArray::PixelArray | ( | ) |
PixelArray::~PixelArray | ( | ) |
Definition at line 10 of file PixelArray.cpp.
void PixelArray::clearAll | ( | ) |
clears all the PixelProfiles leaving an empty PixelArray
Definition at line 12 of file PixelArray.cpp.
References pixels.
Referenced by ImageSelectionCube::getAsString().
int PixelArray::size | ( | ) |
return the number of PixelProfiles in this PixelArray
Definition at line 16 of file PixelArray.cpp.
References pixels.
void PixelArray::add | ( | int | x, | |
int | y | |||
) |
creates and adds a new Pixel profile with x = x and y = y
Definition at line 20 of file PixelArray.cpp.
Referenced by ImageSelectionCube::getAsString().
PixelProfile * PixelArray::getPixel | ( | int | x, | |
int | y | |||
) |
returns a pointer to the PixelProfile with the input x and y, returns NULL if no matching PixelProfile is found
Definition at line 32 of file PixelArray.cpp.
Referenced by addToProfile(), ImageSelectionCube::getAsString(), and runDriverTest().
void PixelArray::addToProfile | ( | int | x, | |
int | y, | |||
double | val | |||
) |
updates the PixelProfile with input x and y by adding the value val void addToProfile(int x, int y, double val)
Definition at line 88 of file PixelArray.cpp.
References PixelProfile::add(), and getPixel().
std::string PixelArray::getAsString | ( | ) |
all values from all PixelProfiles are output with each PixelProfile on it's own line.
Individual values in the PixelProfile are separated by ; std::string getAsString() returns a string representation of this PixelArray
Definition at line 94 of file PixelArray.cpp.
References pixels.
Referenced by ImageSelectionCube::getAsString(), and runDriverTest().
std::string PixelArray::getAsString | ( | std::string | delim | ) |
same as above, but you can specify the Delimiter std::string getAsString(std::string:delim) std::string:delim - the desired Delimiter
Definition at line 111 of file PixelArray.cpp.
References pixels.
std::string PixelArray::getAsString | ( | std::string | delim, | |
std::ofstream & | f | |||
) |
Definition at line 127 of file PixelArray.cpp.
References pixels.
std::string PixelArray::runDriverTest | ( | ) |
runs a driver that creates test PixelProfiles and adds values to them.
The returned string is the getAsString() of this test set. std::string runDriverTest()
Definition at line 135 of file PixelArray.cpp.
References getAsString(), and getPixel().
std::vector<PixelProfile> PixelArray::pixels [protected] |
the PixelProfiles
Definition at line 17 of file PixelArray.h.
Referenced by add(), clearAll(), getAsString(), getPixel(), PixelArray(), and size().
std::vector<PixelProfile>::iterator PixelArray::iter [protected] |
a way of navigating
Definition at line 18 of file PixelArray.h.
Referenced by add(), getPixel(), and PixelArray().
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |