svn-gvsig-desktop / trunk / libraries / libjni-mrsid / include / base / lti_bbbImageReader.h @ 3539
History | View | Annotate | Download (2.7 KB)
1 |
/* $Id: lti_bbbImageReader.h 3539 2006-01-09 12:23:20Z nacho $ */
|
---|---|
2 |
/* //////////////////////////////////////////////////////////////////////////
|
3 |
// //
|
4 |
// This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, //
|
5 |
// Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
|
6 |
// prohibited. Access to and use of this code is permitted only under //
|
7 |
// license from LizardTech, Inc. Portions of the code are protected by //
|
8 |
// US and foreign patents and other filings. All Rights Reserved. //
|
9 |
// //
|
10 |
////////////////////////////////////////////////////////////////////////// */
|
11 |
|
12 |
#ifndef LTI_BBB_IMAGE_READER_H
|
13 |
#define LTI_BBB_IMAGE_READER_H
|
14 |
|
15 |
// lt_lib_mrsid_core
|
16 |
#include "lti_rawImageReader.h" |
17 |
|
18 |
// system
|
19 |
#include <stdio.h> // for FILE* |
20 |
|
21 |
LT_BEGIN_NAMESPACE(LizardTech) |
22 |
|
23 |
class LTIOStreamInf; |
24 |
class LTIReusableBSQBuffer; |
25 |
|
26 |
/**
|
27 |
* read an image from a BBB file
|
28 |
*
|
29 |
* This class provides support for reading BBB files, i.e. a raw file with a
|
30 |
* BIL/BIP/BSQ-style header.
|
31 |
*
|
32 |
*/
|
33 |
class LTIBBBImageReader : public LTIRawImageReader |
34 |
{ |
35 |
public:
|
36 |
/**
|
37 |
* constructor
|
38 |
*
|
39 |
* This function creates an image from a BBB file.
|
40 |
*
|
41 |
* @param fileSpec the image file to read from
|
42 |
*/
|
43 |
LTIBBBImageReader(const LTFileSpec& fileSpec);
|
44 |
|
45 |
/**
|
46 |
* constructor
|
47 |
*
|
48 |
* This function creates an image from a BBB file.
|
49 |
*
|
50 |
* @param file the image file to read from
|
51 |
*/
|
52 |
LTIBBBImageReader(const char* file); |
53 |
|
54 |
/**
|
55 |
* destructor
|
56 |
*/
|
57 |
~LTIBBBImageReader(); |
58 |
|
59 |
/**
|
60 |
* intializer
|
61 |
*/
|
62 |
LT_STATUS initialize(); |
63 |
|
64 |
private:
|
65 |
LT_STATUS checkWorldFile(LTIGeoCoord*&); |
66 |
LT_STATUS doImagineMetadata(); |
67 |
|
68 |
LT_STATUS readHeaderFile(); |
69 |
LT_STATUS nextLine(); |
70 |
LT_STATUS readInt(int&);
|
71 |
LT_STATUS readDouble(double&);
|
72 |
LT_STATUS readString(char*);
|
73 |
|
74 |
class HeaderData; |
75 |
HeaderData* m_header; |
76 |
|
77 |
FILE* m_fp; |
78 |
|
79 |
LTIEndian m_endian; |
80 |
|
81 |
int m_bandgapbytes;
|
82 |
int m_bandrowbytes;
|
83 |
int m_totalrowbytes;
|
84 |
int m_skipbytes;
|
85 |
|
86 |
bool m_hasUlxmap;
|
87 |
bool m_hasUlymap;
|
88 |
bool m_hasXdim;
|
89 |
bool m_hasYdim;
|
90 |
|
91 |
double m_ulxmap;
|
92 |
double m_ulymap;
|
93 |
double m_xdim;
|
94 |
double m_ydim;
|
95 |
|
96 |
bool m_bFromImagine; //indicates whether to display Imagine Metadata |
97 |
|
98 |
//Imagine header data
|
99 |
char* m_projname;
|
100 |
char* m_sphereName;
|
101 |
char* m_units;
|
102 |
int m_proZone;
|
103 |
double* m_projParams;
|
104 |
double m_sphereMajor;
|
105 |
double m_sphereMinor;
|
106 |
double m_sphereEccentricitySquared;
|
107 |
double m_sphereRadius;
|
108 |
|
109 |
// nope
|
110 |
LTIBBBImageReader(); |
111 |
LTIBBBImageReader(LTIBBBImageReader&); |
112 |
LTIBBBImageReader& operator=(const LTIBBBImageReader&);
|
113 |
}; |
114 |
|
115 |
LT_END_NAMESPACE(LizardTech) |
116 |
|
117 |
#endif // LTI_BBB_IMAGE_READER_H |