MrSID Decode SDK for Raster Reference Manual 9.5.5.5244
lti_bbbImageReader.h
Go to the documentation of this file.
1//
2// This code is property of Celartem, Inc dba Extensis.
3// Copyright (c) 1995-2023. All rights reserved.
4// Use permitted only under license from Extensis.
5//
6/* PUBLIC */
7
8#ifndef LTI_BBB_IMAGE_READER_H
9#define LTI_BBB_IMAGE_READER_H
10
11// lt_lib_mrsid_core
12#include "lti_rawImageReader.h"
13
14// system
15#include <stdio.h> // for FILE*
16
17LT_BEGIN_LIZARDTECH_NAMESPACE
18
19class LTIBBBHeaderReader;
20
29{
31public:
40 LT_STATUS initialize(const LTFileSpec& fileSpec, bool useWorldFile = true);
41
50 LT_STATUS initialize(const char* file, bool useWorldFile = true);
51};
52
53#ifndef DOXYGEN_EXCLUDE
54
55class LTIBBBHeaderReader
56{
57 LT_DISALLOW_COPY_CONSTRUCTOR(LTIBBBHeaderReader);
58
59public:
60 LTIBBBHeaderReader(const LTFileSpec&);
61 ~LTIBBBHeaderReader();
62 LT_STATUS read();
63
64public:
65 int m_width;
66 int m_height;
67 LTIDataType m_dataType;
68 LTIColorSpace m_colorSpace;
69 int m_numBands;
70 LTILayout m_layout;
71 char* m_byteOrder;
72 int m_numBits;
73 LTIEndian m_endian;
74
75 double m_window;
76 double m_level;
77 double m_drMin;
78 double m_drMax;
79 bool m_hasWindow;
80 bool m_hasLevel;
81 bool m_hasDRMin;
82 bool m_hasDRMax;
83
84 int m_bandgapbytes;
85 int m_bandrowbytes;
86 int m_totalrowbytes;
87 int m_skipbytes;
88
89 bool m_hasUlxmap;
90 bool m_hasUlymap;
91 bool m_hasXllcorner;
92 bool m_hasYllcorner;
93 bool m_hasXllcenter;
94 bool m_hasYllcenter;
95 bool m_hasXdim;
96 bool m_hasYdim;
97 bool m_hasCellsize;
98 double m_ulxmap;
99 double m_ulymap;
100 double m_xllcorner;
101 double m_yllcorner;
102 double m_xllcenter;
103 double m_yllcenter;
104 double m_xdim;
105 double m_ydim;
106 double m_cellsize;
107
108 // Imagine header data
109 bool m_bFromImagine; //indicates whether to display Imagine Metadata
110 char* m_projname;
111 char* m_sphereName;
112 char* m_units;
113 int m_proZone;
114 double* m_projParams;
115 double m_sphereMajor;
116 double m_sphereMinor;
117 double m_sphereEccentricitySquared;
118 double m_sphereRadius;
119
120 char* m_wkt;
121 double* m_nodata;
122 int m_nodataSize;
123
124private:
125 LT_STATUS init();
126 LT_STATUS finish();
127 LT_STATUS readLines();
128 LT_STATUS readLine(int& offset_last, bool& done);
129 LT_STATUS nextLine();
130 LT_STATUS readInt(int&);
131 LT_STATUS readDouble(double&);
132 LT_STATUS readString(char*);
133
134 const LTFileSpec& m_fileSpec;
135 FILE* m_fp;
136};
137#endif
138
139LT_END_LIZARDTECH_NAMESPACE
140
141#endif // LTI_BBB_IMAGE_READER_H
#define LTI_REFERENCE_COUNTED_BOILERPLATE(classname)
LTIDataType
datatypes
Definition: lti_types.h:101
LTILayout
constants representing data layout
Definition: lti_types.h:148
LTIColorSpace
colorspaces
Definition: lti_types.h:34
LTIEndian
constants representing endianness (byte order)
Definition: lti_types.h:160
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:30
Represents a file or directory path.
Definition: lt_fileSpec.h:35
read an image from a BBB file
LT_STATUS initialize(const LTFileSpec &fileSpec, bool useWorldFile=true)
intializer
LT_STATUS initialize(const char *file, bool useWorldFile=true)
intializer
class for reading RAW files

Extensis