MrSID Decode SDK for Raster Reference Manual 9.5.5.5244
lti_sample.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_SAMPLE_H
9#define LTI_SAMPLE_H
10
11// lt_lib_mrsid_core
12#include "lti_types.h"
13
14LT_BEGIN_LIZARDTECH_NAMESPACE
15
24{
25public:
37 LTISample(lt_uint16 srcBandIndex,
38 LTIColor color,
39 LTIDataType dataType,
40 const void *data = nullptr);
41
43
48
52 virtual ~LTISample();
53
57 virtual LTISample& operator=(const LTISample&);
58
62 bool operator==(const LTISample&) const;
63
67 bool operator!=(const LTISample&) const;
68
77
86
95
107 void setPrecision(lt_uint32 precision);
108
117
128
138 LT_STATUS checkImpedance(const LTISample& sample) const;
139
145 bool isValueMin() const;
146
152 bool isValueMax() const;
153
160
167
175
183
192 void setValueAddr(const void*);
193 const void* getValueAddr() const;
194
201 void setValueFloat32(float);
202 void setValueFloat64(double);
203
210 float getValueFloat32() const;
211 double getValueFloat64() const;
212
214 double getValueAsDouble() const;
217protected:
218 friend class LTIPixel;
219 void setColor(LTIColor color);
220
221private:
222 union ValueType
223 {
224 lt_uint8 uint8;
225 lt_uint16 uint16;
226 lt_uint32 uint32;
227
228 lt_int8 sint8;
229 lt_int16 sint16;
230 lt_int32 sint32;
231
232 float float32;
233 double float64;
234
235 //float complex32[2];
236 //double complex64[2];
237 };
238
239 lt_uint16 m_srcIndex;
240 LTIDataType m_dataType;
241 LTIColor m_color;
242 lt_uint32 m_numBytes;
243 lt_uint32 m_precision;
244 ValueType m_value;
245};
246
247
248LT_END_LIZARDTECH_NAMESPACE
249
250#endif // LTI_SAMPLE_H
This file contains a number of enums, typedefs, etc, that are used throughout the MrSID SDK.
LTIDataType
datatypes
Definition: lti_types.h:101
LTIColor
colors
Definition: lti_types.h:79
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:30
unsigned short lt_uint16
unsigned 16-bit integer
Definition: lt_types.h:40
signed char lt_int8
signed 8-bit integer
Definition: lt_types.h:34
unsigned char lt_uint8
unsigned 8-bit integer
Definition: lt_types.h:36
signed short lt_int16
signed 16-bit integer
Definition: lt_types.h:38
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:44
signed int lt_int32
signed 32-bit integer
Definition: lt_types.h:42
basic properties of a pixel
Definition: lti_pixel.h:32
basic properties of a sample
Definition: lti_sample.h:24
bool isValueMax() const
is the sample value maximum
lt_uint32 getNumBytes() const
get the size of a sample
void setValueUint8(lt_uint8)
lt_uint8 getValueUint8() const
float getValueFloat32() const
void setValueUint32(lt_uint32)
void setValueToMin()
sets the sample value minimum
virtual ~LTISample()
destructor
void setValueUint16(lt_uint16)
LT_STATUS checkImpedance(const LTISample &sample) const
returns status code comparing two samples
void setValueSint16(lt_int16)
void setValueToMax()
sets the sample value maximum
lt_uint16 getValueUint16() const
void setValueAddr(const void *)
bool operator!=(const LTISample &) const
equality operator
void setValueToMin(const LTISample &)
sets the sample value minimum
void setValueFloat32(float)
LTIColor getColor() const
get the color
LTISample(const LTISample &)
copy constructor
double getValueFloat64() const
lt_int8 getValueSint8() const
LTIDataType getDataType() const
get the sample datatype
void setColor(LTIColor color)
void setValueFloat64(double)
void setPrecision(lt_uint32 precision)
sets the precision of the sample
lt_uint16 getSourceBandIndex() const
get the sample source band index
bool operator==(const LTISample &) const
equality operator
LTISample(lt_uint16 srcBandIndex, LTIColor color, LTIDataType dataType, const void *data=nullptr)
default constructor
lt_uint32 getValueUint32() const
LT_STATUS setValueFromDouble(double)
void setValueSint32(lt_int32)
lt_int32 getValueSint32() const
lt_uint32 getPrecision() const
returns the precision of the sample
lt_int16 getValueSint16() const
virtual LTISample & operator=(const LTISample &)
assignment operator
void setValueToMax(const LTISample &)
sets the sample value maximum
bool isValueMin() const
is the sample value minimum
const void * getValueAddr() const
double getValueAsDouble() const
void setValueSint8(lt_int8)

Extensis