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);