SImage< T > Class Template Reference
Templated image class.
More...
#include <CUDASIFT/tpimage.h>
List of all members.
Public Member Functions |
| SImage () |
| Empty constructor.
|
| SImage (int w, int h, T *ptr=NULL) |
| Constructor.
|
void | SetSize (int w, int h) |
| Set new image size.
|
void | SetData (T *ptr) |
| Set image data position.
|
bool | Load (const char *filename) |
| Load grey-level image from PGM file.
|
bool | LoadRGB (const char *filename) |
| Load RGB image (three values per pixel) from PPM file.
|
void | Store (const char *filename, bool norm=false, bool ascii=false) const |
| Store grey-level image as PGM file.
|
void | StoreRGB (const char *filename) const |
| Store RGB image (three values per pixel) as PPM file.
|
void | StoreYUV (const char *filename) const |
| Convert from UYVY (two values per pixel) to RGB and store as PPM file.
|
T * | GetData () const |
| Get image data position.
|
int | GetWidth () const |
| Get image width.
|
int | GetHeight () const |
| Get image height.
|
T * | operator[] (int i) |
| Get pointer to pixel row i.
|
void | operator= (SImage< T > &src) |
| Copy image data.
|
Detailed Description
template<class T>
class SImage< T >
Templated image class.
Definition at line 17 of file tpimage.h.
Constructor & Destructor Documentation
Empty constructor.
Definition at line 93 of file tpimage.h.
template<class T >
SImage< T >::SImage |
( |
int |
w, |
|
|
int |
h, |
|
|
T * |
ptr = NULL | |
|
) |
| | [inline] |
Constructor.
- Parameters:
-
| w | image width |
| h | image height |
| ptr | image data pointer (if NULL, allocated internally) |
Definition at line 99 of file tpimage.h.
Member Function Documentation
template<class T>
T* SImage< T >::GetData |
( |
|
) |
const [inline] |
template<class T>
int SImage< T >::GetHeight |
( |
|
) |
const [inline] |
Get image height.
Definition at line 59 of file tpimage.h.
template<class T>
int SImage< T >::GetWidth |
( |
|
) |
const [inline] |
Get image width.
Definition at line 57 of file tpimage.h.
template<class T >
bool SImage< T >::Load |
( |
const char * |
filename |
) |
[inline] |
Load grey-level image from PGM file.
- Parameters:
-
Definition at line 139 of file tpimage.h.
template<class T >
bool SImage< T >::LoadRGB |
( |
const char * |
filename |
) |
[inline] |
Load RGB image (three values per pixel) from PPM file.
- Parameters:
-
Definition at line 198 of file tpimage.h.
template<class T>
T* SImage< T >::operator[] |
( |
int |
i |
) |
[inline] |
Get pointer to pixel row i.
Definition at line 61 of file tpimage.h.
template<class T>
void SImage< T >::SetData |
( |
T * |
ptr |
) |
[inline] |
Set image data position.
- Parameters:
-
Definition at line 36 of file tpimage.h.
template<class T >
void SImage< T >::SetSize |
( |
int |
w, |
|
|
int |
h | |
|
) |
| | [inline] |
Set new image size.
- Parameters:
-
| w | image width |
| h | image height |
Definition at line 119 of file tpimage.h.
template<class T >
void SImage< T >::Store |
( |
const char * |
filename, |
|
|
bool |
norm = false , |
|
|
bool |
ascii = false | |
|
) |
| | const [inline] |
Store grey-level image as PGM file.
- Parameters:
-
| filename | image file name |
| norm | whether to normalize image before storage |
| ascii | whether to store in ASCII or binary format |
Definition at line 266 of file tpimage.h.
template<class T >
void SImage< T >::StoreRGB |
( |
const char * |
filename |
) |
const [inline] |
Store RGB image (three values per pixel) as PPM file.
- Parameters:
-
Definition at line 332 of file tpimage.h.
template<class T >
void SImage< T >::StoreYUV |
( |
const char * |
filename |
) |
const [inline] |
Convert from UYVY (two values per pixel) to RGB and store as PPM file.
- Parameters:
-
Definition at line 353 of file tpimage.h.
The documentation for this class was generated from the following file: