#include <Image2D.h>
Public Member Functions | |
Image2D () | |
Image2D (const T *data, size_t nrows, size_t ncols) | |
Stores the pointer to the 2D array containing image data and its sizes. | |
virtual | ~Image2D () |
T | getValue (int row, int col) |
T | flipud (int row, int col) |
T | fliplr (int row, int col) |
T | transpose (int row, int col) |
T | rot000 (int row, int col) |
T | rot090 (int row, int col) |
T | rot180 (int row, int col) |
T | rot270 (int row, int col) |
T | rotN90 (int row, int col, int Nx90=0) |
size_t | getNCols (int Nx90=0) |
Returns the number of columns after rotations by n*90 degree. | |
size_t | getNRows (int Nx90=0) |
Returns the number of rows after rotations by n*90 degree. | |
const T * | data () |
Returns pointer to data array. | |
void | printImage (int Nx90=0) |
void | printEntireImage (int Nx90=0) |
void | saveImageInFile (const std::string &fname, int Nx90=0) |
This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.
Definition at line 53 of file Image2D.h.
CSPadPixCoords::Image2D< T >::Image2D | ( | ) |
CSPadPixCoords::Image2D< T >::Image2D | ( | const T * | data, | |
size_t | nrows, | |||
size_t | ncols | |||
) |
Stores the pointer to the 2D array containing image data and its sizes.
[in] | data | Pointer to the 2D array of type T with image data. |
[in] | nrows | Number of rows (1st index) in the 2D array. |
[in] | ncols | Number of columns (2nd index) in the 2D array. |
Definition at line 48 of file Image2D.cpp.
CSPadPixCoords::Image2D< T >::~Image2D | ( | ) | [virtual] |
Definition at line 256 of file Image2D.cpp.
const T* CSPadPixCoords::Image2D< T >::data | ( | ) | [inline] |
T CSPadPixCoords::Image2D< T >::fliplr | ( | int | row, | |
int | col | |||
) | [inline] |
T CSPadPixCoords::Image2D< T >::flipud | ( | int | row, | |
int | col | |||
) | [inline] |
size_t CSPadPixCoords::Image2D< T >::getNCols | ( | int | Nx90 = 0 |
) | [inline] |
Returns the number of columns after rotations by n*90 degree.
Definition at line 166 of file Image2D.cpp.
Referenced by CSPadPixCoords::Image2D< T >::printEntireImage(), CSPadPixCoords::Image2D< T >::printImage(), and CSPadPixCoords::Image2D< T >::saveImageInFile().
size_t CSPadPixCoords::Image2D< T >::getNRows | ( | int | Nx90 = 0 |
) | [inline] |
Returns the number of rows after rotations by n*90 degree.
Definition at line 176 of file Image2D.cpp.
Referenced by CSPadPixCoords::Image2D< T >::printEntireImage(), CSPadPixCoords::Image2D< T >::printImage(), and CSPadPixCoords::Image2D< T >::saveImageInFile().
T CSPadPixCoords::Image2D< T >::getValue | ( | int | row, | |
int | col | |||
) | [inline] |
Methods of this class provide access to the 2D array and its transformed versions after up-down, left-right flips, transpose, and rotations by n*90 degree.
Definition at line 62 of file Image2D.cpp.
Referenced by CSPadPixCoords::Image2D< T >::fliplr(), CSPadPixCoords::Image2D< T >::flipud(), CSPadPixCoords::Image2D< T >::rot000(), CSPadPixCoords::Image2D< T >::rot090(), CSPadPixCoords::Image2D< T >::rot180(), CSPadPixCoords::Image2D< T >::rot270(), and CSPadPixCoords::Image2D< T >::transpose().
void CSPadPixCoords::Image2D< T >::printEntireImage | ( | int | Nx90 = 0 |
) |
Definition at line 206 of file Image2D.cpp.
References CSPadPixCoords::Image2D< T >::getNCols(), and CSPadPixCoords::Image2D< T >::getNRows().
void CSPadPixCoords::Image2D< T >::printImage | ( | int | Nx90 = 0 |
) |
Definition at line 186 of file Image2D.cpp.
References CSPadPixCoords::Image2D< T >::getNCols(), and CSPadPixCoords::Image2D< T >::getNRows().
T CSPadPixCoords::Image2D< T >::rot000 | ( | int | row, | |
int | col | |||
) | [inline] |
Definition at line 113 of file Image2D.cpp.
References CSPadPixCoords::Image2D< T >::getValue().
Referenced by CSPadPixCoords::Image2D< T >::rotN90().
T CSPadPixCoords::Image2D< T >::rot090 | ( | int | row, | |
int | col | |||
) | [inline] |
Definition at line 122 of file Image2D.cpp.
References CSPadPixCoords::Image2D< T >::getValue().
Referenced by CSPadPixCoords::Image2D< T >::rotN90().
T CSPadPixCoords::Image2D< T >::rot180 | ( | int | row, | |
int | col | |||
) | [inline] |
Definition at line 144 of file Image2D.cpp.
References CSPadPixCoords::Image2D< T >::getValue().
Referenced by CSPadPixCoords::Image2D< T >::rotN90().
T CSPadPixCoords::Image2D< T >::rot270 | ( | int | row, | |
int | col | |||
) | [inline] |
Definition at line 133 of file Image2D.cpp.
References CSPadPixCoords::Image2D< T >::getValue().
Referenced by CSPadPixCoords::Image2D< T >::rotN90().
T CSPadPixCoords::Image2D< T >::rotN90 | ( | int | row, | |
int | col, | |||
int | Nx90 = 0 | |||
) | [inline] |
Definition at line 153 of file Image2D.cpp.
References CSPadPixCoords::Image2D< T >::rot000(), CSPadPixCoords::Image2D< T >::rot090(), CSPadPixCoords::Image2D< T >::rot180(), and CSPadPixCoords::Image2D< T >::rot270().
void CSPadPixCoords::Image2D< T >::saveImageInFile | ( | const std::string & | fname, | |
int | Nx90 = 0 | |||
) |
Definition at line 226 of file Image2D.cpp.
References CSPadPixCoords::Image2D< T >::getNCols(), and CSPadPixCoords::Image2D< T >::getNRows().
T CSPadPixCoords::Image2D< T >::transpose | ( | int | row, | |
int | col | |||
) | [inline] |