#include <Image.h>

Public Member Functions | |
| Image (int resX, int resY) | |
| Image () | |
| ~Image () | |
| RGBAColor * | operator[] (int y) |
| int | getWidth () const |
| get image dimansion x | |
| int | getHeight () const |
| get image dimansion y | |
| RGBAColor & | getPixel (int x, int y) |
| Get pixel value on certain position. | |
| void | setPixel (const RGBAColor &p, int x, int y) |
| Set pixel on certain position. | |
| void | setPixel (const RGBColor &p, int x, int y) |
| void | WritePPM (const char *fileName) |
| Write content of the image as ppm file. | |
| bool | ReadPPM (const char *fileName) |
| Read image from ppm file. | |
| bool | ReadPNG (const char *fileName) |
| void | WritePNG (const char *fileName) |
| bool | LoadImage (const char *fileName) |
| void | ToneMapping (float Ldmax) |
Private Attributes | |
| int | resX |
| int | resY |
| RGBAColor * | pixel |
Definition at line 10 of file Image.h.
| rcrt::Image::Image | ( | int | resX, | |
| int | resY | |||
| ) | [inline] |
| RGBAColor* rcrt::Image::operator[] | ( | int | y | ) | [inline] |
| int rcrt::Image::getWidth | ( | ) | const [inline] |
get image dimansion x
Definition at line 37 of file Image.h.
References resX.
Referenced by rcrt::ImageTexture::getBump(), rcrt::ImageTexture::getColor(), and rcrt::StereoMetaTracer::trace().
| int rcrt::Image::getHeight | ( | ) | const [inline] |
get image dimansion y
Definition at line 40 of file Image.h.
References resY.
Referenced by rcrt::ImageTexture::getBump(), rcrt::ImageTexture::getColor(), and rcrt::StereoMetaTracer::trace().
| RGBAColor& rcrt::Image::getPixel | ( | int | x, | |
| int | y | |||
| ) | [inline] |
Get pixel value on certain position.
Definition at line 43 of file Image.h.
Referenced by rcrt::ImageTexture::getBump(), rcrt::ImageTexture::getColor(), ToneMapping(), rcrt::ThreadedMetaTracer::trace(), rcrt::StereoMetaTracer::trace(), rcrt::ThreadedMetaTracer::traceJob(), and WritePNG().
| void rcrt::Image::setPixel | ( | const RGBAColor & | p, | |
| int | x, | |||
| int | y | |||
| ) | [inline] |
Set pixel on certain position.
Definition at line 53 of file Image.h.
Referenced by ReadPNG(), ToneMapping(), rcrt::TracingStrategy::trace(), rcrt::ThreadedMetaTracer::trace(), rcrt::SuperMetaTracer::trace(), rcrt::RayCaster::trace(), rcrt::DebugTracer::trace(), and rcrt::ThreadedMetaTracer::traceJob().
| void rcrt::Image::setPixel | ( | const RGBColor & | p, | |
| int | x, | |||
| int | y | |||
| ) | [inline] |
| void rcrt::Image::WritePPM | ( | const char * | fileName | ) |
| bool rcrt::Image::ReadPPM | ( | const char * | fileName | ) |
Read image from ppm file.
Definition at line 62 of file Image.cpp.
References rcrt::eatComments(), rcrt::eatWhitespace(), pixel, resX, and resY.
Referenced by LoadImage().
| bool rcrt::Image::ReadPNG | ( | const char * | fileName | ) |
Read image from png file The image will be converted to float r,g,b
Definition at line 149 of file Image.cpp.
References pixel, read_png(), resX, resY, and setPixel().
Referenced by LoadImage().
| void rcrt::Image::WritePNG | ( | const char * | fileName | ) |
Write image content as RGB png file.
Definition at line 209 of file Image.cpp.
References rcrt::RGBAColor::b(), rcrt::RGBAColor::g(), getPixel(), rcrt::RGBAColor::r(), resX, resY, and write_png().
Referenced by rcrtAnim(), testDispl1(), testLoaders(), testPhoton(), testPhotonRCRT(), and testQuad().
| bool rcrt::Image::LoadImage | ( | const char * | fileName | ) |
| void rcrt::Image::ToneMapping | ( | float | Ldmax | ) |
Definition at line 240 of file Image.cpp.
References rcrt::RGBAColor::a(), rcrt::RGBAColor::b(), rcrt::RGBAColor::g(), getPixel(), rcrt::RGBAColor::r(), resX, resY, and setPixel().
int rcrt::Image::resX [private] |
Definition at line 12 of file Image.h.
Referenced by getPixel(), getWidth(), operator[](), ReadPNG(), ReadPPM(), setPixel(), ToneMapping(), WritePNG(), and WritePPM().
int rcrt::Image::resY [private] |
Definition at line 12 of file Image.h.
Referenced by getHeight(), ReadPNG(), ReadPPM(), ToneMapping(), WritePNG(), and WritePPM().
RGBAColor* rcrt::Image::pixel [private] |
Definition at line 13 of file Image.h.
Referenced by getPixel(), Image(), operator[](), ReadPNG(), ReadPPM(), setPixel(), and ~Image().
1.5.3