30using namespace kdu_supp;
40class JP2_Decoder_Error;
80static const char*
const
84static const char*
const
87static const char*
const
92static const char*
const
424unsigned long long decode ();
521 (std::ostream&
destination, std::streamoff file_offset,
522 int band,
int line,
int lines, kdu_int16* buffer);
548 (std::ostream&
destination, std::streamoff file_offset,
549 int band,
int line,
int lines, kdu_int32* buffer);
588 (
unsigned int level,
const Rectangle& region);
691 *JPEG2000_Codestream;
701#ifndef DOXYGEN_PROCESSING
705class JP2_Decoder_Error
706:
public kdu_thread_safe_message
710void put_text (
const char* message);
711void flush (
bool end_of_message =
false);
JP2_Decoder()
Constructs a JP2_Decoder.
Definition JP2_Decoder.cc:108
A JP2_Decoder decodes image pixel data from a JPEG2000 JP2 image file.
Definition JP2_Decoder.hh:74
Rectangle Image_Region
Image region to be rendered.
Definition JP2_Decoder.hh:659
std::string destination() const
Get the destination file pathname for the rendered image data.
Definition JP2_Decoder.hh:251
bool signed_data() const
Get the signedness of the pixel data.
Definition JP2_Decoder.hh:215
bool Signed_Data
Whether pixel data is signed.
Definition JP2_Decoder.hh:619
unsigned char * UUID_Info_UUID
First UUID value found in a UUID List box of a UUID Info super box.
Definition JP2_Decoder.hh:640
unsigned int pixel_bytes() const
Get the number of bytes per pixel.
Definition JP2_Decoder.hh:198
unsigned int image_height() const
Get the height of the JP2 source image.
Definition JP2_Decoder.hh:167
unsigned int rendered_width() const
Get the width of the rendered image.
Definition JP2_Decoder.cc:294
unsigned long long decode()
Deocde the pixel data from the JPEG2000 JP2 source and write the rendered results to the image data d...
Definition JP2_Decoder.cc:359
std::string reasons() const
Describe the reasons that the decoder is not ready.
Definition JP2_Decoder.cc:1031
unsigned int image_width() const
Get the width of the JP2 source image.
Definition JP2_Decoder.hh:159
unsigned int resolution_levels() const
Get the total number of codestream resolution levels.
Definition JP2_Decoder.hh:190
bool is_open() const
Test if the decoder is open.
Definition JP2_Decoder.cc:752
static const char *const UUID_INFO_BOX_NAME
PDS label reference information UUID Info JP2 container box name.
Definition JP2_Decoder.hh:85
unsigned long long write_image_data()
Write rendered image data.
Definition JP2_Decoder.cc:757
unsigned int Pixel_Bytes
Pixel datum size in bytes.
Definition JP2_Decoder.hh:611
void set_resolution_and_region(unsigned int level, const Rectangle ®ion)
Set the effective rendering resolution level and image region.
Definition JP2_Decoder.cc:646
unsigned int Image_Bands
Total image bands (components).
Definition JP2_Decoder.hh:603
unsigned long long bytes_written() const
Get the number of image data bytes written.
Definition JP2_Decoder.hh:390
unsigned int resolution_level() const
Get the resolution level at which the codestream will be rendered.
Definition JP2_Decoder.hh:343
Rectangle image_region() const
Get the image region that will be rendered from the JP2 source.
Definition JP2_Decoder.hh:301
void close()
Close access to the JP2 source.
Definition JP2_Decoder.cc:972
std::string JP2_Pathname
JP2 source pathname.
Definition JP2_Decoder.hh:599
std::string source() const
Get the JP2 source pathname.
Definition JP2_Decoder.hh:128
static const int MIN_STRIPE_HEIGHT
Image data stripe minimum and maximum number of lines.
Definition JP2_Decoder.hh:97
static const char *const URL_BOX_NAME
PDS label relative filename URL JP2 box name.
Definition JP2_Decoder.hh:93
unsigned int rendered_height() const
Get the height of the rendered image.
Definition JP2_Decoder.cc:299
std::string Image_Destination
Image data destination pathname.
Definition JP2_Decoder.hh:651
JP2_Decoder & swap_pixel_bytes(bool swap_data)
Sets whether multi-byte pixels will be reordered before being written.
Definition JP2_Decoder.hh:382
unsigned int image_bands() const
Get the number of bands (components) in the JP2 image.
Definition JP2_Decoder.hh:175
Size_2D image_size() const
Get the size of the JP2 source image.
Definition JP2_Decoder.hh:151
unsigned int Resolution_Level
Resolution level to render.
Definition JP2_Decoder.hh:667
Size_2D Rendered_Size
Rendered image size.
Definition JP2_Decoder.hh:655
void open()
Open the source JP2 file.
Definition JP2_Decoder.cc:378
unsigned long long Bytes_Written
Total number of pixel bytes written.
Definition JP2_Decoder.hh:675
unsigned int Resolution_Levels
Resolution levels available.
Definition JP2_Decoder.hh:632
Size_2D Image_Size
Dimensions of the source image.
Definition JP2_Decoder.hh:607
unsigned char *const producer_UUID() const
Get the UUID found in the JP2 source.
Definition JP2_Decoder.hh:229
std::string URL() const
Get the URL found in the JP2 source.
Definition JP2_Decoder.hh:240
JP2_Decoder & destination(const std::string &pathname)
Set the destination file pathname for the rendered image data.
Definition JP2_Decoder.hh:259
unsigned int Pixel_Bits
Pixel precision bits.
Definition JP2_Decoder.hh:615
unsigned int pixel_bits() const
Get the pixel precision.
Definition JP2_Decoder.hh:206
bool Swap_Pixel_Bytes
Whether pixel bytes should be reordered when written.
Definition JP2_Decoder.hh:671
bool swap_pixel_bytes() const
Tests if multi-byte pixels will be reordered before being written.
Definition JP2_Decoder.hh:369
std::string UUID_Info_URL
First URL value found in a URL box of a UUID Info super box.
Definition JP2_Decoder.hh:644
std::streamsize write_stripe(std::ostream &destination, std::streamoff file_offset, int band, int line, int lines, kdu_int16 *buffer)
Write an image data buffer with pixel data to a stream.
Definition JP2_Decoder.cc:1134
static const int MAX_STRIPE_HEIGHT
Definition JP2_Decoder.hh:98
Size_2D rendered_size() const
Get the size of the rendered image.
Definition JP2_Decoder.cc:290
static const int DECODER_EXCEPTION
JP2_Decoder_Error exception signal value.
Definition JP2_Decoder.hh:102
bool ready() const
Tests if the decoder has the information it needs to do its job.
Definition JP2_Decoder.cc:1021
JP2_Decoder_Error * decoder_error() const
Definition JP2_Decoder.cc:1045
JP2_Decoder()
Constructs a JP2_Decoder.
Definition JP2_Decoder.cc:108
static const char *const UUID_BOX_NAME
Data provider UUID JP2 box name.
Definition JP2_Decoder.hh:88
static const char *const ID
Class identification name with source code version and date.
Definition JP2_Decoder.hh:81
Definition Dimensions.cc:32
Definition Dimensions.cc:30
A Rectangle is a position with a size.
Definition Dimensions.hh:223
A Size_2D holds 2-dimensional size information.
Definition Dimensions.hh:119