OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimKakaduJpipImageGeometryFactory.cpp
Go to the documentation of this file.
4 
6 {
7 }
8 
10 {
12  return &inst;
13 }
14 
16 {
17  return 0;
18 }
19 
21  const ossimKeywordlist& kwl,
22  const char* prefix)const
23 {
25  //std::cout << "ossimKakaduJpipImageGeometryFactory::createGeometry (kwl, prefix).................. entered" << std::endl;
26 
28  if(proj.valid())
29  {
30  result = new ossimImageGeometry();
31  result->setProjection(proj.get());
32 
33  ossimRefPtr<ossim2dTo2dTransform> transform = createTransform(kwl, prefix);
34  result->setTransform(transform.get());
35  }
36  return result.release();
37 }
38 
40  const ossimFilename& /* filename */, ossim_uint32 /* entryIdx */)const
41 {
42  //std::cout << "ossimKakaduJpipImageGeometryFactory::createGeometry(filename) .................. entered" << std::endl;
43  // currently don't support this option just yet by this factory
44  return 0;
45 }
46 
48 {
49  //std::cout << "ossimKakaduJpipImageGeometryFactory::extendGeometry(handler) .................. entered" << std::endl;
50  bool result = false;
51  if (handler)
52  {
53  bool add2D = true;
55  if(geom.valid())
56  {
57  if(!geom->getProjection())
58  {
59 // geom->setProjection(createProjection(handler));
60 // result = geom->hasProjection();
61  }
62  if(geom->getProjection())
63  {
64 // if( !(dynamic_cast<ossimSensorModel*>(geom->getProjection())))
65 // {
66 // add2D = false;
67 // }
68  }
69  if(!geom->getTransform()&&add2D)
70  {
71  geom->setTransform(createTransform(handler));
72  result |= geom->hasTransform();
73  }
74  }
75  }
76 
77  return result;
78 }
79 
81  std::vector<ossimString>& typeList)const
82 {
83 }
84 
85 
87  ossimImageHandler* handler)const
88 {
89  // Currently nothing to do...
90 
92 
93  return result.release();
94 }
95 
97  const char* prefix)const
98 {
99  // Currently nothing to do...
100 
102 
103  return result.release();
104 }
105 
106 
108  ossimImageHandler* handler) const
109 {
112 
113  return result.release();
114 }
virtual ossimProjection * createProjection(ossimImageHandler *handler) const
Utility method to create a projection from an image handler.
void setProjection(ossimProjection *projection)
Sets the projection to be used for local-to-world coordinate transformation.
Represents serializable keyword/value map.
virtual bool extendGeometry(ossimImageHandler *handler) const
bool valid() const
Definition: ossimRefPtr.h:75
static ossimKakaduJpipImageGeometryFactory * instance()
virtual ossim2dTo2dTransform * createTransform(ossimImageHandler *handler) const
This is a utility method used by crateGeoemtry that takes an image handler.
ossimProjection * createProjection(const ossimFilename &filename, ossim_uint32 entryIdx) const
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if non defined...
unsigned int ossim_uint32
T * release()
Definition: ossimRefPtr.h:93
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
virtual ossimImageGeometry * createGeometry(const ossimString &typeName) const
static ossimProjectionFactoryRegistry * instance()
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
const ossimProjection * getProjection() const
Access methods for projection (may be NULL pointer).
This class defines an abstract Handler which all image handlers(loaders) should derive from...
void setTransform(ossim2dTo2dTransform *transform)
Sets the transform to be used for local-to-full-image coordinate transformation.
const ossim2dTo2dTransform * getTransform() const
Access methods for transform (may be NULL pointer).
bool hasTransform() const
Returns TRUE if valid transform defined.