Skip to content

Commit ea69ce5

Browse files
authored
Merge pull request #228 from ossimlabs/op-7
Removed the cuttern and placed it at the end. The cutter was not bei…
2 parents 880b493 + 2b2933b commit ea69ce5

File tree

1 file changed

+27
-18
lines changed

1 file changed

+27
-18
lines changed

src/util/ossimChipperUtil.cpp

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,6 +1164,9 @@ ossimRefPtr<ossimImageSource> ossimChipperUtil::initializeChain(ossimIrect &aoi)
11641164
source->initialize();
11651165
}
11661166

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
11671170
if (source.valid() && !aoi.hasNans())
11681171
{
11691172
//---
@@ -1172,29 +1175,29 @@ ossimRefPtr<ossimImageSource> ossimChipperUtil::initializeChain(ossimIrect &aoi)
11721175
// 2) Speed up by not propagating get tile request outside the cut or "aoi"
11731176
// to the left hand side(input).
11741177
//---
1175-
ossimRefPtr<ossimRectangleCutFilter> cutter = new ossimRectangleCutFilter();
1178+
// ossimRefPtr<ossimRectangleCutFilter> cutter = new ossimRectangleCutFilter();
11761179

1177-
// Set the cut rectangle:
1178-
cutter->setRectangle(aoi);
1180+
// // Set the cut rectangle:
1181+
// cutter->setRectangle(aoi);
11791182

1180-
// Null outside.
1181-
cutter->setCutType(ossimRectangleCutFilter::OSSIM_RECTANGLE_NULL_OUTSIDE);
1183+
// // Null outside.
1184+
// cutter->setCutType(ossimRectangleCutFilter::OSSIM_RECTANGLE_NULL_OUTSIDE);
11821185

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

1186-
source = cutter.get();
1189+
// source = cutter.get();
11871190

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+
// }
11981201
}
11991202
}
12001203

@@ -1652,6 +1655,7 @@ ossimRefPtr<ossimImageData> ossimChipperUtil::getChip(const ossimKeywordlist &op
16521655
{
16531656
m_kwl->addList(optionsKwl, true);
16541657
}
1658+
16551659

16561660
// (GP)
16571661
// Until we add more ellaborate code to check for scale changes
@@ -1668,6 +1672,7 @@ ossimRefPtr<ossimImageData> ossimChipperUtil::getChip(const ossimKeywordlist &op
16681672

16691673
if (optionsKwl.getSize() > 0)
16701674
{
1675+
16711676
//---
16721677
// Only do this if new options were passed in. This was causing an off by
16731678
// one error when now options were passed in using thumbnail option.
@@ -1679,6 +1684,10 @@ ossimRefPtr<ossimImageData> ossimChipperUtil::getChip(const ossimKeywordlist &op
16791684

16801685
m_geom->setImageSize(aoi.size());
16811686
}
1687+
else
1688+
{
1689+
getAreaOfInterest(m_source.get(), aoi);
1690+
}
16821691

16831692
if (m_source.valid())
16841693
{

0 commit comments

Comments
 (0)