/usr/include/ossim/imaging/ossimMemoryImageSource.h is in libossim-dev 2.2.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | //*******************************************************************.
//
// License: See top level LICENSE.txt file.
//
// Author: Garrett Potts
//
//*************************************************************************
//
#ifndef ossimMemoryImageSource_HEADER
#define ossimMemoryImageSource_HEADER 1
#include <ossim/base/ossimConstants.h>
#include <ossim/imaging/ossimImageData.h>
#include <ossim/imaging/ossimImageGeometry.h>
#include <ossim/imaging/ossimImageSource.h>
class OSSIM_DLL ossimMemoryImageSource : public ossimImageSource
{
public:
ossimMemoryImageSource();
ossimMemoryImageSource(const ossimMemoryImageSource& src)
:ossimImageSource(src),
m_image(src.m_image.valid()?(ossimImageData*)src.m_image->dup():(ossimImageData*)0),
m_result(0),
m_geometry(src.m_geometry.valid()?(ossimImageGeometry*)src.m_geometry->dup():(ossimImageGeometry*)0),
m_boundingRect(src.m_boundingRect)
{
}
ossimMemoryImageSource* dup()const
{
return new ossimMemoryImageSource(*this);
}
void setImage(ossimRefPtr<ossimImageData> image);
void setImage(ossimScalarType scalarType,
ossim_uint32 numberOfBands,
ossim_uint32 width,
ossim_uint32 height);
void setRect(ossim_uint32 ulx,
ossim_uint32 uly,
ossim_uint32 width,
ossim_uint32 height);
virtual ossim_uint32 getNumberOfInputBands() const;
virtual ossim_uint32 getNumberOfOutputBands() const;
virtual ossimScalarType getOutputScalarType() const;
virtual double getNullPixelValue(ossim_uint32 band=0)const;
virtual double getMinPixelValue(ossim_uint32 band=0)const;
virtual double getMaxPixelValue(ossim_uint32 band=0)const;
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
ossim_uint32 resLevel=0);
virtual bool canConnectMyInputTo(ossim_int32 myInputIndex,
const ossimConnectableObject* object)const;
virtual void initialize();
virtual ossim_uint32 getNumberOfDecimationLevels() const;
virtual void getDecimationFactor(ossim_uint32 resLevel,
ossimDpt& result) const;
virtual void getDecimationFactors(std::vector<ossimDpt>& decimations)const;
//! Returns the image geometry object associated with this tile source or NULL if not defined.
//! The geometry contains full-to-local image transform as well as projection (image-to-world)
//! Default implementation returns the image geometry object associated with the next
//! (left) input source (if any) connected to this source in the chain, or NULL.
virtual ossimRefPtr<ossimImageGeometry> getImageGeometry()
{
return m_geometry;
}
//! Default implementation sets geometry of the first input to the geometry specified.
virtual void setImageGeometry(ossimImageGeometry* geom)
{
m_geometry = geom;
}
/**
* save state is not implemented for this source and only passes to the base.
*/
virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
/**
* loadState is here so one can construct a memory source as a blank tile.
*/
virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
protected:
ossimRefPtr<ossimImageData> m_image;
ossimRefPtr<ossimImageData> m_result;
ossimRefPtr<ossimImageGeometry> m_geometry;
ossimIrect m_boundingRect;
TYPE_DATA
};
#endif
|