OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimAnnotationSource.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See LICENSE.txt file in the top level directory.
4 //
5 // Author: Garrett Potts
6 //
7 // Description:
8 //
9 // Class to annotate or draw things on tiles like text, ellipses and so on.
10 //
11 // Notes:
12 // 1) The output scalar type of this object is ALWAYS 8 bit or OSSIM_UINT8 so
13 // if your input connection is something other than 8 bit it will be
14 // remapped to 8 bit.
15 // 2) This can handle any number of input bands; however, it will never draw
16 // to more than three. So if you have an input connection of four bands
17 // the fourth band will not be drawn to.
18 //
19 //*************************************************************************
20 // $Id: ossimAnnotationSource.h 15766 2009-10-20 12:37:09Z gpotts $
21 #ifndef ossimAnnotationSource_HEADER
22 #define ossimAnnotationSource_HEADER
23 
24 #include <vector>
26 #include <ossim/base/ossimIrect.h>
27 #include <ossim/base/ossimDrect.h>
30 
31 class ossimKeywordlist;
32 
34 {
35 public:
36  typedef std::vector<ossimRefPtr<ossimAnnotationObject> > AnnotationObjectListType;
38  virtual ~ossimAnnotationSource();
39 
40  virtual ossim_uint32 getNumberOfOutputBands() const;
41 
42  virtual ossimScalarType getOutputScalarType() const;
43 
44  virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
45  ossim_uint32 resLevel = 0);
46 
51  virtual void initialize();
52 
56  virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
57 
63  virtual void setNumberOfBands(ossim_uint32 bands);
64 
69  virtual bool addObject(ossimAnnotationObject* anObject);
70 
76  virtual bool deleteObject(ossimAnnotationObject* anObject);
77 
81  virtual bool saveState(ossimKeywordlist& kwl,
82  const char* prefix=0)const;
83 
88  virtual bool loadState(const ossimKeywordlist& kwl,
89  const char* prefix=0);
90 
91  virtual void computeBoundingRect();
92 
97  AnnotationObjectListType pickObjects(const ossimDpt& imagePoint);
98 
102  AnnotationObjectListType pickObjects(const ossimDrect& imageRect);
103 
104  const AnnotationObjectListType& getObjectList()const;
105 
106  AnnotationObjectListType& getObjectList();
107 
111  void deleteAll();
112 
113  virtual void drawAnnotations(ossimRefPtr<ossimImageData> tile);
114 
115 protected:
116 
117  void allocate(const ossimIrect& rect);
118  void destroy();
119 
121 
129 
136 
142 
144 
150 
151 TYPE_DATA
152 };
153 
154 #endif /* #ifndef ossimAnnotationSource_HEADER */
155 
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
This will return the bounding rect of the source.
#define OSSIMDLLEXPORT
Represents serializable keyword/value map.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
std::vector< ossimRefPtr< ossimAnnotationObject > > AnnotationObjectListType
ossimAnnotationSource(const ossimAnnotationSource &rhs)
#define TYPE_DATA
Definition: ossimRtti.h:339
unsigned int ossim_uint32
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
ossimScalarType
AnnotationObjectListType theAnnotationObjectList
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.
ossimRefPtr< ossimRgbImage > theImage
ossimRefPtr< ossimImageData > theTile
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)