//******************************************************************* // // License: See top level LICENSE.txt file. // // Author: Garrett Potts (gpotts@imagelinks) // //************************************************************************* // $Id: ossimImageDataHelper.h 23356 2015-06-03 18:28:03Z dburken $ #ifndef ossimImageDataHelper_HEADER #define ossimImageDataHelper_HEADER 1 #include #include #include #include class OSSIM_DLL ossimImageDataHelper { public: /*! * This must be a valid image data object */ ossimImageDataHelper(ossimImageData* imageData=0); void setImageData(ossimImageData* imageData); void fill(const double* values, const ossimIrect& rect, bool clipPoly=true); void fill(const double* values, std::vector& regionList, bool clipPoly=true); void fill(const ossimRgbVector& color, std::vector& regionList, bool clipPoly=true); void fill(const ossimRgbVector& color, const ossimIrect& rect, bool clipPoly=true); /*! * Values must be of the same type as the image data that * we are writing to. */ void fill(const double* values, const ossimPolygon& region, bool clipPoly=true); void fill(const ossimRgbVector& color, const ossimPolygon& region, bool clipPoly=true); /*! * The input is assumed to have the same origin, size and scalar * as this object. This will implement a selection */ void copyInputToThis(const void* input, const ossimPolygon& region, bool clipPoly=true); ossimImageData* theImageData; protected: ossimIpt theOrigin; ossimIrect theImageRectangle; ossimPolyArea2d thePolyImageRectangle; template void fill(T dummyVariable, const double* values, const ossimPolygon& region, bool clipPoly); template void fill(T dummyVariable, const double* values, const ossimIrect& region, bool clipPoly); template void copyInputToThis(const T* inputBuf, const ossimPolygon& region, bool clipPoly); template void fill(T dummyVariable, const double* values, const ossimPolygon& region); template void fill(T dummyVariable, const double* values, const ossimIrect& region); template void copyInputToThis(const T* inputBuf, const ossimPolygon& region); }; #endif