@@ -1164,6 +1164,9 @@ ossimRefPtr<ossimImageSource> ossimChipperUtil::initializeChain(ossimIrect &aoi)
1164
1164
source->initialize ();
1165
1165
}
1166
1166
1167
+ // GP 2019: we will add cutters at the end
1168
+ // Will remove temporarily bt leave the code hear just in
1169
+ // case I messed something up
1167
1170
if (source.valid () && !aoi.hasNans ())
1168
1171
{
1169
1172
// ---
@@ -1172,29 +1175,29 @@ ossimRefPtr<ossimImageSource> ossimChipperUtil::initializeChain(ossimIrect &aoi)
1172
1175
// 2) Speed up by not propagating get tile request outside the cut or "aoi"
1173
1176
// to the left hand side(input).
1174
1177
// ---
1175
- ossimRefPtr<ossimRectangleCutFilter> cutter = new ossimRectangleCutFilter ();
1178
+ // ossimRefPtr<ossimRectangleCutFilter> cutter = new ossimRectangleCutFilter();
1176
1179
1177
- // Set the cut rectangle:
1178
- cutter->setRectangle (aoi);
1180
+ // // Set the cut rectangle:
1181
+ // cutter->setRectangle(aoi);
1179
1182
1180
- // Null outside.
1181
- cutter->setCutType (ossimRectangleCutFilter::OSSIM_RECTANGLE_NULL_OUTSIDE);
1183
+ // // Null outside.
1184
+ // cutter->setCutType(ossimRectangleCutFilter::OSSIM_RECTANGLE_NULL_OUTSIDE);
1182
1185
1183
- // Connect cutter input to source chain.
1184
- cutter->connectMyInputTo (0 , source.get ());
1186
+ // // Connect cutter input to source chain.
1187
+ // cutter->connectMyInputTo(0, source.get());
1185
1188
1186
- source = cutter.get ();
1189
+ // source = cutter.get();
1187
1190
1188
- // Dependent on correct aoi so place after the cutter.
1189
- if (hasAnnotations ())
1190
- {
1191
- // Put annotations after scalar remapper.
1192
- ossimRefPtr<ossimImageSource> result = addAnnotations (source);
1193
- if (result.valid ())
1194
- {
1195
- source = result.get ();
1196
- }
1197
- }
1191
+ // // Dependent on correct aoi so place after the cutter.
1192
+ // if (hasAnnotations())
1193
+ // {
1194
+ // // Put annotations after scalar remapper.
1195
+ // ossimRefPtr<ossimImageSource> result = addAnnotations(source);
1196
+ // if (result.valid())
1197
+ // {
1198
+ // source = result.get();
1199
+ // }
1200
+ // }
1198
1201
}
1199
1202
}
1200
1203
@@ -1652,6 +1655,7 @@ ossimRefPtr<ossimImageData> ossimChipperUtil::getChip(const ossimKeywordlist &op
1652
1655
{
1653
1656
m_kwl->addList (optionsKwl, true );
1654
1657
}
1658
+
1655
1659
1656
1660
// (GP)
1657
1661
// Until we add more ellaborate code to check for scale changes
@@ -1668,6 +1672,7 @@ ossimRefPtr<ossimImageData> ossimChipperUtil::getChip(const ossimKeywordlist &op
1668
1672
1669
1673
if (optionsKwl.getSize () > 0 )
1670
1674
{
1675
+
1671
1676
// ---
1672
1677
// Only do this if new options were passed in. This was causing an off by
1673
1678
// one error when now options were passed in using thumbnail option.
@@ -1679,6 +1684,10 @@ ossimRefPtr<ossimImageData> ossimChipperUtil::getChip(const ossimKeywordlist &op
1679
1684
1680
1685
m_geom->setImageSize (aoi.size ());
1681
1686
}
1687
+ else
1688
+ {
1689
+ getAreaOfInterest (m_source.get (), aoi);
1690
+ }
1682
1691
1683
1692
if (m_source.valid ())
1684
1693
{
0 commit comments