//******************************************************************* // Copyright (C) 2005 Garrett Potts. // // License: MIT // // See LICENSE.txt file in the top level directory for more details. // // Author: Garrett Potts // //************************************************************************* // $Id: ossimClosestToCenterCombiner.h 23664 2015-12-14 14:17:27Z dburken $ #ifndef ossimClosestToCenterCombiner_HEADER #define ossimClosestToCenterCombiner_HEADER #include #include /** * This implements a closest to center combiner. * * It will first grab all images overlapping a given rectangle query. The first non-null * closest pixel to the center of the image is used. This basically uses only pixels along * the "sweet" spot of the image. This combiner is typically used when there is overlapping * sensor data. * */ class OSSIM_DLL ossimClosestToCenterCombiner : public ossimImageMosaic { public: ossimClosestToCenterCombiner(); /** * Executes the ossimClosestToCenterCombiner algorithm. sets the pixels to the closest * Valid value. This simulates a sweet spot cutter. * * @param rect The region of interest. * @param resLevel. For this combiner this is assumed to always be 0 */ virtual ossimRefPtr getTile(const ossimIrect& rect, ossim_uint32 resLevel=0); protected: class ossimClosestToCenterCombinerInfo { public: ossimClosestToCenterCombinerInfo(ossimRefPtr tile, ossim_int32 idx) :theTile(tile), theIndex(idx) { } ossimRefPtr theTile; ossim_int32 theIndex; }; ossim_int32 findIdx(const std::vector& normTileList, const ossimIpt& pt, ossim_uint32 offset)const; TYPE_DATA }; #endif