CSPadPixCoords::Image2D< T > Class Template Reference
[CSPadPixCoords package]

Image2D class provides access to the 2D image data. More...

#include <Image2D.h>

List of all members.

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 ()
getValue (int row, int col)
flipud (int row, int col)
fliplr (int row, int col)
transpose (int row, int col)
rot000 (int row, int col)
rot090 (int row, int col)
rot180 (int row, int col)
rot270 (int row, int col)
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)


Detailed Description

template<typename T>
class CSPadPixCoords::Image2D< T >

Image2D class provides access to the 2D image data.

This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.

See also:
CSPadImageProducer, PixCoordsTest
Version:
Id
Image2D.h 8040 2014-04-19 01:00:36Z dubrovin@SLAC.STANFORD.EDU
Author:
Mikhail S. Dubrovin

Definition at line 53 of file Image2D.h.


Constructor & Destructor Documentation

template<typename T>
CSPadPixCoords::Image2D< T >::Image2D (  ) 

template<typename T>
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.

Parameters:
[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.

template<typename T>
CSPadPixCoords::Image2D< T >::~Image2D (  )  [virtual]

Definition at line 256 of file Image2D.cpp.


Member Function Documentation

template<typename T>
const T* CSPadPixCoords::Image2D< T >::data (  )  [inline]

Returns pointer to data array.

Definition at line 100 of file Image2D.h.

template<typename T>
T CSPadPixCoords::Image2D< T >::fliplr ( int  row,
int  col 
) [inline]

Definition at line 81 of file Image2D.cpp.

References CSPadPixCoords::Image2D< T >::getValue().

template<typename T>
T CSPadPixCoords::Image2D< T >::flipud ( int  row,
int  col 
) [inline]

Definition at line 72 of file Image2D.cpp.

References CSPadPixCoords::Image2D< T >::getValue().

template<typename T>
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().

template<typename T>
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().

template<typename T>
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().

template<typename T>
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().

template<typename T>
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().

template<typename T>
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().

template<typename T>
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().

template<typename T>
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().

template<typename T>
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().

template<typename T>
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().

template<typename T>
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().

template<typename T>
T CSPadPixCoords::Image2D< T >::transpose ( int  row,
int  col 
) [inline]

Definition at line 90 of file Image2D.cpp.

References CSPadPixCoords::Image2D< T >::getValue().


The documentation for this class was generated from the following files:
Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7