31 #ifndef _KAKADUIMAGE_H 32 #define _KAKADUIMAGE_H 40 #include <kdu_stripe_decompressor.h> 47 extern std::ofstream logfile;
58 { this->stream = stream; }
59 void put_text(
const char *
string)
60 { logfile << string; }
61 void flush(
bool end_of_message=
false){
63 if( end_of_message )
throw 1;
74 static kdu_message_formatter pretty_cout(&cout_message);
75 static kdu_message_formatter pretty_cerr(&cerr_message);
87 kdu_codestream codestream;
90 kdu_compressed_source *input;
99 jpx_codestream_source jpx_stream;
102 kdu_stripe_decompressor decompressor;
108 unsigned int max_layers;
111 unsigned int virtual_levels;
123 void process(
unsigned int r,
int l,
int x,
int y,
unsigned int w,
unsigned int h,
void* d )
throw (std::string);
131 tile_width = TILESIZE; tile_height = TILESIZE;
132 numResolutions = 0; virtual_levels = 0;
139 tile_width = TILESIZE; tile_height = TILESIZE;
140 numResolutions = 0; virtual_levels = 0;
147 tile_width = TILESIZE; tile_height = TILESIZE;
148 numResolutions = 0; virtual_levels = 0;
155 void openImage()
throw (std::string);
162 void loadImageInfo(
int x,
int y )
throw (std::string);
174 RawTile getTile(
int x,
int y,
unsigned int r,
int l,
unsigned int t )
throw (std::string);
188 void getRegion(
int ha,
int va,
unsigned int r,
int l,
int x,
int y,
unsigned int w,
unsigned int h,
unsigned char* b )
throw (std::string);
KakaduImage(const std::string &path)
Constructor.
Definition: KakaduImage.h:138
KakaduImage()
Constructor.
Definition: KakaduImage.h:130
Image class for Kakadu JPEG2000 Images: Inherits from IIPImage. Uses the Kakadu library.
Definition: KakaduImage.h:82
~KakaduImage()
Destructor.
Definition: KakaduImage.h:152
Main class to handle the pyramidal image source.
Definition: IIPImage.h:48
Wrapper class to handle error messages from Kakadu.
Definition: KakaduImage.h:51
Class to represent a single image tile.
Definition: RawTile.h:43
KakaduImage(const IIPImage &image)
Copy Constructor.
Definition: KakaduImage.h:146