ESA JPIP server
0.1
|
Contains the indexing information of a JPEG2000 image file that is managed by the index manager. More...
#include <image_index.h>
Public Types | |
typedef list< ImageIndex >::iterator | Ptr |
Pointer of an object of this class. More... | |
Public Member Functions | |
ImageIndex (const ImageIndex &image_index) | |
Copy constructor. More... | |
int | GetNumCodestreams () const |
Returns the number of codestreams. More... | |
int | GetNumMetadatas () const |
Returns the number of meta-data blocks. More... | |
bool | ReadLock (const Range &range=Range(0, 0)) |
Gets the lock for reading, for a specific range of codestreams. More... | |
bool | ReadUnlock (const Range &range=Range(0, 0)) |
Releases the lock for reading, for a specific range of codestreams. More... | |
string | GetPathName () const |
Returns the path name of the image. More... | |
string | GetPathName (int num_codestream) const |
Returns the path name of a given codestream, if it is a hyperlinked codestream. More... | |
FileSegment | GetMainHeader (int num_codestream) const |
Returns the file segment the main header of a given codestream. More... | |
FileSegment | GetMetadata (int num_metadata) const |
Returns the file segment of a meta-data block. More... | |
PlaceHolder | GetPlaceHolder (int num_placeholder) const |
Returns the information of a place-holder. More... | |
FileSegment | GetPacket (int num_codestream, const Packet &packet, int *offset=NULL) |
Returns the file segment of a packet. More... | |
CodingParameters::Ptr | GetCodingParameters () const |
Returns a pointer to the coding parameters. More... | |
bool | IsHyperLinked (int num_codestream) const |
Returns true if the image contains hyperlinks. More... | |
Ptr | GetHyperLink (int num_codestream) const |
Returns a pointer to a hyperlink. More... | |
int | GetNumHyperLinks () const |
Returns the number of hyperlinks. More... | |
operator CodingParameters::Ptr () const | |
ImageIndex & | operator= (const ImageIndex &image_index) |
virtual | ~ImageIndex () |
Private Member Functions | |
bool | GetPLTLength (const File &file, int ind_codestream, uint64_t *length_packet) |
Gets the packet lengths from a PLT marker. More... | |
void | GetOffsetPacket (const File &file, int ind_codestream, uint64_t length_packet) |
Gets the packet offsets. More... | |
bool | BuildIndex (int ind_codestream, int max_index) |
Builds the required index for the required resolution levels. More... | |
bool | Init (const string &path_name, const ImageInfo &image_info) |
Initializes the object. More... | |
bool | Init (const string &path_name, CodingParameters::Ptr coding_parameters, const ImageInfo &image_info, int index) |
Initializes the object. More... | |
ImageIndex () | |
Empty constructor. More... | |
Private Attributes | |
RdWrLock::Ptr | rdwr_lock |
Read/write lock. More... | |
vector< int > | last_plt |
vector< int > | last_packet |
vector< uint64_t > | last_offset_PLT |
vector< uint64_t > | last_offset_packet |
string | path_name |
Image file name. More... | |
Metadata | meta_data |
Image Metadata. More... | |
int | num_references |
Number of references. More... | |
vector< int > | max_resolution |
Maximum resolution number. More... | |
vector< PacketIndex > | packet_indexes |
Code-stream packet index. More... | |
vector< CodestreamIndex > | codestreams |
Image code-streams. More... | |
CodingParameters::Ptr | coding_parameters |
Image coding parameters. More... | |
vector< list< ImageIndex >::iterator > | hyper_links |
Image hyperlinks. More... | |
Friends | |
class | IndexManager |
ostream & | operator<< (ostream &out, const ImageIndex &info_node) |
Contains the indexing information of a JPEG2000 image file that is managed by the index manager.
This class can be printed.
Maintains a read/write lock for controlling the multi-thread access to the indexing information. For instance, by default all the threads usually want to read the information. The packet index built on demand, so only when a thread wants to create a new level of the packet index, it needs to write.
typedef list<ImageIndex>::iterator jpeg2000::ImageIndex::Ptr |
Pointer of an object of this class.
|
inlineprivate |
Empty constructor.
Only the index manager can use this constructor.
|
inline |
Copy constructor.
|
inlinevirtual |
|
private |
Builds the required index for the required resolution levels.
ind_codestream | Codestream index. |
max_index | Maximum resolution level. |
true
if successful
|
inline |
Returns a pointer to the coding parameters.
|
inline |
Returns a pointer to a hyperlink.
num_codestream | Number of the hyperlink (codestream). |
|
inline |
Returns the file segment the main header of a given codestream.
num_codestream | Codestream number |
|
inline |
Returns the file segment of a meta-data block.
num_metadata | Meta-data number. |
|
inline |
Returns the number of codestreams.
|
inline |
Returns the number of hyperlinks.
|
inline |
Returns the number of meta-data blocks.
|
private |
Gets the packet offsets.
file | File where to read the data from. |
ind_codestream | Codestream index. |
length_packet | Packet length. |
true
if successful. FileSegment jpeg2000::ImageIndex::GetPacket | ( | int | num_codestream, |
const Packet & | packet, | ||
int * | offset = NULL |
||
) |
Returns the file segment of a packet.
num_codestream | Codestream number. |
packet | Packet information. |
offset | If it is not NULL receives the offset of the packet. |
|
inline |
Returns the path name of the image.
|
inline |
Returns the path name of a given codestream, if it is a hyperlinked codestream.
num_codestream | Codestream number. |
|
inline |
Returns the information of a place-holder.
num_placeholder | Place-holder number. |
|
private |
Gets the packet lengths from a PLT marker.
file | File where to read the data from. |
ind_codestream | Codestream index. |
length_packet | It is returned the length of the packet. |
true
if successful.
|
private |
Initializes the object.
path_name | Path name of the image. |
image_info | Indexing image information. |
true
if successful
|
private |
Initializes the object.
path_name | Path name of the image. |
coding_parameters | Coding parameters. |
image_info | Indexing image information. |
index | Image index. |
true
if successful
|
inline |
Returns true
if the image contains hyperlinks.
|
inline |
|
inline |
Gets the lock for reading, for a specific range of codestreams.
true
if successful Releases the lock for reading, for a specific range of codestreams.
true
if successful
|
friend |
|
friend |
|
private |
Image code-streams.
|
private |
Image coding parameters.
|
private |
Image hyperlinks.
|
private |
|
private |
|
private |
|
private |
|
private |
Maximum resolution number.
|
private |
Number of references.
|
private |
Code-stream packet index.
|
private |
Image file name.
|
private |
Read/write lock.