27 m_histogramRemapper(0),
28 m_brightnessContrast(0),
34 m_addNullPixelFlipFlag(false),
35 m_addHistogramFlag(false),
36 m_addResamplerCacheFlag(false),
37 m_addChainCacheFlag(false),
38 m_remapToEightBitFlag(false),
39 m_threeBandFlag(false),
40 m_threeBandReverseFlag(false),
41 m_brightnessContrastFlag(false),
43 m_geoPolyCutterFlag(false)
48 bool addHistogramFlag,
49 bool addResamplerCacheFlag,
50 bool addChainCacheFlag,
51 bool remapToEightBitFlag,
53 bool threeBandReverseFlag,
54 bool brightnessContrastFlag,
56 bool geoPolyCutterFlag)
61 m_histogramRemapper(0),
62 m_brightnessContrast(0),
68 m_addNullPixelFlipFlag(addNullPixelFlipFlag),
69 m_addHistogramFlag(addHistogramFlag),
70 m_addResamplerCacheFlag(addResamplerCacheFlag),
71 m_addChainCacheFlag(addChainCacheFlag),
72 m_remapToEightBitFlag(remapToEightBitFlag),
73 m_threeBandFlag(threeBandFlag),
74 m_threeBandReverseFlag(threeBandReverseFlag),
75 m_brightnessContrastFlag(brightnessContrastFlag),
76 m_sharpenFlag(sharpenFlag),
77 m_geoPolyCutterFlag(geoPolyCutterFlag)
269 ossimIpt inputImageTileSize(64, 64);
465 if ( supportDir.
empty() )
584 static const char MODULE[] =
585 "ossimSingleImageChain::addHistogramRemapper(const ossimSrcRecord&)";
618 << MODULE <<
"\nCould not open: " << f <<
"\n";
631 if ( op ==
"auto-minmax" )
635 else if ( (op ==
"std-stretch-1") || (op ==
"std-stretch 1") )
639 else if ( (op ==
"std-stretch-2") || (op ==
"std-stretch 2") )
643 else if ( (op ==
"std-stretch-3") || (op ==
"std-stretch 3") )
651 << MODULE <<
"\nUnhandled operation: " << op <<
"\n";
985 std::vector<ossim_uint32> bandList(3);
1013 std::vector<ossim_uint32> bandList(3);
1032 const std::vector<ossim_uint32>& bandList)
1072 bool result =
false;
ossimRefPtr< ossimImageSharpenFilter > m_sharpen
Class used for parsing the command line *.src files.
virtual bool removeChild(ossimConnectableObject *object)
Will remove the child from the container.
ossim_int32 getEntryIndex() const
void setToThreeBands()
Utility method to force 3 band output.
void addBandSelector()
Adds a band selector to the end of the chain.
void setAddResamplerCacheFlag(bool flag)
If flag is true a resampler cache will be added to the chain at create time.
ossimRefPtr< ossimCacheTileSource > m_chainCache
ossimRefPtr< ossimNullPixelFlip > m_nullPixelFlip
void addNullPixelFlip()
Adds the null pixel flip just after the band selection.
void setAddNullPixelFlipFlag(bool flag)
If flag is true a null pixel flip will be added to the chain at create time.
bool addLast(ossimConnectableObject *obj)
Adds it to the end.
bool getThreeBandFlag() const
Get the three band flag.
bool deleteLast()
Deletes the last object.
static const ossimFilename NIL
This was taken from Wx widgets for performing touch and access date stamps.
virtual ossimImageHandler * open(const ossimFilename &fileName, bool trySuffixFirst=true, bool openOverview=true) const
open that takes a filename.
ossimRefPtr< const ossimImageSharpenFilter > getSharpenFilter() const
void setToThreeBandsReverse()
Utility method to set to 3 bandsand reverse them.
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if not defined...
ossimRefPtr< const ossimImageHandler > getImageHandler() const
void addResampler()
Adds a resampler (a.k.a.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
ossimRefPtr< ossimBrightnessContrastSource > m_brightnessContrast
ossimRefPtr< ossimGeoPolyCutter > m_geoPolyCutter
void setSharpenFlag(bool flag)
Sets the sharpenflag.
const ossimFilename & getMaskPath() const
ossimFilename getHistogramFile() const
Returns the currently opened histogram.
bool m_threeBandReverseFlag
ossimFilename getFilename() const
virtual void initialize()
void createRenderedChain()
Create a rendered image chain.
virtual const ossimImageHandler * getOverview() const
void addSharpen()
Adds sharpen filter the end of the chain if not present.
void addGeoPolyCutter()
Adds a geo polycutter to allow for cropping imagery or nulling out regions.
Class to fill a patch from input tiles requested on even tile boundaries with a tile size typically m...
ossimRefPtr< ossimImageHandler > m_handler
Pointers to links in chain.
ossimRefPtr< ossimImageHandler > openConnection(const ossimString &connectionString, bool openOverview=true) const
const std::vector< ossim_uint32 > & getBands() const
virtual ~ossimSingleImageChain()
virtual destructor
const ossimFilename & getSupportDir() const
ossimRefPtr< ossimScalarRemapper > m_scalarRemapper
void setBrightnessContrastFlag(bool flag)
Sets the brightness contrast flag.
void setDefaultBandSelection()
virtual bool openOverview()
Searches for an overview.
ossimScalarType getImageHandlerScalarType() const
Convenience method to return the scalar type of the image handler.
void setBandSelection(const std::vector< ossim_uint32 > &bandList)
method to set band selector.
const ossimFilename & getOverviewPath() const
See note below on these data members.
ossimRefPtr< const ossimCacheTileSource > getChainCache() const
const ossimFilename & getFilename() const
void setStretchMode(StretchMode mode, bool rebuildTableFlag=false)
Sets remap mode to mode.
bool m_brightnessContrastFlag
bool getNullPixelFlipFlag() const
Gets the add histogram flag.
const ossimKeywordlist & getAttributesKwl() const
Returns the KWL containing the desired vector representation properties.
ossimRefPtr< const ossimScalarRemapper > getScalarRemapper() const
bool getThreeBandReverseFlag() const
Get the three band reverse flag.
ossimRefPtr< ossimHistogramRemapper > m_histogramRemapper
virtual bool setView(ossimObject *baseObject)
virtual const ossimFilename & getFilename() const
Returns the filename.
bool getAddChainCacheFlag() const
Gets the add chain cache flag.
ossimSingleImageChain()
default constructor
void addRenderer()
Adds a resampler (a.k.a.
std::string::size_type size() const
void reset()
reset method This deletes all links in the chain, zero's out all data members, and sets all flags bac...
ossimRefPtr< ossimImageRenderer > m_resampler
virtual ossim_uint32 getImageTileHeight() const =0
Returns the tile width of the image or 0 if the image is not tiled.
bool getSharpenFlag() const
Get the sharpen flag.
void addBrightnessContrast()
Adds brightness contrast filter the end of the chain if not present.
unsigned int ossim_uint32
void setThreeBandReverseFlag(bool flag)
Sets the three band reverse flag.
void setTileSize(const ossimIpt &size)
Set the tile size.
virtual bool getRgbBandList(std::vector< ossim_uint32 > &bandList) const
Convenience method to get the zero based rgb output band list.
void addScalarRemapper()
Adds scalar remapper either to the left of the resampler cache or at the end of the chain if not pres...
bool m_addNullPixelFlipFlag
control flags
static ossimString downcase(const ossimString &aString)
bool getBrightnessContrastFlag() const
Get the brightness constrast flag.
virtual void addPolygon(const vector< ossimIpt > &polygon)
ossimRefPtr< ossimCacheTileSource > addCache()
Adds a new cache to the current end of the chain.
bool openHistogram(ossimHistogramRemapper::StretchMode mode)
Convenience method to open the histogram and apply a default stretch.
bool getAddResamplerCacheFlag() const
Gets the add resampler cache flag.
virtual void setEnableFlag(bool flag)
const ossimFilename & getHistogramPath() const
virtual void initialize()
ossimRefPtr< const ossimHistogramRemapper > getHistogramRemapper() const
void setAddHistogramFlag(bool flag)
If flag is true a histogram will be added to the chain at create time.
ossimRefPtr< ossimBandSelector > m_bandSelector
virtual ossim_uint32 getImageTileWidth() const =0
Returns the tile width of the image or 0 if the image is not tiled.
ossimRefPtr< const ossimNullPixelFlip > getNullPixelFlip() const
virtual bool isImageTiled() const
Indicates whether or not the image is tiled internally.
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
bool getRemapToEightBitFlag() const
Get the remap to eight bit flag.
void addHistogramRemapper()
Adds histogram remapper to the chain.
bool addImageHandler(const ossimFilename &file, bool openOverview=true)
Adds an image handler for file.
ossimFilename fileNoExtension() const
virtual void setThreeBandRgb()
Will set to three bands (rgb) out.
virtual void setOutputBandList(const vector< ossim_uint32 > &outputBandList, bool disablePassThru=false)
Sets the output band list.
ossimFilename dirCat(const ossimFilename &file) const
void setRemapToEightBitFlag(bool flag)
Sets remap to eigth bit flag.
bool open(const ossimFilename &file, bool openOverview=true)
open method that takes an image file.
ossimRefPtr< const ossimCacheTileSource > getResamplerCache() const
virtual void setSupplementaryDirectory(const ossimFilename &dir)
Sets the supplementary directory.
static ossimImageHandlerRegistry * instance()
bool getAddHistogramFlag() const
Gets the add histogram flag.
ossimRefPtr< const ossimBandSelector > getBandSelector() const
ossimRefPtr< const ossimImageRenderer > getImageRenderer() const
bool setInputTileSize(const ossimIpt &tileSize)
Sets the input tile size.
virtual ossim_uint32 getNumberOfInputBands() const =0
ossimFilename & setExtension(const ossimString &e)
Sets the extension of a file name.
virtual bool setCurrentEntry(ossim_uint32 entryIdx)
const ossimString & getHistogramOp() const
bool m_addResamplerCacheFlag
ossimFilename getFilenameWithThisExtension(const ossimString &ext, bool set_e0_prefix=false) const
Returns the image file with extension set using supplentary directory for dirname if set...
bool insertLeft(ossimConnectableObject *newObj, const ossimId &id)
ossimFilename path() const
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
void setThreeBandFlag(bool flag)
Sets the three band flag.
bool m_remapToEightBitFlag
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
bool openHistogram(const ossimFilename &histogram_file)
Open the histogram file.
void addGeoPolyCutterPolygon(const vector< ossimGpt > &polygon)
bool addFirst(ossimConnectableObject *obj)
Adds it to the start of the chain.
ossimRefPtr< const ossimBrightnessContrastSource > getBrightnessContrast() const
void close()
close method to delete the image handler.
void setAddChainCacheFlag(bool flag)
If flag is true a chain cache will be added to the chain at create time.
ossimRefPtr< ossimCacheTileSource > m_resamplerCache