OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimVpfTileSource.cpp
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts
6 //
7 // Description:
8 //
9 // $Id: ossimVpfTileSource.cpp 17932 2010-08-19 20:34:35Z dburken $
10 //----------------------------------------------------------------------------
12 
14 
16  :
18 {
19  theObject = this;
22 }
23 
25 {
27 }
28 
30  const char* prefix)const
31 {
32  return m_AnnotationSource->saveState(kwl, prefix);
33 }
34 
36  const char* prefix)
37 {
38  if (ossimImageHandler::loadState(kwl, prefix))
39  {
40  return m_AnnotationSource->loadState(kwl, prefix);
41  }
42 
43  return false;
44 }
45 
47 {
49 }
50 
52 {
54 }
55 
57  const ossimIrect& tileRect, ossim_uint32 resLevel)
58 {
59  return m_AnnotationSource->getTile(tileRect, resLevel);
60 }
61 
63 {
65 }
66 
68 {
70 }
71 
73 {
75 
76  if(theBounds.hasNans())
77  {
78  return theBounds.ul().x;
79  }
80 
81  return theBounds.height();
82 }
83 
85 {
87 
88  if(theBounds.hasNans())
89  {
90  return theBounds.ul().x;
91  }
92 
93  return theBounds.height();
94 }
95 
97 {
98  return 32;
99 }
100 
102 {
104 }
105 
106 //**************************************************************************************************
107 // Returns the image geometry object associated with this tile source or NULL if non defined.
108 //**************************************************************************************************
110 {
111  if (theGeometry.valid()) return theGeometry;
112 
114  if ( annotGeom.valid() )
115  {
116  // Copy the annotation source's geometry as our own:
117  theGeometry = new ossimImageGeometry(*annotGeom);
118 
119  // Set image things the geometry object should know about.
121 
122  return theGeometry;
123  }
125 }
126 
128 {
130 }
131 
133 {
134  return m_AnnotationSource->getTileWidth();
135 }
136 
138 {
140 }
141 
143 {
144  return 0;
145 }
146 
148 {
149  return 0;
150 }
151 
153 {
154  return m_AnnotationSource->isOpen();
155 }
156 
158 {
160 }
161 
163 {
164  return m_AnnotationSource->getMinPixelValue(band);
165 }
166 
168 {
169  return m_AnnotationSource->getMaxPixelValue(band);
170 }
171 
173 {
174  return m_AnnotationSource->getView();
175 }
176 
178 {
179  return m_AnnotationSource->getView();
180 }
181 
183 {
184  return m_AnnotationSource->setView(baseObject);
185 }
186 
187 void ossimVpfTileSource::getAllFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& featureList)
188 {
189  m_AnnotationSource->getAllFeatures(featureList);
190 }
191 
192 void ossimVpfTileSource::setAllFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& featureList)
193 {
194  m_AnnotationSource->setAllFeatures(featureList);
195 }
196 
198 {
200 }
201 
203 {
205 }
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if non defined...
ossimObject * theObject
virtual ossim_uint32 getTileWidth() const
ossimRefPtr< ossimImageGeometry > theGeometry
ossimFilename theImageFile
Represents serializable keyword/value map.
virtual ossim_uint32 getNumberOfDecimationLevels() const
ossimRefPtr< ossimVpfAnnotationSource > m_AnnotationSource
bool valid() const
Definition: ossimRefPtr.h:75
virtual ossimScalarType getOutputScalarType() const
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 ossimRefPtr< ossimImageData > getTile(const ossimIrect &tileRect, ossim_uint32 resLevel=0)
virtual void setAllFeatures(const std::vector< ossimVpfAnnotationFeatureInfo *> &features)
ossim_uint32 height() const
Definition: ossimIrect.h:487
virtual ossim_uint32 getTileHeight() const
Returns the default processing tile height.
virtual ossim_uint32 getNumberOfInputBands() const
virtual void transformObjects(ossimImageGeometry *geom=0)
RTTI_DEF2(ossimVpfTileSource, "ossimVpfTileSource", ossimImageHandler, ossimViewInterface)
const ossimIpt & ul() const
Definition: ossimIrect.h:274
virtual double getMinPixelValue(ossim_uint32 band=0) const
Retuns the min pixel value.
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if not defined...
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=NULL) const
Saves the current state of this object.
virtual void getAllFeatures(std::vector< ossimVpfAnnotationFeatureInfo *> &features)
virtual void setNumberOfBands(ossim_uint32 bands)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=NULL)
Method to the load (recreate) the state of an object from a keyword list.
virtual ossim_uint32 getTileWidth() const
Returns the default processing tile width.
virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level=0) const
virtual double getMinPixelValue(ossim_uint32 band=0) const
Returns the min pixel of the band.
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
virtual ossim_uint32 getNumberOfOutputBands() const
virtual ossim_uint32 getTileHeight() const
virtual bool setView(ossimObject *baseObject)
void setAllFeatures(std::vector< ossimVpfAnnotationFeatureInfo *> &featureList)
unsigned int ossim_uint32
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.
void initImageParameters(ossimImageGeometry *geom) const
Convenience method to set things needed in the image geometry from the image handler.
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
ossimScalarType
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)
virtual void close()
Deletes the overview and clears the valid image vertices.
virtual ossim_uint32 getImageTileWidth() const
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tileRect, ossim_uint32 resLevel=0)
virtual bool setView(ossimObject *baseObject)
This class defines an abstract Handler which all image handlers(loaders) should derive from...
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
virtual bool isOpen() const
Derived classes must implement this method to be concrete.
bool hasNans() const
Definition: ossimIrect.h:337
ossim_int32 x
Definition: ossimIpt.h:141
virtual ossimObject * getView()
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level=0) const
virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level=0) const
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.
virtual ossim_uint32 getImageTileHeight() const
void getAllFeatures(std::vector< ossimVpfAnnotationFeatureInfo *> &featureList)