76 void SubArea::SetSubArea(
const int orignl,
const int origns,
77 const int sl,
const int ss,
const int el,
78 const int es,
const double linc,
const double sinc) {
91 string msg =
"Invalid start/end line range [sl,el] specified for subarea";
96 string msg =
"Invalid start/end sample range [ss,es] specified for subarea";
102 string msg =
"Invalid line increment [linc] specified for subarea";
108 string msg =
"Invalid sample increment [sinc] specified for subarea";
148 if(p_linc != p_sinc) {
149 if(inlabel.
findObject(
"IsisCube").hasGroup(
"Mapping")) {
150 inlabel.
findObject(
"IsisCube").deleteGroup(
"Mapping");
151 results +=
PvlKeyword(
"MappingGroupDeleted",
"True");
156 if(inlabel.
findObject(
"IsisCube").hasGroup(
"Instrument")) {
157 inlabel.
findObject(
"IsisCube").deleteGroup(
"Instrument");
158 results +=
PvlKeyword(
"InstrumentGroupDeleted",
"True");
163 if(inlabel.
findObject(
"IsisCube").hasGroup(
"Mapping")) {
167 if(p_sl != 1 || p_ss != 1) {
168 proj->
SetWorld(p_ss - 0.5, p_sl - 0.5);
169 PvlGroup &mapgroup = inlabel.
findObject(
"IsisCube").findGroup(
"Mapping", Pvl::Traverse);
178 if(p_linc == p_sinc && p_linc != 1.0) {
179 PvlGroup &mapgroup = inlabel.
findObject(
"IsisCube").findGroup(
"Mapping", Pvl::Traverse);
180 QString pixresUnit = mapgroup[
"PixelResolution"].unit();
181 double pixres =
toDouble(mapgroup[
"PixelResolution"][0]);
182 mapgroup[
"PixelResolution"] =
toString(pixres * p_linc);
183 mapgroup[
"PixelResolution"].setUnits(pixresUnit);
184 QString scaleUnit = mapgroup[
"Scale"].unit();
185 double scale = mapgroup[
"Scale"];
186 mapgroup[
"Scale"] =
toString(scale / p_linc);
187 mapgroup[
"Scale"].setUnits(scaleUnit);
192 if(p_sl != 1 || p_ss != 1 || p_el != p_nl || p_es != p_ns) {
193 PvlGroup &mapgroup = inlabel.
findObject(
"IsisCube").findGroup(
"Mapping", Pvl::Traverse);
195 double minlat, maxlat;
196 double minlon, maxlon;
261 if(inlabel.
findObject(
"IsisCube").hasGroup(
"Instrument")) {
263 inst = inlabel.
findObject(
"IsisCube").findGroup(
"Instrument");
270 if(inlabel.
findObject(
"IsisCube").hasGroup(
"Mapping")) {
272 mapgrp = inlabel.
findObject(
"IsisCube").findGroup(
"Mapping");
279 p_ss - 0.5, p_sl - 0.5, p_es + 0.5, p_el + 0.5);
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
bool IsPositiveEast() const
This indicates if the longitude direction type is positive west (as opposed to postive east)...
Base class for Map TProjections.
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
virtual bool IsEquatorialCylindrical()
This method returns true if the projection is equatorial cylindrical.
Namespace for the standard library.
double UniversalLongitude()
This returns a universal longitude (positive east in 0 to 360 domain).
bool IsGood() const
This indicates if the last invocation of SetGround, SetCoordinate, SetUniversalGround, or SetWorld was with successful or not.
double XCoord() const
This returns the projection X provided SetGround, SetCoordinate, SetUniversalGround, or SetWorld returned with success.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
void addKeyword(const PvlKeyword &keyword, const InsertMode mode=Append)
Add a keyword to the container.
Projection * projection()
double toDouble(const QString &string)
Global function to convert from a string to a double.
This class is used to rewrite the "alpha" keywords out of the AlphaCube group or Instrument group...
static double ToPositiveWest(const double lon, const int domain)
This method converts a longitude into the positive west direction.
static double To180Domain(const double lon)
This method converts a longitude into the -180 to 180 domain.
bool Has180Domain() const
This indicates if the longitude domain is -180 to 180 (as opposed to 0 to 360).
bool IsPlanetographic() const
This indicates if the latitude type is planetographic (as opposed to planetocentric).
bool hasGroup(const QString &group) const
Return if the cube has a specified group in the labels.
Contains multiple PvlContainers.
#define _FILEINFO_
Macro for the filename and line number.
A single keyword-value pair.
double YCoord() const
This returns the projection Y provided SetGround, SetCoordinate, SetUniversalGround, or SetWorld returned with success.
Container for cube-like labels.
double ToPlanetographic(const double lat) const
This method converts a planetocentric latitude to a planetographic latitude.
double UniversalLatitude()
This returns a universal latitude (planetocentric).
void UpdateGroup(Cube &cube)
Writes or update the Alpha keywords (AlphaLines, AlphaSamples, AlphaStartingSamples, etc) in the proper group in a PVL object.
bool SetWorld(const double x, const double y)
This method is used to set a world coordinate.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Namespace for ISIS/Bullet specific routines.
void putGroup(const PvlGroup &group)
Adds a group in a Label to the cube.
void deleteGroup(const QString &group)
Deletes a group from the cube labels.
void deleteKeyword(const QString &name)
Remove a specified keyword.
IO Handler for Isis Cubes.