Skip to content

Commit

Permalink
Merge pull request #227 from ossimlabs/op-7
Browse files Browse the repository at this point in the history
Op 7
  • Loading branch information
gpotts authored Jun 4, 2019
2 parents 714a008 + ee8b472 commit 880b493
Show file tree
Hide file tree
Showing 4 changed files with 242 additions and 62 deletions.
18 changes: 17 additions & 1 deletion include/ossim/util/ossimChipperUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <ossim/imaging/ossimSingleImageChain.h>
#include <ossim/imaging/ossimImageFileWriter.h>
#include <ossim/projection/ossimMapProjection.h>
#include <ossim/base/ossimConnectableContainer.h>

#include <map>
#include <vector>
Expand Down Expand Up @@ -442,6 +443,12 @@ class OSSIM_DLL ossimChipperUtil : public ossimReferenced
* @note Throws ossimException on error.
*/
void propagateOutputProjectionToChains();

/**
* @brief loops through all chains and sets the viewport aoi. This is used
* if viewport stretch is enabled based on center tile request.
*/
void propagateViewportStretch(const ossimIrect& aoi);

/**
* @brief Combines all layers into an ossimImageMosaic.
Expand Down Expand Up @@ -804,6 +811,9 @@ class OSSIM_DLL ossimChipperUtil : public ossimReferenced
/** @brief Hidden from use copy constructor. */
ossimChipperUtil( const ossimChipperUtil& obj );

ossimRefPtr<ossimImageSource> getFinalInput(const ossimIrect& aoi, ossimRefPtr<ossimImageSource> currentSource);
void setStretch(ossimRefPtr<ossimHistogramRemapper> remapper)const;

/** @brief Hidden from use assignment operator. */
const ossimChipperUtil& operator=( const ossimChipperUtil& rhs );

Expand Down Expand Up @@ -843,11 +853,17 @@ class OSSIM_DLL ossimChipperUtil : public ossimReferenced
mutable ossimRefPtr<ossimImageFileWriter> m_writer;

/**
* We need to support changing clips without doing a full initilization.
* We need to support changing clips without doing a full initialization.
* we will save the ImageSource pointer on first initialization
*/
ossimRefPtr<ossimImageSource> m_source;

mutable bool m_viewPortStretchEnabled;

/**
* Final container that holds any cuts or stretching, ... etc just before we output
*/
ossimRefPtr<ossimConnectableContainer> m_container;
};

#endif /* #ifndef ossimChipperUtil_HEADER */
1 change: 0 additions & 1 deletion src/imaging/ossimHistogramRemapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ ossimRefPtr<ossimImageData> ossimHistogramRemapper::getTile(
// Rebuild the table if dirty flag set:
makeClean();
}

if ( theEnableFlag && !theBypassFlag && theTable.size() )
{
//---
Expand Down
3 changes: 1 addition & 2 deletions src/imaging/ossimImageHistogramSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,7 @@ void ossimImageHistogramSource::computeNormalModeHistogram()
{
// ref ptr, not a leak.
theHistogram = new ossimMultiResLevelHistogram;

ossimImageSource* input = PTR_CAST(ossimImageSource, getInput(0));
ossimImageSource *input = PTR_CAST(ossimImageSource, getInput(0));
if ( input )
{
// sum up all tiles needing processing. We will use the sequencer.
Expand Down
Loading

0 comments on commit 880b493

Please sign in to comment.