diff --git a/src/util/ossimChipperUtil.cpp b/src/util/ossimChipperUtil.cpp index 0b66a2fcd..dd286ae8d 100644 --- a/src/util/ossimChipperUtil.cpp +++ b/src/util/ossimChipperUtil.cpp @@ -1164,6 +1164,9 @@ ossimRefPtr ossimChipperUtil::initializeChain(ossimIrect &aoi) source->initialize(); } + // GP 2019: we will add cutters at the end + // Will remove temporarily bt leave the code hear just in + // case I messed something up if (source.valid() && !aoi.hasNans()) { //--- @@ -1172,29 +1175,29 @@ ossimRefPtr ossimChipperUtil::initializeChain(ossimIrect &aoi) // 2) Speed up by not propagating get tile request outside the cut or "aoi" // to the left hand side(input). //--- - ossimRefPtr cutter = new ossimRectangleCutFilter(); + // ossimRefPtr cutter = new ossimRectangleCutFilter(); - // Set the cut rectangle: - cutter->setRectangle(aoi); + // // Set the cut rectangle: + // cutter->setRectangle(aoi); - // Null outside. - cutter->setCutType(ossimRectangleCutFilter::OSSIM_RECTANGLE_NULL_OUTSIDE); + // // Null outside. + // cutter->setCutType(ossimRectangleCutFilter::OSSIM_RECTANGLE_NULL_OUTSIDE); - // Connect cutter input to source chain. - cutter->connectMyInputTo(0, source.get()); + // // Connect cutter input to source chain. + // cutter->connectMyInputTo(0, source.get()); - source = cutter.get(); + // source = cutter.get(); - // Dependent on correct aoi so place after the cutter. - if (hasAnnotations()) - { - // Put annotations after scalar remapper. - ossimRefPtr result = addAnnotations(source); - if (result.valid()) - { - source = result.get(); - } - } + // // Dependent on correct aoi so place after the cutter. + // if (hasAnnotations()) + // { + // // Put annotations after scalar remapper. + // ossimRefPtr result = addAnnotations(source); + // if (result.valid()) + // { + // source = result.get(); + // } + // } } } @@ -1652,6 +1655,7 @@ ossimRefPtr ossimChipperUtil::getChip(const ossimKeywordlist &op { m_kwl->addList(optionsKwl, true); } + // (GP) // Until we add more ellaborate code to check for scale changes @@ -1668,6 +1672,7 @@ ossimRefPtr ossimChipperUtil::getChip(const ossimKeywordlist &op if (optionsKwl.getSize() > 0) { + //--- // Only do this if new options were passed in. This was causing an off by // one error when now options were passed in using thumbnail option. @@ -1679,6 +1684,10 @@ ossimRefPtr ossimChipperUtil::getChip(const ossimKeywordlist &op m_geom->setImageSize(aoi.size()); } + else + { + getAreaOfInterest(m_source.get(), aoi); + } if (m_source.valid()) {