HiRISE
 PDS_JP2

Image_Data_Block Class Reference

An Image_Data_Block describes PDS image data. More...

#include <Image_Data_Block.hh>

Inheritance diagram for Image_Data_Block:

Inheritance graph
[legend]
Collaboration diagram for Image_Data_Block:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Image_Data_Block ()
 Constructs an empty Image_Data_Block.
 Image_Data_Block (const idaeim::PVL::Aggregate &parameters, std::ios::off_type file_offset)
 Constructs an Image_Data_Block for an IMAGE OBJECT.
unsigned int image_bands ()
 Get the number of bands in the image.
unsigned int image_width ()
 Get the width of the image.
unsigned int image_height ()
 Get the height of the image.
unsigned int pixel_bytes ()
 Get the storage size of a pixel in bytes.
unsigned int pixel_bits ()
 Get the number valid bits (data precision) in a pixel.
int signed_data ()
 Check if the pixel data is signed.
int MSB_data ()
 Determine if the pixel data is MSB ordered.
unsigned int line_prefix_bytes ()
 Get the number of line prefix bytes.
unsigned int line_suffix_bytes ()
 Get the number of line suffix bytes.

Static Public Attributes

static const char *const ID
 Class identification name with source code version and date.
static const char *const IMAGE_BANDS_PARAMETER_NAME = "BANDS"
 The name of the parameter used to obtain the image bands value.
static const char *const IMAGE_WIDTH_PARAMETER_NAME = "LINE_SAMPLES"
 The name of the parameter used to obtain the image width value.
static const char *const IMAGE_HEIGHT_PARAMETER_NAME = "LINES"
 The name of the parameter used to obtain the image height value.
static const char *const PIXEL_BYTES_PARAMETER_NAME = "SAMPLE_BITS"
 The name of the parameter used to obtain the pixel storage bytes value.
static const char *const PIXEL_BITS_PARAMETER_NAME = "SAMPLE_BIT_MASK"
 The name of the parameter used to obtain the valid pixel bits value.
static const char *const PIXEL_DATA_TYPE_PARAMETER_NAME = "SAMPLE_TYPE"
 The name of the parameter used to obtain the pixel data type values.
static const char *const UNSIGNED_PIXEL_TYPE_IDENTIFIER = "UNSIGNED"
 Substring of the PIXEL_DATA_TYPE_PARAMETER_NAME parameter that identifies an unsigned pixel value.
static const char *const SIGNED_PIXEL_TYPE_IDENTIFIER = "SIGNED"
 Substring of the PIXEL_DATA_TYPE_PARAMETER_NAME parameter that identifies a signed pixel value.
static const char *const LSB_PIXEL_TYPE_IDENTIFIER = "LSB"
 Substring of the PIXEL_DATA_TYPE_PARAMETER_NAME parameter that identifies an LSB ordered pixel.
static const char *const MSB_PIXEL_TYPE_IDENTIFIER = "MSB"
 Substring of the PIXEL_DATA_TYPE_PARAMETER_NAME parameter that identifies an MSB ordered pixel.
static const char *const LINE_PREFIX_BYTES_PARAMETER_NAME = "LINE_PREFIX_BYTES"
 The name of the parameter used to obtain the line prefix bytes value.
static const char *const LINE_SUFFIX_BYTES_PARAMETER_NAME = "LINE_SUFFIX_BYTES"
 The name of the parameter used to obtain the line suffix bytes value.

Protected Member Functions

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


Detailed Description

An Image_Data_Block describes PDS image data.

An Image_Data_Block is a PDS_Data_Block that specializes in describing PDS image data.

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

Constructor & Destructor Documentation

Image_Data_Block (  ) 

Constructs an empty Image_Data_Block.

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

Constructs an Image_Data_Block for an IMAGE OBJECT.

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


Member Function Documentation

unsigned int image_bands (  )  [inline]

Get the number of bands in the image.

The number of image bands is assumed to be 1 if it can not be determined from the IMAGE_BANDS_PARAMETER_NAME parameter.

Returns:
The number of image bands.

unsigned int image_width (  )  [inline]

Get the width of the image.

Returns:
The number of pixels in each line of the image. This will be zero if the value could not be determined from the IMAGE_WIDTH_PARAMETER_NAME parameter.

unsigned int image_height (  )  [inline]

Get the height of the image.

Returns:
The number of lines in the image. This will be zero if the value could not be determined from the IMAGE_HEIGHT_PARAMETER_NAME parameter.

unsigned int pixel_bytes (  )  [inline]

Get the storage size of a pixel in bytes.

N.B.: The number of valid bits in a pixel may be less than the total number of bits in the pixel bytes used to store the pixel.

Returns:
The number of storage bytes per pixel. This will be zero if the value could not be determined from the PIXEL_BYTES_PARAMETER_NAME parameter.

unsigned int pixel_bits (  )  [inline]

Get the number valid bits (data precision) in a pixel.

If the number of bits per pixel can not be determined from the PIXEL_BITS_PARAMETER_NAME parameter the valid pixel bits are assumed to be all bits in the pixel bytes.

N.B.: The number of valid bits in a pixel may be less than the total number of bits in the pixel bytes used to store the pixel. The valid pixel bits occupy the least significant bits of the pixel bytes.

Returns:
The number of valid bits in a pixel. This will be zero if neither the PIXEL_BITS_PARAMETER_NAME parameter could be found nor the bytes per pixel determined.

int signed_data (  )  [inline]

Check if the pixel data is signed.

The signedness of the data is determined by identifying the UNSIGNED_PIXEL_TYPE_IDENTIFIER or SIGNED_PIXEL_TYPE_IDENTIFIER substring in the PIXEL_DATA_TYPE_PARAMETER_NAME parameter.

Returns:
1 if the data is signed, -1 if unsigned, 0 if unknown.

int MSB_data (  )  [inline]

Determine if the pixel data is MSB ordered.

The data order is determined by identifying the LSB_PIXEL_TYPE_IDENTIFIER or MSB_PIXEL_TYPE_IDENTIFIER substring in the PIXEL_DATA_TYPE_PARAMETER_NAME parameter.

Returns:
1 if the data is MSB ordered, -1 if LSB ordered, 0 if unknown.

unsigned int line_prefix_bytes (  )  [inline]

Get the number of line prefix bytes.

Returns:
The number of bytes preceeding each image pixel data line. This will be zero if the value could not be determined from the LINE_PREFIX_BYTES_PARAMETER_NAME parameter.

unsigned int line_suffix_bytes (  )  [inline]

Get the number of line suffix bytes.

Returns:
The number of bytes following each image pixel data line. This will be zero if the value could not be determined from the LINE_SUFFIX_BYTES_PARAMETER_NAME parameter.

unsigned long long data_block_size (  )  [protected, virtual]

Calculate the size of the binary data block.

The image data block size is calculated as:

image_height() * (line_prefix_bytes() + (image_width() * pixel_bytes()) + line_suffix_bytes()) image_bands()

N.B.: All of the image characterization values are determined in this method. It is presumed that it is called when the object is constructed.

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

Reimplemented from PDS_Data_Block.


Member Data Documentation

const char *const ID [static]

Initial value:

        "UA::HiRISE::Image_Data_Block (1.12 2007/12/11 04:08:41)"
Class identification name with source code version and date.

Reimplemented from PDS_Data_Block.

const char *const IMAGE_BANDS_PARAMETER_NAME = "BANDS" [static]

The name of the parameter used to obtain the image bands value.

const char *const IMAGE_WIDTH_PARAMETER_NAME = "LINE_SAMPLES" [static]

The name of the parameter used to obtain the image width value.

const char *const IMAGE_HEIGHT_PARAMETER_NAME = "LINES" [static]

The name of the parameter used to obtain the image height value.

const char *const PIXEL_BYTES_PARAMETER_NAME = "SAMPLE_BITS" [static]

The name of the parameter used to obtain the pixel storage bytes value.

const char *const PIXEL_BITS_PARAMETER_NAME = "SAMPLE_BIT_MASK" [static]

The name of the parameter used to obtain the valid pixel bits value.

const char *const PIXEL_DATA_TYPE_PARAMETER_NAME = "SAMPLE_TYPE" [static]

The name of the parameter used to obtain the pixel data type values.

const char *const UNSIGNED_PIXEL_TYPE_IDENTIFIER = "UNSIGNED" [static]

Substring of the PIXEL_DATA_TYPE_PARAMETER_NAME parameter that identifies an unsigned pixel value.

const char *const SIGNED_PIXEL_TYPE_IDENTIFIER = "SIGNED" [static]

Substring of the PIXEL_DATA_TYPE_PARAMETER_NAME parameter that identifies a signed pixel value.

const char *const LSB_PIXEL_TYPE_IDENTIFIER = "LSB" [static]

Substring of the PIXEL_DATA_TYPE_PARAMETER_NAME parameter that identifies an LSB ordered pixel.

const char *const MSB_PIXEL_TYPE_IDENTIFIER = "MSB" [static]

Substring of the PIXEL_DATA_TYPE_PARAMETER_NAME parameter that identifies an MSB ordered pixel.

const char *const LINE_PREFIX_BYTES_PARAMETER_NAME = "LINE_PREFIX_BYTES" [static]

The name of the parameter used to obtain the line prefix bytes value.

const char *const LINE_SUFFIX_BYTES_PARAMETER_NAME = "LINE_SUFFIX_BYTES" [static]

The name of the parameter used to obtain the line suffix bytes value.


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