/usr/include/ossim/projection/ossimImageViewTransform.h is in libossim-dev 2.2.2-1.
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 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | //*******************************************************************
//
// License: See top level LICENSE.txt file.
//
// Author: Garrett Potts (gpotts@imagelinks.com)
//
// Description: This class hides the image view transformation process.
// We should be able to open up ay image within the system
// and be able to map it to the view space. Classes need to
// derive and override the methods within this class. This will
// mainly be used in the resampling process.
//
//*******************************************************************
// $Id: ossimImageViewTransform.h 18397 2010-11-09 19:13:46Z gpotts $
#ifndef ossimImageViewTransform_HEADER
#define ossimImageViewTransform_HEADER
#include <iostream>
using namespace std;
#include <ossim/base/ossimViewInterface.h>
#include <ossim/base/ossimObject.h>
#include <ossim/base/ossimDpt.h>
#include <ossim/base/ossimDrect.h>
#include <ossim/base/ossim2dTo2dTransform.h>
class OSSIMDLLEXPORT ossimImageViewTransform : public ossim2dTo2dTransform,
public ossimViewInterface
{
public:
friend OSSIMDLLEXPORT ostream& operator<<(ostream& out,
const ossimImageViewTransform& data);
ossimImageViewTransform();
virtual void forward(const ossimDpt& input, ossimDpt& output) const;
virtual void inverse(const ossimDpt& input, ossimDpt& output) const;
/*!
* derived classes will specify if the imageViewTransform is an
* identity.
*/
virtual bool isIdentity()const=0;
virtual bool isValid()const=0;
virtual ossimDpt getInputMetersPerPixel()const=0;
virtual ossimDpt getOutputMetersPerPixel()const=0;
/*!
* If it needs to it will use the information passed in to get the
* scae factor by transforming the line point.x to point.x+deltaXY and
* point.y to point.y + deltaXY.y. It will comput new delta's and
* set the ratio of deltaXY/newDeltaXY to the result scale.
*
* Derived classes can overide this default implementation. Note:
* if the scale changes are only subpixel then it will return a scale
* of one. We have to see how this works before we actually keep this
* implementation.
*/
virtual void getImageToViewScale(ossimDpt& resultScale,
const ossimDpt& imagePoint,
const ossimDpt& deltaImagePointXY)const;
/*!
* If it needs to it will use the information passed in to get the
* scae factor by transforming the line point.x to point.x+deltaXY and
* point.y to point.y + deltaXY.y. It will comput new delta's and
* set the ratio of deltaXY/newDeltaXY to the result scale.
*
* Derived classes can overide this default implementation. Note:
* if the scale changes are only subpixel then it will return a scale
* of one. We have to see how this works before we actually keep this
* implementation.
*/
virtual void getViewToImageScale(ossimDpt& resultScale,
const ossimDpt& imagePoint,
const ossimDpt& deltaImagePointXY)const;
virtual void imageToView(const ossimDpt& imagePoint,
ossimDpt& viewPoint)const;
virtual void viewToImage(const ossimDpt& viewPoint,
ossimDpt& imagePoint)const;
virtual std::ostream& print(std::ostream& out) const;
ossimDpt imageToView(const ossimDpt& imagePoint)const;
ossimDpt viewToImage(const ossimDpt& viewPoint)const;
/*!
* This should compute output/input.
*/
virtual void getScaleChangeImageToView(ossimDpt& result,
const ossimDrect& imageRect);
/*!
* This should compute output/input.
*/
virtual void getScaleChangeViewToImage(ossimDpt& result,
const ossimDrect& viewRect);
virtual void getRoundTripErrorView(ossimDpt& result,
const ossimDpt& viewPt)const;
virtual ossimDpt getRoundTripErrorView(const ossimDpt& viewPt)const;
virtual void getRoundTripErrorImage(ossimDpt& result,
const ossimDpt& imagePt)const;
virtual ossimDpt getRoundTripErrorImage(const ossimDpt& imagePt)const;
/** Computes the bounding rect in view space of the quad formed by the transformed image points
* of the input rect corners. */
virtual ossimDrect getImageToViewBounds(const ossimDrect& imageRect) const;
/** Computes the bounding rect in image space of the quad formed by the transformed view points
* of the input rect corners. */
virtual ossimDrect getViewToImageBounds(const ossimDrect& viewRect) const;
virtual bool loadState(const ossimKeywordlist& kwl,
const char* prefix =0);
virtual bool saveState(ossimKeywordlist& kwl,
const char* prefix = 0)const;
TYPE_DATA
};
#endif
|