/usr/include/ossim/projection/ossimImageViewProjectionTransform.h is in libossim-dev 1.8.16-4ubuntu1.
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 | //*******************************************************************
//
// License: See top level LICENSE.txt file.
//
// AUTHOR: Garrett Potts (gpotts@imagelinks.com)
// Oscar Kramer (oscar@krameranalytic.com)
//
// DESCRIPTION: Contains declaration of ossimImageViewProjectionTransform.
// This class provides an image to view transform that utilizes two
// independent 2D-to-3D projections. Intended for transforming view to
// geographic "world" space to input image space.
//
// LIMITATIONS: None.
//
//*****************************************************************************
// $Id: ossimImageViewProjectionTransform.h 20352 2011-12-12 17:24:52Z dburken $
#ifndef ossimImageViewProjectionTransform_HEADER
#define ossimImageViewProjectionTransform_HEADER 1
#include <ossim/projection/ossimImageViewTransform.h>
#include <ossim/imaging/ossimImageGeometry.h>
class OSSIMDLLEXPORT ossimImageViewProjectionTransform : public ossimImageViewTransform
{
public:
ossimImageViewProjectionTransform(ossimImageGeometry* imageGeometry=0,
ossimImageGeometry* viewGeometry=0);
//! copy constructor
ossimImageViewProjectionTransform(const ossimImageViewProjectionTransform& src);
virtual ossimObject* dup() const { return new ossimImageViewProjectionTransform(*this); }
virtual ~ossimImageViewProjectionTransform();
//! Satisfies base class pure virtual. Returns TRUE if both input and output geoms exist.
virtual bool isValid() const { return (m_imageGeometry.valid() && m_viewGeometry.valid()); }
//! Returns TRUE if both input and output geometries are identical. Presently implemented as
//! limited compare of geometry pointers
virtual bool isIdentity() const { return (m_imageGeometry == m_viewGeometry); }
//! Assigns the geometry to use for output view. This object does NOT own the geometry.
void setViewGeometry(ossimImageGeometry* g) { m_viewGeometry = g; }
//! Assigns the geometry to use for input image. This object does NOT own the geometry.
void setImageGeometry(ossimImageGeometry* g) { m_imageGeometry = g; }
//! Workhorse of the object. Converts image-space to view-space.
virtual void imageToView(const ossimDpt& imagePoint, ossimDpt& viewPoint) const;
//! Other workhorse of the object. Converts view-space to image-space.
virtual void viewToImage(const ossimDpt& viewPoint, ossimDpt& imagePoint) const;
//! Dumps contents to stream
virtual std::ostream& print(std::ostream& out) const;
ossimImageGeometry* getImageGeometry() { return m_imageGeometry.get(); }
ossimImageGeometry* getViewGeometry() { return m_viewGeometry.get(); }
const ossimImageGeometry* getImageGeometry()const { return m_imageGeometry.get(); }
const ossimImageGeometry* getViewGeometry()const { return m_viewGeometry.get(); }
//! OLK: Not sure where this is used, but needed to satisfy ossimViewInterface base class.
//! The ownership flag is ignored.
virtual bool setView(ossimObject* baseObject);
virtual ossimObject* getView() { return m_viewGeometry.get(); }
virtual const ossimObject* getView() const { return m_viewGeometry.get(); }
//! Returns the GSD of input image.
virtual ossimDpt getInputMetersPerPixel()const;
//! Returns the GSD of the output view.
virtual ossimDpt getOutputMetersPerPixel() const;
//! Gets the image bounding rect in view-space coordinates
virtual ossimDrect getImageToViewBounds(const ossimDrect& imageRect)const;
//! After rewrite for incorporating ossimImageGeometry: No longer needed.
virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix =0);
//! After rewrite for incorporating ossimImageGeometry: No longer needed.
virtual bool saveState(ossimKeywordlist& kwl, const char* prefix = 0)const;
protected:
/**
* @brief Initializes the view geometry image size from image geometry
* bounding rect.
*
* This is needed for the ossimImageGeometry::worldToLocal if the underlying
* projection is geographic to handle images that cross the date line.
*
* @param Input image rectangle.
* @return true on success, false on error.
*/
bool initializeViewSize();
ossimRefPtr<ossimImageGeometry> m_imageGeometry;
ossimRefPtr<ossimImageGeometry> m_viewGeometry;
TYPE_DATA
};
#endif
|