#include <Image.h>
Inheritance diagram for Image::
Public Methods | |
Image (char *name="") | |
Image (int w, int h, char *name="") | |
Image (const Image< T > &) | |
virtual | ~Image () |
int | getWidth () const |
int | getHeight () const |
int | getSize () |
char* | getName () |
void | setName (const char *name) |
void | makeImage (int w, int h) |
void | destroyImage () |
T* | getPixels () |
void | setPixels (int w, int h, T *data) |
T | min () |
T | max () |
float | avg () |
float | dev () |
T* | operator[] (int i) |
T& | operator() (int i) |
Image< T >& | operator= (const Image< T > &img) |
int | operator== (const Image< T > &img) |
int | operator!= (const Image< T > &img) |
Image< T >& | operator= (const T val) |
void | clearImage (const T val) |
Image< T >& | operator+= (const T val) |
Image< T >& | operator-= (const T val) |
Image< T >& | operator *= (const T val) |
Image< T >& | operator+= (const Image< T > &img) |
Image< T >& | operator-= (const Image< T > &img) |
Image< T >& | operator *= (const Image< T > &img) |
void | pad (int w, int h, PADDING_TYPE p) |
void | crop (int x1, int y1, int x2, int y2) |
void | makeEvenSized (void) |
void | closeWindow () |
void | readImage (char *name) |
void | writeImage () |
void | writeImage (char *name) |
int | showImage () |
Protected Attributes | |
int | width |
int | height |
T** | pixels |
char | img_name [256] |
test_contrast.cpp, test_conversion.cpp, test_downsampl.cpp, test_hist.cpp, test_image.cpp, test_localop.cpp, test_noise.cpp, test_reflect.cpp, test_rotate.cpp, test_thresh.cpp, test_translate.cpp, test_upsampl.cpp, and test_zoom.cpp.
Definition at line 18 of file Image.h.
|
Creates an image with the specified name without allocating space for the image data. |
|
Creates an image of size |
|
Copy constructor. |
|
Destructor. |
|
Frees the memory allocated to store the image data. Definition at line 56 of file Image.cpp. Referenced by makeImage(), and ~Image().
|
|
Returns the image height.
Definition at line 55 of file Image.h. Referenced by ConnectedComponents(), Contrast(), Convolution(), Dilation(), DistanceTransform(), Downsample(), EdgeKirsch(), EdgePrewitt(), EdgeSobel(), Erosion(), FlatDilation(), FlatErosion(), FourierTransform::FourierTransform(), GradientMap(), LocalOp(), Noise(), Reflect(), Rotate(), Threshold(), Translate(), Upsample(), Watershed(), WaveletTransform::WaveletTransform(), Zoom(), byte2float(), byte2int(), Histogram::equalize(), FourierTransform::fft(), float2byte(), float2int(), FourierTransform::ifft(), int2byte(), int2float(), IntImage::operator=(), FloatImage::operator=(), ByteImage::operator=(), pad(), FourierTransform::showMagnitude(), and FourierTransform::showPhase().
|
|
Returns the image name. Definition at line 61 of file Image.h. Referenced by Downsample(), Threshold(), Upsample(), Zoom(), byte2float(), byte2int(), float2byte(), float2int(), int2byte(), int2float(), IntImage::operator=(), FloatImage::operator=(), and ByteImage::operator=().
|
|
Returns a pointer to the actual image buffer. Definition at line 73 of file Image.h. Referenced by ConnectedComponents(), Convolution(), FourierTransform::fft(), WaveletTransform::fwt(), FourierTransform::ifft(), WaveletTransform::ifwt(), IntImage::operator=(), FloatImage::operator=(), and ByteImage::operator=().
|
|
Returns the image size - Definition at line 58 of file Image.h. Referenced by ByteKernel::ByteKernel(), ConnectedComponents(), Convolution(), Histogram::Histogram(), HitOrMiss(), Magnitude(), Normalize(), Watershed(), avg(), clearImage(), dev(), IntImage::operator &=(), ByteImage::operator &=(), operator *=(), ByteKernel::operator!(), ByteImage::operator!(), operator!=(), operator()(), operator+=(), operator-=(), operator=(), operator==(), IntKernel::operator^(), ByteImage::operator^=(), IntImage::operator|=(), ByteImage::operator|=(), and setPixels().
|
|
Returns the image width.
Definition at line 52 of file Image.h. Referenced by ConnectedComponents(), Contrast(), Convolution(), Dilation(), DistanceTransform(), Downsample(), EdgeKirsch(), EdgePrewitt(), EdgeSobel(), Erosion(), FlatDilation(), FlatErosion(), FourierTransform::FourierTransform(), GradientMap(), LocalOp(), Noise(), Reflect(), Rotate(), Threshold(), Translate(), Upsample(), Watershed(), WaveletTransform::WaveletTransform(), Zoom(), byte2float(), byte2int(), Histogram::equalize(), FourierTransform::fft(), float2byte(), float2int(), FourierTransform::ifft(), int2byte(), int2float(), IntImage::operator=(), FloatImage::operator=(), ByteImage::operator=(), pad(), FourierTransform::showMagnitude(), and FourierTransform::showPhase().
|
|
Allocates a buffer of size Definition at line 78 of file Image.cpp. Referenced by ByteKernel::ByteKernel(), ConnectedComponents(), DistanceTransform(), EdgeKirsch(), EdgePrewitt(), EdgeSobel(), FourierTransform::FourierTransform(), GradientMap(), Watershed(), crop(), makeEvenSized(), pad(), Kernel::readKernelCoeffs(), and setPixels().
|
|
Sets the image name.
Definition at line 73 of file Image.cpp. Referenced by Image(), IntImage::operator=(), operator=(), FloatImage::operator=(), ByteImage::operator=(), readImage(), writeImage(), and ~Image().
|
|
Creates an image buffer of size Definition at line 96 of file Image.cpp. Referenced by Convolution(), Image(), IntKernel::IntKernel(), IntImage::operator=(), operator=(), FloatImage::operator=(), ByteImage::operator=(), and readImage().
|
|
Stores the height of the current image. |
|
Stores the name of the current image. This name is used as a file name when the image is saved on / read from the disk. |
|
The image data is stored in a contiguous block of memory row by row. In order to simplify the access to each row, we built an array that stores pointers to the beginning of each row. The variable pixels stores a pointer this array. In other words, the variable pixels is a pointer to an array of pointers to each row in the current image. In this way, one can access the gray level in row i and column j using one of the following syntax: pixels[i][j] or pixels[0][i * width + j]. |
|
Stores the width of the current image. |