Isis 3 Programmer Reference
ProjectionFactory.h
Go to the documentation of this file.
1 #ifndef ProjectionFactory_h
2 #define ProjectionFactory_h
3 
25 #include "Plugin.h"
26 #include "WorldMapper.h"
27 
28 namespace Isis {
29  class Camera;
30  class Cube;
31  class Projection;
32  class RingPlaneProjection;
33 
92  public:
93  static Isis::Projection *Create(Isis::Pvl &label, bool allowDefaults = false);
94  static Isis::Projection *RingsCreate(Isis::Pvl &label, bool allowDefaults = false);
97  static Isis::Projection *CreateFromCube(Isis::Pvl &label); // Load Method in cm
98  static Isis::Projection *RingsCreateFromCube(Isis::Pvl &label); // Load Method in cm
99  static Isis::Projection *CreateForCube(Isis::Pvl &label, int &ns, int &nl,
100  bool sizeMatch = true); // Create method in cm
102  int &samples, int &lines,
103  bool sizeMatch);
105  int &samples, int &lines,
106  Camera &cam);
108  int &samples, int &lines,
109  Camera &cam);
110 
111 
112  private:
118 
121 
122  static Plugin m_projPlugin;
123  };
124 
125 
132  public:
140  PFPixelMapper(double pixelResolution, double upperLeftX, double upperLeftY) {
141  p_pixelResolution = pixelResolution;
142  p_upperLeftX = upperLeftX;
143  p_upperLeftY = upperLeftY;
144  };
145 
152  double WorldX(const double projX) const {
153  return (projX - p_upperLeftX) / p_pixelResolution + 0.5;
154  };
155 
162  double WorldY(const double projY) const {
163  return (p_upperLeftY - projY) / p_pixelResolution + 0.5;
164  };
165 
172  double ProjectionX(const double sample) const {
173  return (sample - 0.5) * p_pixelResolution + p_upperLeftX;
174  };
175 
182  double ProjectionY(const double line) const {
183  return p_upperLeftY - (line - 0.5) * p_pixelResolution;
184  };
185 
187  double Resolution() const {
188  return p_pixelResolution;
189  }
190 
191  private:
192  double p_pixelResolution;
193  double p_upperLeftX;
194  double p_upperLeftY;
195  };
197 };
198 
199 #endif
200 
static Isis::Projection * Create(Isis::Pvl &label, bool allowDefaults=false)
This method returns a pointer to a Projection object.
static Isis::Projection * CreateFromCube(Isis::Cube &cube)
This method is a helper method.
~ProjectionFactory()
Destroys the ProjectionFactory object.
static Isis::Projection * RingsCreate(Isis::Pvl &label, bool allowDefaults=false)
This method returns a pointer to a RingPlaneProjection object.
Loads plugins from a shared library.
Definition: Plugin.h:71
static Isis::Projection * RingsCreateForCube(Isis::Pvl &label, int &samples, int &lines, bool sizeMatch)
This method creates a projection for a cube to a ring plane given a label.
Initialize a map projection.
Base class for Map Projections.
Definition: Projection.h:171
ProjectionFactory()
Constructor (Its private, so you cannot use it.) Use the Create method instead.
static Isis::Projection * CreateForCube(Isis::Pvl &label, int &ns, int &nl, bool sizeMatch=true)
This method creates a map projection for a cube given a label.
static Isis::Projection * RingsCreateFromCube(Isis::Cube &cube)
This method is a helper method.
double WorldX(const double projX) const
Returns the world x position for the given x projection value.
PFPixelMapper(double pixelResolution, double upperLeftX, double upperLeftY)
Constructs a PFFixelMapper object with the given pixel resolution and location.
double ProjectionX(const double sample) const
Returns the x projection of the given sample.
Container for cube-like labels.
Definition: Pvl.h:135
double Resolution() const
Returns the pixel resolution.
double WorldY(const double projY) const
Returns the world y position for the given y projection value.
double ProjectionY(const double line) const
Returns the y projection of the given line.
Create a mapping between a projection and other coordinate system.
Definition: WorldMapper.h:54
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
IO Handler for Isis Cubes.
Definition: Cube.h:170