File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis Developer Reference
ProjectionFactory.h
Go to the documentation of this file.
1 #ifndef ProjectionFactory_h
2 #define ProjectionFactory_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include "Plugin.h"
10 #include "WorldMapper.h"
11 
12 namespace Isis {
13  class Camera;
14  class Cube;
15  class Projection;
16  class RingPlaneProjection;
17 
76  public:
77  static Isis::Projection *Create(Isis::Pvl &label, bool allowDefaults = false);
78  static Isis::Projection *RingsCreate(Isis::Pvl &label, bool allowDefaults = false);
81  static Isis::Projection *CreateFromCube(Isis::Pvl &label); // Load Method in cm
82  static Isis::Projection *RingsCreateFromCube(Isis::Pvl &label); // Load Method in cm
83  static Isis::Projection *CreateForCube(Isis::Pvl &label, int &ns, int &nl,
84  bool sizeMatch = true); // Create method in cm
86  int &samples, int &lines,
87  bool sizeMatch);
89  int &samples, int &lines,
90  Camera &cam);
92  int &samples, int &lines,
93  Camera &cam);
94 
95 
96  private:
101  ProjectionFactory() {};
102 
104  ~ProjectionFactory() {};
105 
106  static Plugin m_projPlugin;
107  };
108 
109 
116  public:
124  PFPixelMapper(double pixelResolution, double upperLeftX, double upperLeftY) {
125  p_pixelResolution = pixelResolution;
126  p_upperLeftX = upperLeftX;
127  p_upperLeftY = upperLeftY;
128  };
129 
136  double WorldX(const double projX) const {
137  return (projX - p_upperLeftX) / p_pixelResolution + 0.5;
138  };
139 
146  double WorldY(const double projY) const {
147  return (p_upperLeftY - projY) / p_pixelResolution + 0.5;
148  };
149 
156  double ProjectionX(const double sample) const {
157  return (sample - 0.5) * p_pixelResolution + p_upperLeftX;
158  };
159 
166  double ProjectionY(const double line) const {
167  return p_upperLeftY - (line - 0.5) * p_pixelResolution;
168  };
169 
171  double Resolution() const {
172  return p_pixelResolution;
173  }
174 
175  private:
176  double p_pixelResolution;
177  double p_upperLeftX;
178  double p_upperLeftY;
179  };
181 };
182 
183 #endif
184 
Isis::Camera::SetBand
virtual void SetBand(const int band)
Virtual method that sets the band number.
Definition: Camera.cpp:2680
Isis::RingPlaneProjection::SetGround
virtual bool SetGround(const double ringRadius, const double ringLongitude)
This method is used to set the ring radius/longitude (assumed to be of the correct LatitudeType,...
Definition: RingPlaneProjection.cpp:456
Isis::PFPixelMapper::Resolution
double Resolution() const
Returns the pixel resolution.
Definition: ProjectionFactory.h:171
Displacement.h
Isis::TProjection::LocalRadius
double LocalRadius(double lat) const
This method returns the local radius in meters at the specified latitude position.
Definition: TProjection.cpp:326
FileName.h
Isis::ProjectionFactory::RingsCreate
static Isis::Projection * RingsCreate(Isis::Pvl &label, bool allowDefaults=false)
This method returns a pointer to a RingPlaneProjection object.
Definition: ProjectionFactory.cpp:119
ProjectionFactory.h
Isis::PvlObject::findGroup
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
Cube.h
Plugin.h
Isis::PI
const double PI
The mathematical constant PI.
Definition: Constants.h:40
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
Isis::PFPixelMapper::ProjectionX
double ProjectionX(const double sample) const
Returns the x projection of the given sample.
Definition: ProjectionFactory.h:156
Isis::Projection::SetUpperLeftCorner
void SetUpperLeftCorner(const Displacement &x, const Displacement &y)
This method searches for extreme (min/max/discontinuity) coordinate values along the constBorder line...
Definition: Projection.cpp:1373
Isis::Camera::SetImage
virtual bool SetImage(const double sample, const double line)
Sets the sample/line values of the image to get the lat/lon values.
Definition: Camera.cpp:154
Isis::PvlContainer::addKeyword
void addKeyword(const PvlKeyword &keyword, const InsertMode mode=Append)
Add a keyword to the container.
Definition: PvlContainer.cpp:202
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::ProjectionFactory::CreateForCube
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.
Definition: ProjectionFactory.cpp:188
Isis::Camera::Sample
virtual double Sample() const
Returns the current sample number.
Definition: Camera.cpp:2690
Isis::PFPixelMapper
Definition: ProjectionFactory.h:115
Isis::FileName::fileExists
bool fileExists() const
Returns true if the file exists; false otherwise.
Definition: FileName.cpp:449
Isis::PFPixelMapper::PFPixelMapper
PFPixelMapper(double pixelResolution, double upperLeftX, double upperLeftY)
Constructs a PFFixelMapper object with the given pixel resolution and location.
Definition: ProjectionFactory.h:124
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
WorldMapper.h
Isis::RingPlaneProjection::XYRange
virtual bool XYRange(double &minX, double &maxX, double &minY, double &maxY)
This method is used to determine the x/y range which completely covers the area of interest specified...
Definition: RingPlaneProjection.cpp:656
Isis::ProjectionFactory::RingsCreateFromCube
static Isis::Projection * RingsCreateFromCube(Isis::Cube &cube)
This method is a helper method.
Definition: ProjectionFactory.cpp:1081
Isis::Projection::SetWorldMapper
void SetWorldMapper(WorldMapper *mapper)
If desired the programmer can use this method to set a world mapper to be used in the SetWorld,...
Definition: Projection.cpp:474
Isis::Camera
Definition: Camera.h:236
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::IException::append
void append(const IException &exceptionSource)
Appends the given exception (and its list of previous exceptions) to this exception's causational exc...
Definition: IException.cpp:409
Isis::RingPlaneProjection::TrueScaleRingRadius
virtual double TrueScaleRingRadius() const
This method returns the radius of true scale.
Definition: RingPlaneProjection.cpp:199
Isis::PvlObject::Traverse
@ Traverse
Search child objects.
Definition: PvlObject.h:158
Isis::PFPixelMapper::WorldX
double WorldX(const double projX) const
Returns the world x position for the given x projection value.
Definition: ProjectionFactory.h:136
Isis::Displacement
Displacement is a signed length, usually in meters.
Definition: Displacement.h:31
Isis::TProjection::SetUniversalGround
virtual bool SetUniversalGround(const double lat, const double lon)
This method is used to set the latitude/longitude which must be Planetocentric (latitude) and Positiv...
Definition: TProjection.cpp:839
Isis::Projection::IsGood
bool IsGood() const
This indicates if the last invocation of SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:374
Isis::FileName::expanded
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
Isis::RingPlaneProjection
Base class for Map Projections of plane shapes.
Definition: RingPlaneProjection.h:147
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::Sensor::UniversalLongitude
virtual double UniversalLongitude() const
Returns the positive east, 0-360 domain longitude, in degrees, at the surface intersection point in t...
Definition: Sensor.cpp:233
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::TProjection::XYRange
virtual bool XYRange(double &minX, double &maxX, double &minY, double &maxY)
This method is used to determine the x/y range which completely covers the area of interest specified...
Definition: TProjection.cpp:993
Isis::TProjection
Base class for Map TProjections.
Definition: TProjection.h:166
Isis::PFPixelMapper::WorldY
double WorldY(const double projY) const
Returns the world y position for the given y projection value.
Definition: ProjectionFactory.h:146
Isis::Camera::SetUniversalGround
virtual bool SetUniversalGround(const double latitude, const double longitude)
Sets the lat/lon values to get the sample/line values.
Definition: Camera.cpp:380
Isis::WorldMapper
Create a mapping between a projection and other coordinate system.
Definition: WorldMapper.h:38
Isis::PvlContainer::fileName
QString fileName() const
Returns the filename used to initialise the Pvl object.
Definition: PvlContainer.h:232
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::ProjectionFactory::Create
static Isis::Projection * Create(Isis::Pvl &label, bool allowDefaults=false)
This method returns a pointer to a Projection object.
Definition: ProjectionFactory.cpp:51
TProjection.h
Camera.h
Isis::PvlObject::hasObject
bool hasObject(const QString &name) const
Returns a boolean value based on whether the object exists in the current PvlObject or not.
Definition: PvlObject.h:323
Isis::Null
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
Isis::PFPixelMapper::ProjectionY
double ProjectionY(const double line) const
Returns the y projection of the given line.
Definition: ProjectionFactory.h:166
Isis::Camera::Bands
int Bands() const
Returns the number of bands in the image.
Definition: Camera.cpp:2796
Isis::ProjectionFactory::CreateFromCube
static Isis::Projection * CreateFromCube(Isis::Cube &cube)
This method is a helper method.
Definition: ProjectionFactory.cpp:1069
Isis::Camera::IsBandIndependent
virtual bool IsBandIndependent()
Virtual method that checks if the band is independent.
Definition: Camera.cpp:2649
Isis::Camera::Samples
int Samples() const
Returns the number of samples in the image.
Definition: Camera.cpp:2776
Isis::ProjectionFactory::RingsCreateForCube
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.
Definition: ProjectionFactory.cpp:432
Isis::TProjection::TrueScaleLatitude
virtual double TrueScaleLatitude() const
This method returns the latitude of true scale.
Definition: TProjection.cpp:368
IException.h
std
Namespace for the standard library.
Isis::PvlContainer::Replace
@ Replace
Definition: PvlContainer.h:95
RingPlaneProjection.h
Isis::Cube::label
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition: Cube.cpp:1701
Isis::Distance::meters
double meters() const
Get the distance in meters.
Definition: Distance.cpp:85
Projection.h
Isis::Camera::Lines
int Lines() const
Returns the number of lines in the image.
Definition: Camera.cpp:2786
Isis::Camera::Line
virtual double Line() const
Returns the current line number.
Definition: Camera.cpp:2710
Distance.h
Isis::Projection::YCoord
double YCoord() const
This returns the projection Y provided SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:400
Isis::Projection
Base class for Map Projections.
Definition: Projection.h:155
Isis::ProjectionFactory
Initialize a map projection.
Definition: ProjectionFactory.h:75
Isis::Projection::XCoord
double XCoord() const
This returns the projection X provided SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:387
Isis::Projection::HasGroundRange
virtual bool HasGroundRange() const
This indicates if the longitude direction type is positive west (as opposed to postive east).
Definition: Projection.cpp:349
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::Sensor::LocalRadius
Distance LocalRadius() const
Returns the local radius at the intersection point.
Definition: Sensor.cpp:267
Isis::Sensor::UniversalLatitude
virtual double UniversalLatitude() const
Returns the planetocentric latitude, in degrees, at the surface intersection point in the body fixed ...
Definition: Sensor.cpp:210
Isis::Plugin
Loads plugins from a shared library.
Definition: Plugin.h:55

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:12:14