OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimPolyCutter.h
Go to the documentation of this file.
1 //*******************************************************************
2 // Copyright (C) 2000 ImageLinks Inc.
3 //
4 // License: MIT
5 //
6 // See LICENSE.txt file in the top level directory for more details.
7 //
8 // Author: Garrett Potts
9 //
10 //*************************************************************************
11 // $Id: ossimPolyCutter.h 19907 2011-08-05 19:55:46Z dburken $
12 #ifndef ossimPolyCutter_HEADER
13 #define ossimPolyCutter_HEADER
17 #include <vector>
18 
19 //class ossimPolyArea2d;
20 class ossimImageData;
21 
23 {
24 public:
26  {
27  OSSIM_POLY_NULL_INSIDE = 0,
28  OSSIM_POLY_NULL_OUTSIDE = 1
29  };
30 
32  ossimPolyCutter(ossimImageSource* inputSource,
33  const ossimPolygon& polygon);
34 
35  virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
36  ossim_uint32 resLevel=0);
37 
38  virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
39 
40  virtual void initialize();
41  virtual bool saveState(ossimKeywordlist& kwl,
42  const char* prefix=0)const;
43 
48  virtual bool loadState(const ossimKeywordlist& kwl,
49  const char* prefix=0);
50 
51  virtual void setPolygon(const vector<ossimDpt>& polygon,
52  ossim_uint32 i = 0);
53 
54  virtual void setPolygon(const vector<ossimIpt>& polygon,
55  ossim_uint32 i = 0);
56 
57  virtual void addPolygon(const vector<ossimIpt>& polygon);
58  virtual void addPolygon(const vector<ossimDpt>& polygon);
59  virtual void addPolygon(const ossimPolygon& polygon);
60 
61  virtual void setNumberOfPolygons(ossim_uint32 count);
62 
63  virtual std::vector<ossimPolygon>& getPolygonList();
64 
65  virtual const std::vector<ossimPolygon>& getPolygonList()const;
66 
67  void setCutType(ossimPolyCutterCutType cutType);
68 
69  ossimPolyCutterCutType getCutType()const;
70 
71  void clear();
72 
73  const ossimIrect& getRectangle() const;
74 
75  void setRectangle(const ossimIrect& rect);
76 
77  virtual void setProperty(ossimRefPtr<ossimProperty> property);
78  virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
79  virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
80 protected:
81  virtual ~ossimPolyCutter();
82 
86  void allocate();
87  void computeBoundingRect();
88 
90 
96 
97  std::vector<ossimPolygon> thePolygonList;
98 
105 
106 TYPE_DATA
107 };
108 #endif /* #ifndef ossimPolyCutter_HEADER */
ossimRefPtr< ossimImageData > theTile
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
This will return the bounding rect of the source.
virtual void setProperty(ossimRefPtr< ossimProperty > property)
#define OSSIMDLLEXPORT
Represents serializable keyword/value map.
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
#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.
ossimImageDataHelper theHelper
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
ossimIrect theBoundingRect
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
std::vector< ossimPolygon > thePolygonList
ossimPolyCutterCutType theCutType
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)