MrSID Decode SDK for Raster Reference Manual 9.5.4.4709

- Main Page
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

lti_sample.h
Go to the documentation of this file.
1 /* $Id$ */
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 // //
11 /* PUBLIC */
12
13 #ifndef LTI_SAMPLE_H
14 #define LTI_SAMPLE_H
15
16 // lt_lib_mrsid_core
17 #include "lti_types.h"
18
19 LT_BEGIN_NAMESPACE(LizardTech)
20
21
28 class LTISample
29 {
30 public:
42 LTISample(lt_uint16 srcBandIndex,
43 LTIColor color,
44 LTIDataType dataType,
45 const void *data = NULL);
46
47 LTISample();
48
52 LTISample(const LTISample&);
53
57 virtual ~LTISample();
58
62 virtual LTISample& operator=(const LTISample&);
63
67 bool operator==(const LTISample&) const;
68
72 bool operator!=(const LTISample&) const;
73
81 lt_uint16 getSourceBandIndex() const;
82
90 LTIDataType getDataType() const;
91
99 LTIColor getColor() const;
100
112 void setPrecision(lt_uint32 precision);
113
121 lt_uint32 getPrecision() const;
122
132 lt_uint32 getNumBytes() const;
133
143 LT_STATUS checkImpedance(const LTISample& sample) const;
144
150 bool isValueMin() const;
151
157 bool isValueMax() const;
158
164 void setValueToMin();
165
171 void setValueToMax();
172
179 void setValueToMin(const LTISample&);
180
187 void setValueToMax(const LTISample&);
188
197 void setValueAddr(const void*);
198 const void* getValueAddr() const;
199
200 void setValueUint8(lt_uint8);
201 void setValueUint16(lt_uint16);
202 void setValueUint32(lt_uint32);
203 void setValueSint8(lt_int8);
204 void setValueSint16(lt_int16);
205 void setValueSint32(lt_int32);
206 void setValueFloat32(float);
207 void setValueFloat64(double);
208
209 lt_uint8 getValueUint8() const;
210 lt_uint16 getValueUint16() const;
211 lt_uint32 getValueUint32() const;
212 lt_int8 getValueSint8() const;
213 lt_int16 getValueSint16() const;
214 lt_int32 getValueSint32() const;
215 float getValueFloat32() const;
216 double getValueFloat64() const;
217
218 LT_STATUS setValueFromDouble(double);
219 double getValueAsDouble() const;
222 protected:
223 friend class LTIPixel;
224 void setColor(LTIColor color);
225
226 private:
227 union ValueType
228 {
229 lt_uint8 uint8;
230 lt_uint16 uint16;
231 lt_uint32 uint32;
232
233 lt_int8 sint8;
234 lt_int16 sint16;
235 lt_int32 sint32;
236
237 float float32;
238 double float64;
239
240 //float complex32[2];
241 //double complex64[2];
242 };
243
244 lt_uint16 m_srcIndex;
245 LTIDataType m_dataType;
246 LTIColor m_color;
247 lt_uint32 m_numBytes;
248 lt_uint32 m_precision;
249 ValueType m_value;
250 };
251
252
253 LT_END_NAMESPACE(LizardTech)
254
255 #endif // LTI_SAMPLE_H

LizardTech