Structural deformable models
|
#include <Image.h>
Public Types | |
typedef std::vector< T >::iterator | iterator |
typedef std::vector< T >::const_iterator | const_iterator |
Public Member Functions | |
Image () | |
Image (int sx, int sy) | |
Image (int sx, int sy, const T &value) | |
Image (const Image< T > &rhs) | |
virtual | ~Image () |
void | freeImage () |
void | setSize (int nx, int ny) |
void | setSize (int nx, int ny, const T &value) |
template<class S > | |
bool | sameSize (const Image< S > &rhs) |
const T * | getData () const |
T * | getData () |
int | getSizeX () const |
int | getSizeY () const |
int | getSize () const |
Image< T > & | operator= (const Image< T > &rhs) |
Image< T > & | operator= (const T &rhs) |
Image< T > & | copy (const Image< T > &rhs) |
Image< T > & | copy (const T *rhs) |
int | getIndex (int x, int y) const |
int | getBoundedIndex (int x, int y) const |
const T | getPixel (int x, int y) const |
void | setPixel (int x, int y, const T &value) |
const T | findMax () const |
calculate maximum More... | |
const T | findMin () const |
calculate minimum More... | |
const T | norm () const |
double | sum () const |
Image< T > & | operator*= (const T &v) |
Image< T > & | operator/= (const T &v) |
Image< T > & | operator+= (const T &v) |
Image< T > & | operator-= (const T &v) |
Image< T > & | operator*= (const Image< T > &rhs) |
Image< T > & | operator/= (const Image< T > &rhs) |
Image< T > & | operator+= (const Image< T > &rhs) |
Image< T > & | operator-= (const Image< T > &rhs) |
void | addLine (int x0, int y0, int x1, int y1, const T &value) |
Image< T > & | unsetNAN (double val=0) |
Image< T > & | threshold (const T &th, double binarize=0) |
Image< T > & | findMaxima (int env=3) |
template<class S > | |
Image< T > & | convertFrom (const Image< S > &rhs) |
const Image< T > | mirror (bool horiz=true, bool vert=true) const |
template<class S > | |
const Image< T > | convolve (const Image< S > &kernel) const |
Image< T > & | interleave (const std::vector< Image< T > > &img, dword ncomp=0) |
Image< T > | scaleBy (float s) |
Image< T > | scaleBy (float sx, float sy) |
bool | initialized () const |
bool | writePPM (const std::string &fname) const |
bool | writePPMstream (std::ostream &os) const |
bool | readPPM (const std::string &fname) |
bool | readPPMstream (std::istream &is) |
void | insert (const Image< T > &ii, const int x=0, const int y=0) |
Image< T > & | zeroPad (int brd, const T &col=0, bool smoothbrd=false) |
Protected Attributes | |
int | sizeX |
int | sizeY |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Image< T > &rhs) |
std::istream & | operator>> (std::istream &is, Image< T > &rhs) |
typedef std::vector<T>::const_iterator Image< T >::const_iterator |
Definition at line 249 of file Image.h.
References Image< T >::sizeX, and Image< T >::sizeY.
Referenced by Image< Point2D >::Image().
void Image< T >::addLine | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
const T & | value | ||
) |
Definition at line 441 of file Image.h.
References absint(), Image< T >::getData(), and Image< T >::sizeX.
Referenced by Image< Point2D >::setPixel().
|
inline |
|
inline |
Definition at line 287 of file Image.h.
References Image< T >::getSizeX(), Image< T >::getSizeY(), Image< T >::sizeX, and Image< T >::sizeY.
Referenced by Image< Point2D >::getSize(), and Image< T >::operator=().
const T Image< T >::findMax | ( | ) | const |
calculate maximum
Definition at line 322 of file Image.h.
References Image< T >::getData(), and Image< T >::getSize().
Referenced by Image< Point2D >::setPixel().
Definition at line 532 of file Image.h.
References Image< T >::getData(), Image< T >::sizeX, and Image< T >::sizeY.
Referenced by Image< Point2D >::setPixel().
const T Image< T >::findMin | ( | ) | const |
calculate minimum
Definition at line 333 of file Image.h.
References Image< T >::getData(), and Image< T >::getSize().
Referenced by Image< Point2D >::setPixel().
void Image< T >::freeImage | ( | ) |
Definition at line 261 of file Image.h.
References Image< T >::setSize(), Image< T >::sizeX, and Image< T >::sizeY.
Referenced by Image< Point2D >::~Image().
|
inline |
|
inline |
Definition at line 39 of file Image.h.
Referenced by Image< T >::addLine(), Image< Point2D >::convertFrom(), Image< Point2D >::convolve(), copyFXImage2Image(), copyImage2FXImage(), create2DGaussian(), Dataset::drawImage(), Image< T >::findMax(), Image< T >::findMaxima(), Image< T >::findMin(), Image< Point2D >::interleave(), makeNoiseImage(), Image< T >::norm(), Image< T >::operator*=(), Image< T >::operator+=(), Image< T >::operator-=(), Image< T >::operator/=(), GLImage::setImage(), Image< T >::sum(), Image< T >::threshold(), and Image< T >::unsetNAN().
|
inline |
|
inline |
Definition at line 51 of file Image.h.
Referenced by Image< Point2D >::getPixel(), Image< T >::insert(), and Image< Point2D >::setPixel().
|
inline |
|
inline |
Definition at line 44 of file Image.h.
Referenced by Image< Point2D >::convertFrom(), Image< T >::findMax(), Image< T >::findMin(), Image< T >::norm(), Image< T >::operator*=(), Image< T >::operator+=(), Image< T >::operator-=(), Image< T >::operator/=(), Image< T >::sum(), Image< T >::threshold(), Image< T >::unsetNAN(), and SmoothIntensitySensor::updateScale().
|
inline |
Definition at line 42 of file Image.h.
Referenced by PPSensor::calcAllValues(), Image< Point2D >::convertFrom(), Image< Point2D >::convolve(), Image< T >::copy(), copyImage2FXImage(), create2DGaussian(), Dataset::drawImage(), PPSensor::fitSheets(), Image< T >::insert(), Image< Point2D >::interleave(), Dataset::load(), makeNoiseImage(), Image< Point2D >::mirror(), Image< Point2D >::sameSize(), Image< Point2D >::scaleBy(), GLImage::setImage(), and Image< T >::zeroPad().
|
inline |
Definition at line 43 of file Image.h.
Referenced by PPSensor::calcAllValues(), Image< Point2D >::convertFrom(), Image< Point2D >::convolve(), Image< T >::copy(), copyImage2FXImage(), create2DGaussian(), Dataset::drawImage(), PPSensor::fitSheets(), Image< T >::insert(), Image< Point2D >::interleave(), Dataset::load(), makeNoiseImage(), Image< Point2D >::mirror(), Image< Point2D >::sameSize(), Image< Point2D >::scaleBy(), GLImage::setImage(), and Image< T >::zeroPad().
|
inline |
void Image< T >::insert | ( | const Image< T > & | ii, |
const int | x = 0 , |
||
const int | y = 0 |
||
) |
Definition at line 568 of file Image.h.
References Image< T >::getIndex(), Image< T >::getSizeX(), and Image< T >::getSizeY().
Referenced by Dataset::load(), GLImage::setImage(), and Image< T >::zeroPad().
|
inline |
|
inline |
Definition at line 101 of file Image.h.
const T Image< T >::norm | ( | ) | const |
calculate 2-norm of 2D array internally using double, so only works on scalar data types
Definition at line 344 of file Image.h.
References Image< T >::getData(), Image< T >::getSize(), dmutil::sqrt(), and Image< T >::sum().
Referenced by Image< Point2D >::setPixel().
Definition at line 365 of file Image.h.
References Image< T >::getData(), and Image< T >::getSize().
Referenced by Image< Point2D >::setPixel().
Definition at line 401 of file Image.h.
References Image< T >::getData(), and Image< T >::getSize().
Definition at line 383 of file Image.h.
References Image< T >::getData(), and Image< T >::getSize().
Referenced by Image< Point2D >::setPixel().
Definition at line 421 of file Image.h.
References Image< T >::getData(), and Image< T >::getSize().
Definition at line 392 of file Image.h.
References Image< T >::getData(), and Image< T >::getSize().
Referenced by Image< Point2D >::setPixel().
Definition at line 431 of file Image.h.
References Image< T >::getData(), and Image< T >::getSize().
Definition at line 374 of file Image.h.
References Image< T >::getData(), and Image< T >::getSize().
Referenced by Image< Point2D >::setPixel().
Definition at line 411 of file Image.h.
References Image< T >::getData(), and Image< T >::getSize().
Definition at line 305 of file Image.h.
References Image< T >::copy().
Referenced by Image< Point2D >::getSize(), and Image< T >::Image().
|
inline |
|
inline |
Definition at line 172 of file Image.h.
|
inline |
Definition at line 62 of file Image.h.
Referenced by Sensor::createSensorImage(), and Image< Point2D >::mirror().
void Image< T >::setSize | ( | int | nx, |
int | ny | ||
) |
Definition at line 268 of file Image.h.
References Image< T >::sizeX, and Image< T >::sizeY.
Referenced by Image< Point2D >::convertFrom(), copyFXImage2Image(), PPSensor::fitSheets(), Image< T >::freeImage(), Image< Point2D >::interleave(), ImageWindow::onLoadImage(), and Image< Point2D >::~Image().
void Image< T >::setSize | ( | int | nx, |
int | ny, | ||
const T & | value | ||
) |
double Image< T >::sum | ( | ) | const |
Definition at line 355 of file Image.h.
References Image< T >::getData(), and Image< T >::getSize().
Referenced by Dataset::load(), Image< T >::norm(), and Image< Point2D >::setPixel().
Definition at line 512 of file Image.h.
References Image< T >::getData(), and Image< T >::getSize().
Referenced by Image< Point2D >::setPixel().
Definition at line 523 of file Image.h.
References Image< T >::getData(), and Image< T >::getSize().
Referenced by ImageWindow::selectSensor(), and Image< Point2D >::setPixel().
|
inline |
|
inline |
Image< T > & Image< T >::zeroPad | ( | int | brd, |
const T & | col = 0 , |
||
bool | smoothbrd = false |
||
) |
Definition at line 586 of file Image.h.
References Image< T >::convolve(), Image< T >::getSizeX(), Image< T >::getSizeY(), and Image< T >::insert().
|
friend |
|
friend |
|
protected |
Definition at line 245 of file Image.h.
Referenced by Image< T >::addLine(), Image< Point2D >::convolve(), Image< T >::copy(), Image< T >::findMaxima(), Image< T >::freeImage(), Image< Point2D >::getBoundedIndex(), Image< Point2D >::getIndex(), Image< Point2D >::getSizeX(), Image< T >::Image(), Image< T >::operator=(), Image< Point2D >::readPPMstream(), Image< Point2D >::sameSize(), Image< Point2D >::scaleBy(), Image< T >::setSize(), and Image< Point2D >::writePPMstream().
|
protected |
Definition at line 245 of file Image.h.
Referenced by Image< Point2D >::convolve(), Image< T >::copy(), Image< T >::findMaxima(), Image< T >::freeImage(), Image< Point2D >::getBoundedIndex(), Image< Point2D >::getSizeY(), Image< T >::Image(), Image< T >::operator=(), Image< Point2D >::readPPMstream(), Image< Point2D >::sameSize(), Image< Point2D >::scaleBy(), Image< T >::setSize(), and Image< Point2D >::writePPMstream().