141 const char* prefix)
const 166 const char* lookup = kwl.
find(prefix,
"c1");
171 lookup = kwl.
find(prefix,
"c2");
176 lookup = kwl.
find(prefix,
"c3");
187 unsigned char* bandDest;
191 bandSrc[0] =
static_cast<unsigned char*
>(tile->
getBuf(0));
192 bandSrc[1] =
static_cast<unsigned char*
>(tile->
getBuf(0));
193 bandSrc[2] =
static_cast<unsigned char*
>(tile->
getBuf(0));
197 bandSrc[0] =
static_cast<unsigned char*
>(tile->
getBuf(0));
198 bandSrc[1] =
static_cast<unsigned char*
>(tile->
getBuf(1));
199 bandSrc[2] =
static_cast<unsigned char*
>(tile->
getBuf(1));
203 bandSrc[0] =
static_cast<unsigned char*
>(tile->
getBuf(0));
204 bandSrc[1] =
static_cast<unsigned char*
>(tile->
getBuf(1));
205 bandSrc[2] =
static_cast<unsigned char*
>(tile->
getBuf(2));
212 for(offset = 0; offset < upperBound; ++offset)
216 value = ossim::round<int>(
theC1*(bandSrc[0][offset]) +
217 theC2*(bandSrc[1][offset]) +
218 theC3*(bandSrc[2][offset]));
220 value = value<255?value:255;
221 value = value>0?value:0;
223 bandDest[offset] = value;
virtual ossim_uint32 getWidth() const
virtual bool isSourceEnabled() const
ossimRgbToGreyFilter(ossimObject *owner=NULL)
virtual ossim_uint32 getNumberOfBands() const
ossimRefPtr< ossimImageData > theBlankTile
virtual void setImageRectangle(const ossimIrect &rect)
Represents serializable keyword/value map.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
const char * find(const char *key) const
virtual ossim_uint32 getTileHeight() const
Returns the default processing tile height.
ossimRefPtr< ossimImageData > theTile
void runUcharTransformation(ossimRefPtr< ossimImageData > &tile)
virtual ossimDataObjectStatus getDataObjectStatus() const
virtual ossim_uint32 getHeight() const
virtual void initialize()
Initialize the data buffer.
ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
virtual ossim_uint32 getTileWidth() const
Returns the default processing tile width.
virtual ossimObject * dup() const
virtual void initialize()
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
virtual ossimDataObjectStatus validate() const
virtual void initialize()
ossimImageSource * theInputConnection
unsigned int ossim_uint32
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
virtual ~ossimRgbToGreyFilter()
void allocate()
Called on first getTile, will initialize all data needed.
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual ossimString getLongName() const
virtual const void * getBuf() const
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tileRect, ossim_uint32 resLevel=0)
#define RTTI_DEF1(cls, name, b1)
virtual ossimString getShortName() const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)