OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimMemoryImageSource.h
Go to the documentation of this file.
1 //*******************************************************************.
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts
6 //
7 //*************************************************************************
8 //
9 #ifndef ossimMemoryImageSource_HEADER
10 #define ossimMemoryImageSource_HEADER 1
11 
16 
18 {
19 public:
22  :ossimImageSource(src),
23  m_image(src.m_image.valid()?(ossimImageData*)src.m_image->dup():(ossimImageData*)0),
24  m_result(0),
25  m_geometry(src.m_geometry.valid()?(ossimImageGeometry*)src.m_geometry->dup():(ossimImageGeometry*)0),
26  m_boundingRect(src.m_boundingRect)
27  {
28  }
30  {
31  return new ossimMemoryImageSource(*this);
32  }
33  void setImage(ossimRefPtr<ossimImageData> image);
34  void setImage(ossimScalarType scalarType,
35  ossim_uint32 numberOfBands,
36  ossim_uint32 width,
37  ossim_uint32 height);
38  void setRect(ossim_uint32 ulx,
39  ossim_uint32 uly,
40  ossim_uint32 width,
41  ossim_uint32 height);
42  virtual ossim_uint32 getNumberOfInputBands() const;
43  virtual ossim_uint32 getNumberOfOutputBands() const;
44  virtual ossimScalarType getOutputScalarType() const;
45  virtual double getNullPixelValue(ossim_uint32 band=0)const;
46  virtual double getMinPixelValue(ossim_uint32 band=0)const;
47  virtual double getMaxPixelValue(ossim_uint32 band=0)const;
48 
49  virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
50 
52  ossim_uint32 resLevel=0);
53 
54  virtual bool canConnectMyInputTo(ossim_int32 myInputIndex,
55  const ossimConnectableObject* object)const;
56 
57  virtual void initialize();
59  virtual void getDecimationFactor(ossim_uint32 resLevel,
60  ossimDpt& result) const;
61  virtual void getDecimationFactors(std::vector<ossimDpt>& decimations)const;
62 
68  {
69  return m_geometry;
70  }
71 
74  {
75  m_geometry = geom;
76  }
77 
81  virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
82 
86  virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
87 
88 protected:
93  TYPE_DATA
94 };
95 
96 #endif
ossimMemoryImageSource(const ossimMemoryImageSource &src)
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
This will return the bounding rect of the source.
Represents serializable keyword/value map.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
ossimMemoryImageSource * dup() const
virtual ossim_uint32 getNumberOfDecimationLevels() const
Will return the number of resolution levels.
ossimRefPtr< ossimImageData > m_image
ossimRefPtr< ossimImageGeometry > m_geometry
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if not defined...
virtual double getMinPixelValue(ossim_uint32 band=0) const
Returns the min pixel of the band.
#define TYPE_DATA
Definition: ossimRtti.h:339
unsigned int ossim_uint32
virtual void setImageGeometry(ossimImageGeometry *geom)
Default implementation sets geometry of the first input to the geometry specified.
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
ossimScalarType
ossimRefPtr< ossimImageData > m_result
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
#define OSSIM_DLL
virtual void initialize()=0
virtual bool canConnectMyInputTo(ossim_int32 myInputIndex, const ossimConnectableObject *object) const =0
required to be overriden by derived classes
virtual ossim_uint32 getNumberOfInputBands() const =0
virtual void getDecimationFactor(ossim_uint32 resLevel, ossimDpt &result) const
Will return the decimation factor for the given resolution level.
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.
virtual void getDecimationFactors(std::vector< ossimDpt > &decimations) const
Will return an array of all decimations for each resolution level.
int ossim_int32
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)