OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimVectorRenderer.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: David Burken (dburken@imagelinks.com)
6 //
7 // Description:
8 //
9 // Abstract class for rendering vector data. Derived classes should implement
10 // the "rasterizeVectorData" data method.
11 //
12 //*******************************************************************
13 // $Id: ossimVectorRenderer.cpp 17195 2010-04-23 17:32:18Z dburken $
14 
15 #include <iostream>
16 using namespace std;
17 
19 #include <ossim/base/ossimCommon.h>
25 
27 
28 
30  :
32  theImageViewTransform(NULL),
33  theBoundingRect(),
34  theAreaOfInterest(),
35  theNumberOfAoiObjects(0),
36  theNumberOfObjects(0)
37 {
38 }
39 
41  ossimImageViewTransform* transform)
42  : ossimImageSourceFilter(inputSource),
43  theImageViewTransform(transform),
44  theBoundingRect(),
45  theAreaOfInterest(),
46  theNumberOfAoiObjects(0),
47  theNumberOfObjects(0)
48 {
49 
50 }
51 
52 
54 {
56  {
57  delete theImageViewTransform;
58  theImageViewTransform = NULL;
59  }
60 }
61 
63  const char* /* prefix */ ) const
64 {
65  return false;
66 }
67 
69  const char* prefix)
70 {
71  ossimString newPrefix = prefix + ossimString("image_view_trans.");
72 
74  {
75  delete theImageViewTransform;
76  theImageViewTransform = NULL;
77  }
78 
81  createTransform(kwl, newPrefix.c_str());
82 
83  return ossimImageSource::loadState(kwl, prefix);
84 }
85 
86 void
88 {
90  {
91  delete theImageViewTransform;
92  }
93  theImageViewTransform = transform;
94 }
95 
97 {
98  theAreaOfInterest = aoi;
99 }
100 
102 {
103  return theAreaOfInterest;
104 }
105 
107 {
108  return theBoundingRect;
109 }
110 
112 {
113  return theNumberOfAoiObjects;
114 }
115 
117 {
118  return theNumberOfObjects;
119 }
120 
122 {
123  theBoundingRect = rect;
124 }
125 
127 {
128  theNumberOfAoiObjects = number_of_objects;
129 }
130 
132 {
133  theNumberOfObjects = number_of_objects;
134 }
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
virtual ossim_int32 getNumberOfAoiObjects() const
Returns the number of vector objects in the area of interest.
static ossimImageViewTransformFactory * instance()
Represents serializable keyword/value map.
virtual ossimDrect getBoundingRect(long resLevel=0) const
Returns the full bounding rectangle of current vector data loaded.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
virtual ossim_int32 getNumberOfObjects() const
Returns the total number of vector objects in the full bounding rectangle.
virtual void setNumberOfObjects(ossim_int32 number_of_objects)
Sets the number of vector objects in the full bounding rectangle.
virtual ossimDrect getAreaOfInterest() const
Returns the current area of interest as an ossimDrect.
virtual void setNumberOfAoiObjects(ossim_int32 number_of_objects)
Sets the number of vector objects in the area of interest.
ossimImageViewTransform * theImageViewTransform
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual void setBoundingRect(ossimDrect &rect)
Sets the bounding rectangle of current vector data loaded.
virtual void setAreaOfInterest(const ossimDrect &aoi)
Sets the area of interest.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
virtual void setImageViewTransform(ossimImageViewTransform *transform)
Sets the ImageViewTransform to be used for converting vector data.
#define RTTI_DEF1(cls, name, b1)
Definition: ossimRtti.h:485
ossim_int32 theNumberOfAoiObjects
int ossim_int32