/usr/include/ossim/imaging/ossimAnnotationSource.h is in libossim-dev 1.8.16-3+b1.
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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | //*******************************************************************
//
// License: See LICENSE.txt file in the top level directory.
//
// Author: Garrett Potts
//
// Description:
//
// Class to annotate or draw things on tiles like text, ellipses and so on.
//
// Notes:
// 1) The output scalar type of this object is ALWAYS 8 bit or OSSIM_UINT8 so
// if your input connection is something other than 8 bit it will be
// remapped to 8 bit.
// 2) This can handle any number of input bands; however, it will never draw
// to more than three. So if you have an input connection of four bands
// the fourth band will not be drawn to.
//
//*************************************************************************
// $Id: ossimAnnotationSource.h 15766 2009-10-20 12:37:09Z gpotts $
#ifndef ossimAnnotationSource_HEADER
#define ossimAnnotationSource_HEADER
#include <vector>
#include <ossim/imaging/ossimImageSourceFilter.h>
#include <ossim/base/ossimIrect.h>
#include <ossim/base/ossimDrect.h>
#include <ossim/imaging/ossimRgbImage.h>
#include <ossim/imaging/ossimAnnotationObject.h>
class ossimKeywordlist;
class OSSIMDLLEXPORT ossimAnnotationSource : public ossimImageSourceFilter
{
public:
typedef std::vector<ossimRefPtr<ossimAnnotationObject> > AnnotationObjectListType;
ossimAnnotationSource(ossimImageSource* inputSource=0);
virtual ~ossimAnnotationSource();
virtual ossim_uint32 getNumberOfOutputBands() const;
virtual ossimScalarType getOutputScalarType() const;
virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
ossim_uint32 resLevel = 0);
/*!
* Will allow this source to initialize its data objects. If it needs to
* it should call its connection to get what it needs.
*/
virtual void initialize();
/*!
* Will return the bounding rectangle.
*/
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
/*!
* @param bands This can be any number of bands; however, the
* annotator will only write to a max of 3, so if you have a 4 band
* image the fourth band will not be annotated.
*/
virtual void setNumberOfBands(ossim_uint32 bands);
/*!
* Will add an object to the list.
* it will own the object added.
*/
virtual bool addObject(ossimAnnotationObject* anObject);
/*!
* Will delete an object from the list.
* Note: the passed in pointer is no long
* valid.
*/
virtual bool deleteObject(ossimAnnotationObject* anObject);
/*!
* Saves the current state of this object.
*/
virtual bool saveState(ossimKeywordlist& kwl,
const char* prefix=0)const;
/*!
* Method to the load (recreate) the state of an object from a keyword
* list. Return true if ok or false on error.
*/
virtual bool loadState(const ossimKeywordlist& kwl,
const char* prefix=0);
virtual void computeBoundingRect();
/*!
* Calls the isPointWithin all Annotation
* Objects. Note: Do not delete these objects.
*/
AnnotationObjectListType pickObjects(const ossimDpt& imagePoint);
/*!
* Note: do not delete the objects returned.
*/
AnnotationObjectListType pickObjects(const ossimDrect& imageRect);
const AnnotationObjectListType& getObjectList()const;
AnnotationObjectListType& getObjectList();
/*!
Clears theAnnotationObjectList vector. All elements are deleted.
*/
void deleteAll();
virtual void drawAnnotations(ossimRefPtr<ossimImageData> tile);
protected:
void allocate(const ossimIrect& rect);
void destroy();
ossimAnnotationSource(const ossimAnnotationSource& rhs):ossimImageSourceFilter(rhs){}
/*!
* What is the size of the image. This class
* is an image producer and it needs to know about
* its bounds. We will default the rectangle to an
* empty region.
*/
ossimDrect theRectangle;
/*!
* The output band can be set to 1 or 3 for
* grey or RGB scale. We will default this to
* a 1 band image.
*/
ossim_uint32 theNumberOfBands;
/*!
* This has all the routines we need for drawing
* lines, circles and polygons.
*/
ossimRefPtr<ossimRgbImage> theImage;
ossimRefPtr<ossimImageData> theTile;
/*!
* These will be all your primitives in
* Example: lines, circles, text ...
*/
AnnotationObjectListType theAnnotationObjectList;
TYPE_DATA
};
#endif /* #ifndef ossimAnnotationSource_HEADER */
|