Manages the image files of a repository, allowing read their indexing information, with a caching mechanism for efficiency.
More...
#include <file_manager.h>
|
| bool | ExistCacheImage (const string &path_image_file, string *path_cache_file) |
| | Returns true if the cache file exists and it is updated. More...
|
| |
| bool | ReadBoxHeader (const File &fim, uint32_t *type_box, uint64_t *length_box) |
| | Reads the header information. More...
|
| |
| bool | ReadCodestream (const File &file, CodingParameters *params, CodestreamIndex *index) |
| | Reads the information of a codestream. More...
|
| |
| bool | ReadSIZMarker (const File &file, CodingParameters *params) |
| | Reads the information of a SIZ marker. More...
|
| |
| bool | ReadCODMarker (const File &file, CodingParameters *params) |
| | Reads the information of a COD marker. More...
|
| |
| bool | ReadSOTMarker (const File &file, CodestreamIndex *index) |
| | Reads the information of a SOT marker. More...
|
| |
| bool | ReadPLTMarker (const File &file, CodestreamIndex *index) |
| | Reads the information of a PLT marker. More...
|
| |
| bool | ReadSODMarker (const File &file, CodestreamIndex *index) |
| | Reads the information of a SOD marker. More...
|
| |
| bool | ReadJP2 (const File &file, ImageInfo *image_info) |
| | Reads the information of a JP2 image file. More...
|
| |
| bool | ReadJPX (const File &file, ImageInfo *image_info) |
| | Reads the information of a JPX image file. More...
|
| |
| bool | ReadNlstBox (const File &file, int *num_codestream, int length_box) |
| | Reads the information of a NLST box. More...
|
| |
| bool | ReadFlstBox (const File &file, uint64_t length_box, uint16_t *data_reference) |
| | Reads the information of a FLST box. More...
|
| |
| bool | ReadUrlBox (const File &file, uint64_t length_box, string *path_file) |
| | Reads the information of a URL box. More...
|
| |
Manages the image files of a repository, allowing read their indexing information, with a caching mechanism for efficiency.
| jpeg2000::FileManager::FileManager |
( |
| ) |
|
|
inline |
| jpeg2000::FileManager::FileManager |
( |
string |
root_dir, |
|
|
string |
cache_dir |
|
) |
| |
|
inline |
Initializes the object.
- Parameters
-
| root_dir | Root directory of the image repository. |
| cache_dir | Directory for caching. |
| virtual jpeg2000::FileManager::~FileManager |
( |
| ) |
|
|
inlinevirtual |
| string jpeg2000::FileManager::cache_dir |
( |
| ) |
const |
|
inline |
Returns the directory used for caching.
| bool jpeg2000::FileManager::ExistCacheImage |
( |
const string & |
path_image_file, |
|
|
string * |
path_cache_file |
|
) |
| |
|
private |
Returns true if the cache file exists and it is updated.
- Parameters
-
| path_image_file | Path of the image file. |
| path_cache_file | Receives the path of the associated cache file. |
| string jpeg2000::FileManager::GetCacheFileName |
( |
const string & |
path_image_file | ) |
|
Returns the cache file name equivalent to the given image file name.
| bool jpeg2000::FileManager::Init |
( |
string |
root_dir = "./", |
|
|
string |
cache_dir = "./" |
|
) |
| |
|
inline |
Initializes the object.
- Parameters
-
| root_dir | Root directory of the image repository. |
| cache_dir | Directory for caching. |
- Returns
true if successful
| bool jpeg2000::FileManager::ReadBoxHeader |
( |
const File & |
fim, |
|
|
uint32_t * |
type_box, |
|
|
uint64_t * |
length_box |
|
) |
| |
|
private |
Reads the header information.
of a JP2/JPX box.
- Parameters
-
| fim | Image file. |
| type_box | Receives the type of the box. |
| length_box | Receives the length of the box. |
- Returns
true if successful.
Reads the information of a codestream.
- Parameters
-
| file | Image file. |
| params | Receives the coding parameters. |
| index | Receives the indexing information. |
- Returns
true if successful.
Reads the information of a COD marker.
- Parameters
-
| file | Image file. |
| params | Pointer to the coding parameters to update. |
- Returns
true if successful.
| bool jpeg2000::FileManager::ReadFlstBox |
( |
const File & |
file, |
|
|
uint64_t |
length_box, |
|
|
uint16_t * |
data_reference |
|
) |
| |
|
private |
Reads the information of a FLST box.
- Parameters
-
| file | Image file. |
| length_box | Box length in bytes. |
| data_reference | Receives the data reference. |
- Returns
true if successful.
| bool jpeg2000::FileManager::ReadImage |
( |
const string & |
name_image_file, |
|
|
ImageInfo * |
image_info |
|
) |
| |
Reads an image file and creates the associated cache file if it does not exist yet.
- Parameters
-
| name_image_file | File name of the image. |
| image_info | Receives the information of the image. |
- Returns
true if successful.
| bool jpeg2000::FileManager::ReadJP2 |
( |
const File & |
file, |
|
|
ImageInfo * |
image_info |
|
) |
| |
|
private |
Reads the information of a JP2 image file.
- Parameters
-
| file | Image file. |
| image_info | Receives the image information. |
- Returns
true if successful.
| bool jpeg2000::FileManager::ReadJPX |
( |
const File & |
file, |
|
|
ImageInfo * |
image_info |
|
) |
| |
|
private |
Reads the information of a JPX image file.
- Parameters
-
| file | Image file. |
| image_info | Receives the image information. |
- Returns
true if successful.
| bool jpeg2000::FileManager::ReadNlstBox |
( |
const File & |
file, |
|
|
int * |
num_codestream, |
|
|
int |
length_box |
|
) |
| |
|
private |
Reads the information of a NLST box.
- Parameters
-
| file | Image file. |
| num_codestream | Receives the number of codestream read. |
| length_box | Box length in bytes. |
- Returns
true if successful.
Reads the information of a PLT marker.
- Parameters
-
| file | Image file. |
| index | Pointer to the indexing information to update. |
- Returns
true if successful.
Reads the information of a SIZ marker.
- Parameters
-
| file | Image file. |
| params | Pointer to the coding parameters to update. |
- Returns
true if successful.
Reads the information of a SOD marker.
- Parameters
-
| file | Image file. |
| index | Pointer to the indexing information to update. |
- Returns
true if successful.
Reads the information of a SOT marker.
- Parameters
-
| file | Image file. |
| index | Pointer to the indexing information to update. |
- Returns
true if successful.
| bool jpeg2000::FileManager::ReadUrlBox |
( |
const File & |
file, |
|
|
uint64_t |
length_box, |
|
|
string * |
path_file |
|
) |
| |
|
private |
Reads the information of a URL box.
- Parameters
-
| file | Image file. |
| length_box | Box length in bytes. |
| path_file | Receives the URL path read. |
- Returns
true if successful.
| string jpeg2000::FileManager::root_dir |
( |
| ) |
const |
|
inline |
Returns the root directory of the image repository.
| string jpeg2000::FileManager::cache_dir_ |
|
private |
| string jpeg2000::FileManager::root_dir_ |
|
private |
Root directory of the repository.
The documentation for this class was generated from the following files: