00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012
00013 #ifndef LTI_BANDSELECTFILTER_H
00014 #define LTI_BANDSELECTFILTER_H
00015
00016
00017 #include "lti_imageFilter.h"
00018 #include "lti_imageStageOverrides.h"
00019
00020
00021 LT_BEGIN_NAMESPACE(LizardTech)
00022 class LTReusableBuffer;
00035 #ifdef SWIG
00036 class LTIBandSelectFilter : public LTIImageFilter
00037 #else
00038 class LTIBandSelectFilter : public LTIOverridePixelProps
00039 <LTIOverrideBackgroundPixel
00040 <LTIOverrideMetadata
00041 <LTIImageFilter> > >
00042 #endif
00043 {
00044 LTI_REFERENCE_COUNTED_BOILERPLATE(LTIBandSelectFilter);
00045 public:
00070 LT_STATUS initialize(LTIImageStage *srcImages[],
00071 const int srcImageBands[],
00072 lt_uint16 numOutputBands,
00073 LTIColorSpace colorSpace);
00074
00088 LT_STATUS initialize(LTIImageStage *srcImages[],
00089 lt_uint16 numOutputBands,
00090 LTIColorSpace colorSpace);
00091
00107 LT_STATUS initialize(LTIImageStage* srcImage,
00108 const lt_uint16 srcImageBands[],
00109 lt_uint16 numOutputBands,
00110 LTIColorSpace colorSpace);
00111
00112
00113 lt_uint32 getStripHeight() const;
00114 LT_STATUS setStripHeight(lt_uint32 stripHeight);
00115 lt_int64 getEncodingCost(const LTIScene& scene) const;
00116
00145 static LT_STATUS parseString(const char* inputString,
00146 lt_int32 *&bandList,
00147 lt_uint16& numBands);
00148
00149
00150 virtual lt_uint32 getModifications(const LTIScene &scene) const;
00151
00152
00153
00154
00155 LT_STATUS remapBands(const lt_uint16 srcImageBands[]);
00156 LT_STATUS getBandMap(lt_uint16 srcImageBands[]) const;
00157
00158 static LT_STATUS push(LTIImageStage *&pipeline, const LTIPixel &pixelProps);
00159
00160 static void remapPixel(const LTIPixel &srcPixel,
00161 const lt_uint16 srcImageBands[],
00162 LTIPixel &dstPixel);
00163 struct BandSelectMap;
00164 protected:
00165 LT_STATUS decodeBegin(const LTIPixel &pixelProps,
00166 const LTIScene &fullScene);
00167 LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer,
00168 const LTIScene &stripScene);
00169 LT_STATUS decodeEnd(void);
00170
00171 protected:
00172 enum SourcePixel
00173 {
00174 NodataPixel,
00175 BackgroundPixel,
00176 DRMinPixel,
00177 DRMaxPixel
00178 };
00179 void remapPixel(LTIPixel& pixel, SourcePixel name) const;
00180
00181 BandSelectMap *m_bandSelectMap;
00182 BandSelectMap *m_decodeMap;
00183
00184 private:
00185 LT_STATUS privateInit(lt_uint16 numOutputBands,
00186 LTIColorSpace colorSpace,
00187 bool callInit);
00188 };
00189
00190
00191 LT_END_NAMESPACE(LizardTech)
00192
00193 #endif // LTI_BANDSELECTFILTER_H