HiRISE
 PDS_JP2

Image_Data_Block.hh
Go to the documentation of this file.
1/* Image_Data_Block
2
3HiROC CVS ID: Image_Data_Block.hh,v 1.13 2013/03/14 21:00:43 guym Exp
4
5Copyright (C) 2006-2007 Arizona Board of Regents on behalf of the
6Planetary Image Research Laboratory, Lunar and Planetary Laboratory at
7the University of Arizona.
8
9This program is free software; you can redistribute it and/or modify it
10under the terms of the GNU General Public License, version 2, as
11published by the Free Software Foundation.
12
13This program is distributed in the hope that it will be useful, but
14WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16General Public License for more details.
17
18You should have received a copy of the GNU General Public License along
19with this program; if not, write to the Free Software Foundation, Inc.,
2059 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21*/
22
23#ifndef _Image_Data_Block_
24#define _Image_Data_Block_
25
26#include "PDS_Data_Block.hh"
27
28#include <string>
29
30namespace UA
31{
32namespace HiRISE
33{
44: public PDS_Data_Block
45{
46public:
47/*==============================================================================
48 Constants:
49*/
51static const char* const ID;
52
54static const char* const
56
58static const char* const
60
62static const char* const
64
66static const char* const
68
70static const char* const
72
74static const char* const
76
80static const char* const
82
86static const char* const
88
92static const char* const
94
98static const char* const
100
102static const char* const
104
106static const char* const
108
109/*==============================================================================
110 Constructors
111*/
115
122 (
124 std::ios::off_type file_offset
125 );
126
133 (
135 const std::string& filename
136 );
137
138
139/*==============================================================================
140 Accessors:
141*/
149unsigned int image_bands ()
150{return Image_Bands;}
151
158unsigned int image_width ()
159{return Image_Width;}
160
167unsigned int image_height ()
168{return Image_Height;}
169
180unsigned int pixel_bytes ()
181{return Pixel_Bytes;}
182
198unsigned int pixel_bits ()
199{return Pixel_Bits;}
200
210{return Signed_Data;}
211
221{return MSB_Data;}
222
229unsigned int line_prefix_bytes ()
230{return Line_Prefix_Bytes;}
231
238unsigned int line_suffix_bytes ()
239{return Line_Suffix_Bytes;}
240
241std::string source_filename();
242
243/*------------------------------------------------------------------------------
244 * Manipulators
245 */
246std::string source_filename(std::string& pathname);
247
248/*==============================================================================
249 Data Members:
250*/
251protected:
252
253
270virtual unsigned long long data_block_size ();
271
272private:
273
274std::string
275 Source_Filename;
276
277unsigned int
278 Image_Bands,
279 Image_Width,
280 Image_Height,
281 Pixel_Bytes,
282 Pixel_Bits,
283 Line_Prefix_Bytes,
284 Line_Suffix_Bytes;
285
287int
288 Signed_Data,
289 MSB_Data;
290};
291
292} // namespace HiRISE
293} // namespace UA
294#endif
Image_Data_Block()
Constructs an empty Image_Data_Block.
Definition Image_Data_Block.cc:94
static const char *const SIGNED_PIXEL_TYPE_IDENTIFIER
Substring of the PIXEL_DATA_TYPE_PARAMETER_NAME parameter that identifies a signed pixel value.
Definition Image_Data_Block.hh:87
static const char *const IMAGE_BANDS_PARAMETER_NAME
The name of the parameter used to obtain the image bands value.
Definition Image_Data_Block.hh:55
static const char *const PIXEL_BYTES_PARAMETER_NAME
The name of the parameter used to obtain the pixel storage bytes value.
Definition Image_Data_Block.hh:67
std::string source_filename()
Definition Image_Data_Block.cc:160
int MSB_data()
Determine if the pixel data is MSB ordered.
Definition Image_Data_Block.hh:220
virtual unsigned long long data_block_size()
Calculate the size of the binary data block.
Definition Image_Data_Block.cc:172
unsigned int image_bands()
Get the number of bands in the image.
Definition Image_Data_Block.hh:149
static const char *const IMAGE_HEIGHT_PARAMETER_NAME
The name of the parameter used to obtain the image height value.
Definition Image_Data_Block.hh:63
static const char *const LINE_SUFFIX_BYTES_PARAMETER_NAME
The name of the parameter used to obtain the line suffix bytes value.
Definition Image_Data_Block.hh:107
static const char *const LINE_PREFIX_BYTES_PARAMETER_NAME
The name of the parameter used to obtain the line prefix bytes value.
Definition Image_Data_Block.hh:103
unsigned int image_width()
Get the width of the image.
Definition Image_Data_Block.hh:158
int signed_data()
Check if the pixel data is signed.
Definition Image_Data_Block.hh:209
unsigned int pixel_bytes()
Get the storage size of a pixel in bytes.
Definition Image_Data_Block.hh:180
static const char *const PIXEL_BITS_PARAMETER_NAME
The name of the parameter used to obtain the valid pixel bits value.
Definition Image_Data_Block.hh:71
unsigned int line_suffix_bytes()
Get the number of line suffix bytes.
Definition Image_Data_Block.hh:238
static const char *const PIXEL_DATA_TYPE_PARAMETER_NAME
The name of the parameter used to obtain the pixel data type values.
Definition Image_Data_Block.hh:75
unsigned int line_prefix_bytes()
Get the number of line prefix bytes.
Definition Image_Data_Block.hh:229
static const char *const LSB_PIXEL_TYPE_IDENTIFIER
Substring of the PIXEL_DATA_TYPE_PARAMETER_NAME parameter that identifies an LSB ordered pixel.
Definition Image_Data_Block.hh:93
Image_Data_Block()
Constructs an empty Image_Data_Block.
Definition Image_Data_Block.cc:94
static const char *const MSB_PIXEL_TYPE_IDENTIFIER
Substring of the PIXEL_DATA_TYPE_PARAMETER_NAME parameter that identifies an MSB ordered pixel.
Definition Image_Data_Block.hh:99
static const char *const IMAGE_WIDTH_PARAMETER_NAME
The name of the parameter used to obtain the image width value.
Definition Image_Data_Block.hh:59
static const char *const ID
Class identification name with source code version and date.
Definition Image_Data_Block.hh:51
unsigned int pixel_bits()
Get the number valid bits (data precision) in a pixel.
Definition Image_Data_Block.hh:198
static const char *const UNSIGNED_PIXEL_TYPE_IDENTIFIER
Substring of the PIXEL_DATA_TYPE_PARAMETER_NAME parameter that identifies an unsigned pixel value.
Definition Image_Data_Block.hh:81
unsigned int image_height()
Get the height of the image.
Definition Image_Data_Block.hh:167
PDS_Data_Block()
Constructs an empty PDS_Data_Block.
Definition PDS_Data_Block.cc:68
virtual PDS_Data & parameters(const std::string &pathname)
Set the parameters from a source file.
Definition PDS_Data.cc:305
std::string pathname(const Parameter *root=NULL) const
Definition Dimensions.cc:32
Definition Dimensions.cc:30