# opj_j2k Struct Reference
[J2K - JPEG-2000 codestream reader/writer]

`#include <gdcm_j2k.h>`

Collaboration diagram for opj_j2k:
[legend]

List of all members.

## Public Attributes
opj_common_ptr | cinfo
opj_cio_t * | cio
opj_cp_t * | cp
opj_codestream_info_t * | cstr_info
int * | cur_totnum_tp
int | cur_tp_num
int | curtileno
opj_tcp_t * | default_tcp
unsigned char * | eot
opj_image_t * | image
int | pos_correction
int | sod_start
int | sot_start
int | state
unsigned char ** | tile_data
int * | tile_len
int | tlm_start
int | totnum_tp
int | tp_num

## Detailed Description

JPEG-2000 codestream reader/writer

## Member Data Documentation

opj_common_ptr opj_j2k::cinfo

codec context

opj_cio_t* opj_j2k::cio

pointer to the byte i/o stream

opj_cp_t* opj_j2k::cp

pointer to the coding parameters

opj_codestream_info_t* opj_j2k::cstr_info

helper used to write the index file

int* opj_j2k::cur_totnum_tp

Total number of tileparts of the current tile

int opj_j2k::cur_tp_num

Tilepart number currently coding

int opj_j2k::curtileno

number of the tile curently concern by coding/decoding

opj_tcp_t* opj_j2k::default_tcp

decompression only : store decoding parameters common to all tiles (information like COD, COC in main header)

unsigned char* opj_j2k::eot

locate the position of the end of the tile in the codestream, used to detect a truncated codestream (in j2k_read_sod)

opj_image_t* opj_j2k::image

pointer to the encoded / decoded image

int opj_j2k::pos_correction

as the J2K-file is written in several parts during encoding, it enables to make the right correction in position return by cio_tell

int opj_j2k::sod_start

int opj_j2k::sot_start

locate the start position of the SOT marker of the current coded tile: after encoding the tile, a jump (in j2k_write_sod) is done to the SOT marker to store the value of its length.

int opj_j2k::state

locate in which part of the codestream the decoder is (main header, tile header, end)

unsigned char** opj_j2k::tile_data

array used to store the data of each tile

int* opj_j2k::tile_len

array used to store the length of each tile

int opj_j2k::tlm_start

locate the start position of the TLM marker after encoding the tilepart, a jump (in j2k_write_sod) is done to the TLM marker to store the value of its length.

int opj_j2k::totnum_tp

Total num of tile parts in whole image = num tiles* num tileparts in each tile used in TLMmarker

int opj_j2k::tp_num

Tile part number

The documentation for this struct was generated from the following file:

- gdcm_j2k.h