HiRISE
 PDS_JP2

PDS_Data_Block Class Reference

A PDS_Data_Block describes a binary data block in a PDS label. More...

#include <PDS_Data_Block.hh>

Inheritance diagram for PDS_Data_Block:

Inheritance graph
[legend]
Collaboration diagram for PDS_Data_Block:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PDS_Data_Block ()
 Constructs an empty PDS_Data_Block.
 PDS_Data_Block (const idaeim::PVL::Aggregate &parameters, std::ios::off_type file_offset)
 Constructs a PDS_Data_Block from its PDS label parameters and source file data location.
std::ios::off_type location ()
 Get the offset location of the binary data block in the source file.
unsigned long long size ()
 Get the size of the data block.

Static Public Attributes

static const char *const ID
 Class identification.
static const char * BLOCK_WIDTH_PARAMETER_NAME = "ROW_BYTES"
 Name of the parameter specifying the binary block row width in bytes.
static const char * BLOCK_HEIGHT_PARAMETER_NAME = "ROWS"
 Name of the parameter specifying the binary block height in rows.

Protected Member Functions

virtual unsigned
long long 
data_block_size ()
 Calculate the size of the binary data block.

Protected Attributes

std::ios::off_type Location
 Offset location of the data block in the source file.
unsigned long long Size
 Size of the data block in bytes.


Detailed Description

A PDS_Data_Block describes a binary data block in a PDS label.

A PDS_Data_Block is the PDS_Data parameters that describes a binary data block along with the location and size of the binary data in the source file. A binary data block is located in a PDS label by a data block record pointer parameter. A record pointer parameter has a name that begins with the PDS_Data::RECORD_POINTER_PARAMETER_MARKER character. The value of a pointer parameter is the record number (offset + 1) where the binary data is located in the file. A Parameter Aggregate with the same name, but without the record pointer marker, contains the parameters that desrcribe the data block.

Author:
Bradford Castalia, Drew Davidson and Ben Pearson, UA/HiROC
Version:
1.8
See also:
PDS_Data

Constructor & Destructor Documentation

PDS_Data_Block (  ) 

Constructs an empty PDS_Data_Block.

PDS_Data_Block ( const idaeim::PVL::Aggregate parameters,
std::ios::off_type  file_offset 
)

Constructs a PDS_Data_Block from its PDS label parameters and source file data location.

N.B.: The Parameter Aggregate describing the data block is copied.

Parameters:
parameters Parameter Aggregate describing the data block
file_offset Data block offset location in the source file.


Member Function Documentation

std::ios::off_type location (  )  [inline]

Get the offset location of the binary data block in the source file.

Returns:
The file offset location of the binary data block.

unsigned long long size (  )  [inline]

Get the size of the data block.

Returns:
The size of the data block, in bytes.

unsigned long long data_block_size (  )  [protected, virtual]

Calculate the size of the binary data block.

The value of the BLOCK_WIDTH_PARAMETER_NAME parameter is multiplied by the value of the BLOCK_HEIGHT_PARAMETER_NAME parameter. If either of these parameters are not found in the data block description the result will be zero.

N.B.: This method may be overriden by subclasses that need to specialize how the data block size is determined.

Returns:
The size (bytes) of the binary data block in the source file.

Reimplemented in Image_Data_Block.


Member Data Documentation

const char *const ID [static]

Initial value:

        "UA::HiRISE::PDS_Data_Block (1.9 2007/08/06 07:53:52)"
Class identification.

Reimplemented from PDS_Data.

Reimplemented in Image_Data_Block.

const char * BLOCK_WIDTH_PARAMETER_NAME = "ROW_BYTES" [static]

Name of the parameter specifying the binary block row width in bytes.

const char * BLOCK_HEIGHT_PARAMETER_NAME = "ROWS" [static]

Name of the parameter specifying the binary block height in rows.

std::ios::off_type Location [protected]

Offset location of the data block in the source file.

unsigned long long Size [protected]

Size of the data block in bytes.


The documentation for this class was generated from the following files:
Generated on Wed Sep 30 23:48:24 2009 for UA::HiRISE::PDS_JP2 by  doxygen 1.5.3