#include <vuImage.h>
Collaboration diagram for vuImage:
Public Types | |
enum | vuImageFormat { vuBMP_RGBA, vuBMP_GREY } |
Public Member Functions | |
vuImage (dword width=0, dword height=0) | |
constructor | |
virtual | ~vuImage () |
destructor | |
vuImage (const vuImage &other) | |
copy constructor | |
bool | init (int sizx, int sizy) |
initialize spectral framebuffer of given size | |
void | get_extents (int &sizx, int &sizy) |
get extents of vuImage | |
void | set_extents (int sizx, int sizy) |
this will set the extents of the buffer spix, but it will not delete the memory pointed to by spix and will notallocate new memory at spix. | |
bool | set_xy (int x, int y, const vuColourRGBa &col) |
set spectral color information for a point | |
bool | set_xy (int x, int y, unsigned char r, unsigned char g, unsigned char b) |
This will set pixel (x, y) to have colour (r, g, b)... | |
bool | get_xy (int x, int y, vuColourRGBa &col) |
get colour from specific point | |
const byte * | get_rgb () const |
returns the framebuffer | |
byte * | get_buffer () |
returns the framebuffer for modification | |
bool | set_rgb (byte *rgb) |
This will copy the contents of rgb into spix (make sure that rgb is of the appropriate size and dimensions first). | |
void | set_rgb (int start, int number_copied, byte *rgb) |
This will set the buffer from start up to start + number_copied bytes from rgb. | |
void | elim_data (byte *rgb) |
This will overwrite spix with rgb without first deleting the buffer spix. | |
bool | set_data (byte *rgb) |
This will delete spix and set spix equal to rgb. | |
int | getWidth () const |
int | getHeight () const |
void | blit (int x=0, int y=0) |
Blits the image to the screen. | |
void | clear (const byte r=0, const byte g=0, const byte b=0) |
Clears the image with color(r,g,b) and blits it to the screen. | |
void | initOpenGL () |
openGl related methods | |
void | glResize (dword width, dword height) |
void | glRender () |
bool | writeToFile (const char *fileName, vuImageFormat fmt=vuBMP_RGBA) |
file write/read access | |
bool | readFromFile (const char *fileName, vuImageFormat fmt=vuBMP_RGBA) |
vuImage | operator= (const vuImage &other) |
vuImage & | operator+= (vuImage &other) |
vuImage & | operator *= (float scale) |
Private Member Functions | |
void | _copy (const vuImage &other) |
Private Attributes | |
byte * | spix |
pointer to spectral frame buffer | |
int | maxx |
extent of the framebuffer in the x direction | |
int | maxy |
extent of the framebuffer in the y direction | |
Friends | |
bool | get_difference (vuImage &img1, vuImage &img2, int *temp) |
This will return the differences between img1 and img2 and store the signed difference in the array pointed to by temp. |
Is used to apply post-illumination. The reference to ColourType is a typecast that stands for the color model used in the currently compiled version.
Definition at line 34 of file vuImage.h.
|
|
|
constructor
Definition at line 16 of file vuImage.cpp. |
Here is the call graph for this function:
|
destructor
Definition at line 24 of file vuImage.cpp. References spix. |
|
copy constructor
Definition at line 32 of file vuImage.cpp. References operator=(). |
Here is the call graph for this function:
|
|
|
Blits the image to the screen. (to blit means kinda draw) Definition at line 160 of file vuImage.cpp. References GL_RGB, GL_UNPACK_ALIGNMENT, GL_UNSIGNED_BYTE, glDrawPixels(), glPixelStorei(), glRasterPos2i(), maxx, maxy, and spix. Referenced by vu1512113::displayFromImage(), vu1112113::displayFromImage(), vu1512122::displayFromImage(), vu1112118::render(), vu1112116::render(), and vu1112117::render(). |
Here is the call graph for this function:
|
Clears the image with color(r,g,b) and blits it to the screen.
Definition at line 148 of file vuImage.cpp. Referenced by vu1112117::drawImageFromSlices(). |
|
This will overwrite spix with rgb without first deleting the buffer spix.
Definition at line 133 of file vuImage.cpp. |
|
returns the framebuffer for modification
Definition at line 95 of file vuImage.cpp. References byte. Referenced by vuSpectralImage::getRGBImage(), operator *=(), operator+=(), operator=(), and vu1112117::scaleAndBias(). |
|
get extents of vuImage
Definition at line 100 of file vuImage.cpp. Referenced by vu1512113::displayFromImage(), vu1112113::displayFromImage(), vu1512122::displayFromImage(), vuKeyFramerDialog::PlayNextImage(), vuPPM::ReadCompressedImage(), vuPPM::ReadImage(), vuPPM::ReadImageFromBuffer(), vu1112116::render(), vuPPM::SaveCompressedImage(), and vuPPM::SaveImage(). |
|
returns the framebuffer
Definition at line 90 of file vuImage.cpp. References byte. Referenced by Scanner::_renderView(), vuPPM::CompressToBuffer(), vu1112111::drawPic(), vu1112115::drawPic(), vu111211a::drawPic(), operator=(), vuPPM::ReadCompressedImage(), vuPPM::ReadImage(), vu1112115::render(), vu1112116::render(), vuPPM::SaveImage(), and vu111211a::writeImgBuffer(). |
|
get colour from specific point
Definition at line 81 of file vuImage.cpp. |
|
|
Definition at line 138 of file vuImage.cpp. Referenced by vu1112111::drawPic(), vu1112115::drawPic(), vu111211a::drawPic(), vu1112117::getImageWidth(), vuSpectralImage::getRGBImage(), operator *=(), operator+=(), operator=(), vu1112115::render(), vu1112117::scaleAndBias(), vu1112117::setOversampling(), vu1112117::setViewVectors(), and vu111211a::writeImgBuffer(). |
|
Definition at line 191 of file vuImage.cpp. References GL_RGB, GL_UNSIGNED_BYTE, glDrawPixels(), maxx, maxy, and spix. |
Here is the call graph for this function:
|
Definition at line 184 of file vuImage.cpp. References dword, glPixelZoom(), maxx, and maxy. |
Here is the call graph for this function:
|
initialize spectral framebuffer of given size
Definition at line 38 of file vuImage.cpp. References byte, maxx, maxy, and spix. Referenced by vu1112117::_init(), vuSpectralImage::getRGBImage(), vuPPM::OpenImage(), operator=(), vu1112116::read(), vuPPM::ReadCompressedImage(), vuPPM::ReadImage(), vuPPM::ReadImageFromBuffer(), vu1112116::readRaw(), vu1112115::render(), vu1512113::renderImage(), vu1512122::renderImage(), vu1112118::resize(), vuPPM::set_xy(), vu1512113::setImageSize(), vu1112113::setImageSize(), vu1512122::setImageSize(), vu1112113::shootRays(), vuImage(), and vu111211a::writeImgBuffer(). |
|
openGl related methods
Definition at line 179 of file vuImage.cpp. References GL_LIGHTING, and glDisable(). |
Here is the call graph for this function:
|
Definition at line 342 of file vuImage.cpp. References byte, get_buffer(), getHeight(), and getWidth(). |
Here is the call graph for this function:
|
Definition at line 311 of file vuImage.cpp. References byte, get_buffer(), getHeight(), and getWidth(). |
Here is the call graph for this function:
|
Definition at line 289 of file vuImage.cpp. References byte, get_buffer(), get_rgb(), getHeight(), getWidth(), and init(). Referenced by vuImage(). |
Here is the call graph for this function:
|
|
|
This will delete spix and set spix equal to rgb.
Definition at line 124 of file vuImage.cpp. Referenced by ns_vu1112112::vu1112112::getImage(), and vuPPM::ReadImageFromBuffer(). |
|
this will set the extents of the buffer spix, but it will not delete the memory pointed to by spix and will notallocate new memory at spix.
Definition at line 106 of file vuImage.cpp. |
|
This will set the buffer from start up to start + number_copied bytes from rgb.
Definition at line 119 of file vuImage.cpp. |
|
This will copy the contents of rgb into spix (make sure that rgb is of the appropriate size and dimensions first).
Definition at line 112 of file vuImage.cpp. References byte, maxx, maxy, and spix. Referenced by vuPPM::Readnext64KB(). |
|
This will set pixel (x, y) to have colour (r, g, b)... I added this since it would be faster than the previous method since then I wouldn't have to divide and multiply each pixel to get the proper value, and this would save me time. Definition at line 71 of file vuImage.cpp. |
|
set spectral color information for a point
Definition at line 56 of file vuImage.cpp. References byte, vuColour< S >::clampTo01(), maxx, and spix. Referenced by vu1512113::renderImage(), vu1512122::renderImage(), and vu1112113::shootRays(). |
Here is the call graph for this function:
|
file write/read access
|
|
This will return the differences between img1 and img2 and store the signed difference in the array pointed to by temp.
|
|
extent of the framebuffer in the x direction
Definition at line 116 of file vuImage.h. Referenced by blit(), clear(), get_xy(), glRender(), glResize(), init(), set_extents(), set_rgb(), set_xy(), and vuImage(). |
|
extent of the framebuffer in the y direction
Definition at line 119 of file vuImage.h. Referenced by blit(), glRender(), glResize(), init(), set_extents(), set_rgb(), and vuImage(). |
|
pointer to spectral frame buffer
Definition at line 113 of file vuImage.h. Referenced by blit(), elim_data(), get_xy(), glRender(), init(), set_data(), set_rgb(), set_xy(), vuImage(), and ~vuImage(). |