ESA JPIP server  0.1
jpeg2000::CodingParameters Class Reference

Contains the coding parameters of a JPEG2000 image codestream. More...

#include <coding_parameters.h>

Collaboration diagram for jpeg2000::CodingParameters:

Public Types

enum  {
  LRCP_PROGRESSION = 0, RLCP_PROGRESSION = 1, RPCL_PROGRESSION = 2, PCRL_PROGRESSION = 3,
  CPRL_PROGRESSION = 4
}
 All the progression orders defined in the JPEG2000 standard (Part 1). More...
 
typedef SHARED_PTR< CodingParametersPtr
 Pointer to an object of this class. More...
 

Public Member Functions

 CodingParameters ()
 Initializes the object. More...
 
 CodingParameters (const CodingParameters &cod_params)
 Copy constructor. More...
 
const CodingParametersoperator= (const CodingParameters &cod_params)
 Copy assignment. More...
 
template<typename T >
T & SerializeWith (T &stream)
 
bool IsResolutionProgression () const
 Returns true if the progression is RLCP or RPCL. More...
 
Size GetPrecincts (int r, const Size &point)
 Returns a precinct coordinate adjusted to a given resolution level. More...
 
int GetProgressionIndex (const Packet &packet)
 Returns the index of a packet according to the progression order. More...
 
int GetPrecinctDataBinId (const Packet &packet)
 Returns the data-bin identifier associated to the given packet. More...
 
int GetClosestResolution (const Size &res_size, Size *res_image_size)
 Returns the resolution level according to the given size and the closest round policy. More...
 
int GetRoundUpResolution (const Size &res_size, Size *res_image_size)
 Returns the resolution level according to the given size and the round-up round policy. More...
 
int GetRoundDownResolution (const Size &res_size, Size *res_image_size)
 Returns the resolution level according to the given size and the round-down round policy. More...
 
virtual ~CodingParameters ()
 

Public Attributes

Size size
 Image size. More...
 
int num_levels
 Number of resolution levels. More...
 
int num_layers
 Number of quality layers. More...
 
int progression
 Progression order. More...
 
int num_components
 Number of components. More...
 
vector< Sizeprecinct_size
 Precinct sizes of each resolution level. More...
 

Private Member Functions

void FillTotalPrecinctsVector ()
 Fills the vector total_precincts. More...
 
int GetProgressionIndexRPCL (int l, int r, int c, int px, int py)
 Returns the index of a packet according to the RPCL progression. More...
 
int GetProgressionIndexRLCP (int l, int r, int c, int px, int py)
 Returns the index of a packet according to the RLCP progression. More...
 
int GetProgressionIndexLRCP (int l, int r, int c, int px, int py)
 Returns the index of a packet according to the LRCP progression. More...
 

Private Attributes

vector< int > total_precincts
 Contains the number of precincts of each resolution level. More...
 

Friends

ostream & operator<< (ostream &out, const CodingParameters &params)
 

Detailed Description

Contains the coding parameters of a JPEG2000 image codestream.

This class can be serialized and printed.

Member Typedef Documentation

Pointer to an object of this class.

Member Enumeration Documentation

anonymous enum

All the progression orders defined in the JPEG2000 standard (Part 1).

Enumerator
LRCP_PROGRESSION 

LRCP.

RLCP_PROGRESSION 

RLCP.

RPCL_PROGRESSION 

RPCL.

PCRL_PROGRESSION 

PCRL.

CPRL_PROGRESSION 

CPRL.

Constructor & Destructor Documentation

jpeg2000::CodingParameters::CodingParameters ( )
inline

Initializes the object.

jpeg2000::CodingParameters::CodingParameters ( const CodingParameters cod_params)
inline

Copy constructor.

virtual jpeg2000::CodingParameters::~CodingParameters ( )
inlinevirtual

Member Function Documentation

void jpeg2000::CodingParameters::FillTotalPrecinctsVector ( )
private

Fills the vector total_precincts.

Here is the call graph for this function:

Here is the caller graph for this function:

int jpeg2000::CodingParameters::GetClosestResolution ( const Size res_size,
Size res_image_size 
)

Returns the resolution level according to the given size and the closest round policy.

Parameters
res_sizeResolution size.
res_image_sizeImage size associated to the resolution level returned.
int jpeg2000::CodingParameters::GetPrecinctDataBinId ( const Packet packet)
inline

Returns the data-bin identifier associated to the given packet.

Parameters
packetPacket information.

Here is the call graph for this function:

Size jpeg2000::CodingParameters::GetPrecincts ( int  r,
const Size point 
)
inline

Returns a precinct coordinate adjusted to a given resolution level.

Parameters
rResolution level.
pointPrecinct coordinate.

Here is the caller graph for this function:

int jpeg2000::CodingParameters::GetProgressionIndex ( const Packet packet)
inline

Returns the index of a packet according to the progression order.

Parameters
packetPacket information.

Here is the call graph for this function:

int jpeg2000::CodingParameters::GetProgressionIndexLRCP ( int  l,
int  r,
int  c,
int  px,
int  py 
)
inlineprivate

Returns the index of a packet according to the LRCP progression.

Parameters
lQuality layer.
rResolution level.
cComponent.
pxPrecinct position X.
pyPrecinct position Y.

Here is the call graph for this function:

Here is the caller graph for this function:

int jpeg2000::CodingParameters::GetProgressionIndexRLCP ( int  l,
int  r,
int  c,
int  px,
int  py 
)
inlineprivate

Returns the index of a packet according to the RLCP progression.

Parameters
lQuality layer.
rResolution level.
cComponent.
pxPrecinct position X.
pyPrecinct position Y.

Here is the call graph for this function:

Here is the caller graph for this function:

int jpeg2000::CodingParameters::GetProgressionIndexRPCL ( int  l,
int  r,
int  c,
int  px,
int  py 
)
inlineprivate

Returns the index of a packet according to the RPCL progression.

Parameters
lQuality layer.
rResolution level.
cComponent.
pxPrecinct position X.
pyPrecinct position Y.

Here is the call graph for this function:

Here is the caller graph for this function:

int jpeg2000::CodingParameters::GetRoundDownResolution ( const Size res_size,
Size res_image_size 
)

Returns the resolution level according to the given size and the round-down round policy.

Parameters
res_sizeResolution size.
res_image_sizeImage size associated to the resolution level returned.
int jpeg2000::CodingParameters::GetRoundUpResolution ( const Size res_size,
Size res_image_size 
)

Returns the resolution level according to the given size and the round-up round policy.

Parameters
res_sizeResolution size.
res_image_sizeImage size associated to the resolution level returned.
bool jpeg2000::CodingParameters::IsResolutionProgression ( ) const
inline

Returns true if the progression is RLCP or RPCL.

const CodingParameters& jpeg2000::CodingParameters::operator= ( const CodingParameters cod_params)
inline

Copy assignment.

Here is the call graph for this function:

template<typename T >
T& jpeg2000::CodingParameters::SerializeWith ( T &  stream)
inline

Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
const CodingParameters params 
)
friend

Member Data Documentation

int jpeg2000::CodingParameters::num_components

Number of components.

int jpeg2000::CodingParameters::num_layers

Number of quality layers.

int jpeg2000::CodingParameters::num_levels

Number of resolution levels.

vector<Size> jpeg2000::CodingParameters::precinct_size

Precinct sizes of each resolution level.

int jpeg2000::CodingParameters::progression

Progression order.

Size jpeg2000::CodingParameters::size

Image size.

vector<int> jpeg2000::CodingParameters::total_precincts
private

Contains the number of precincts of each resolution level.


The documentation for this class was generated from the following files: