OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ossimOverviewBuilderBase Class Referenceabstract

#include <ossimOverviewBuilderBase.h>

Inheritance diagram for ossimOverviewBuilderBase:
ossimSource ossimProcessInterface ossimConnectableObjectListener ossimConnectableObject ossimErrorStatusInterface ossimListener ossimObject ossimListenerManager ossimPropertyInterface ossimReferenced ossimGdalOverviewBuilder ossimKakaduNitfOverviewBuilder ossimTiffOverviewBuilder

Public Member Functions

 ossimOverviewBuilderBase ()
 default constructor More...
 
virtual bool setOutputWriter (ossimImageFileWriter *outputWriter)
 Sets an optional file writer to the builder. More...
 
virtual bool setInputSource (ossimImageHandler *imageSource)
 Sets the input to the builder. More...
 
virtual void setOutputFile (const ossimFilename &file)=0
 Sets the output file name. More...
 
virtual ossimFilename getOutputFile () const =0
 Gets the output file name. More...
 
virtual bool setOverviewType (const ossimString &type)=0
 Sets the overview output type. More...
 
virtual ossimString getOverviewType () const =0
 Gets the overview type. More...
 
virtual bool hasOverviewType (const ossimString &type) const
 Method to check if builder can handle type. More...
 
virtual void getTypeNameList (std::vector< ossimString > &typeList) const =0
 Method to populate class supported types. More...
 
virtual ossim_uint32 getOverviewStopDimension () const
 Get the overview stop dimension. More...
 
virtual void setOverviewStopDimension (ossim_uint32 dim)
 Sets the overview stop dimension. More...
 
ossimHistogramMode getHistogramMode () const
 Gets the histogram accumulation mode. More...
 
void setHistogramMode (ossimHistogramMode mode)
 Sets the histogram accumulation mode. More...
 
virtual bool execute ()=0
 Builds the overviews. More...
 
virtual void finalize ()
 Finalize method. More...
 
void setBitMaskSpec (const ossimKeywordlist &bit_mask_spec)
 Specifies parameters (in KWL) for generation of an alpha (bit) mask such that any full or partial null pixels will be masked out. More...
 
void setScanForMinMax (bool flag)
 Turn on/off scan for min max flag. More...
 
bool getScanForMinMax () const
 
void setScanForMinMaxNull (bool flag)
 Turn on/off scan for min, max, null flag. More...
 
bool getScanForMinMaxNull () const
 
- Public Member Functions inherited from ossimSource
 ossimSource (ossimObject *owner=0)
 
 ossimSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimSource ()
 
virtual bool isSourceEnabled () const
 
virtual void enableSource ()
 
virtual void disableSource ()
 
virtual bool getEnableFlag () const
 
virtual void setEnableFlag (bool flag)
 
virtual bool isInitialized () const
 
virtual void setInitializedFlag (bool flag)
 
virtual void initialize ()
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual std::ostream & print (std::ostream &out) const
 Outputs theErrorStatus as an ossimErrorCode and an ossimString. More...
 
- Public Member Functions inherited from ossimConnectableObject
 ossimConnectableObject (ossimObject *owner=0)
 Base constructor of this object. More...
 
 ossimConnectableObject (ossimObject *owner, ossim_int32 inputListSize, ossim_int32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimConnectableObject ()
 
void setId (const ossimId &id)
 All connectable objects will have id's. More...
 
const ossimIdgetId () const
 Will allow us to get this object's id. More...
 
const ossimObjectgetOwner () const
 Fetches the current owner, most likely a container but not limited to one. More...
 
virtual void changeOwner (ossimObject *owner)
 Permits changing the object's owner. More...
 
virtual void setDescription (const ossimString &description)
 
virtual ossimString getDescription () const
 
virtual bool isConnected (ossimConnectableObjectDirectionType direction=CONNECTABLE_DIRECTION_INPUT) const
 will check the direction specified to see if all slots are full. More...
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findConnectableObject(const ossimId &id))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(RTTItypeid typeId, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(const ossimString &obj, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findInputObjectOfType(const ossimString &className))
 
virtual ossim_int32 findInputIndex (const ossimConnectableObject *object)
 Return a valid index of the input list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findInputIndex (const ossimId &id)
 Return a valid index of the input list if the passed id is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimConnectableObject *object)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimId &id)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 getMyInputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual ossim_int32 getMyOutputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual bool canConnectMyInputTo (ossim_int32 myInputIndex, const ossimConnectableObject *object) const =0
 required to be overriden by derived classes More...
 
virtual bool canConnectMyOutputTo (ossim_int32 myOutputIndex, const ossimConnectableObject *object) const
 default implementation is to allow anyone to connect to us. More...
 
virtual void disconnect (ossimConnectableObject *object=0)
 Will disconnect the object passed in. More...
 
virtual void disconnect (const ossimId &id)
 Will disconnect the object passed in. More...
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyInput (ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given input index and generate a connection event. More...
 
virtual void disconnectMyInput (ossimConnectableObject *input, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Finds the index of the passed in input and calls disconnectMyInput(inputIndex, disconnectOutputFlag, createEventFlag);. More...
 
virtual void disconnectMyInputs (ConnectableObjectList &inputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyOutput (ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given output index and generate a connection event. More...
 
virtual void disconnectMyOutput (ossimConnectableObject *output, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the output object. More...
 
virtual void disconnectMyOutputs (ConnectableObjectList &outputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual void disconnectAllInputs ()
 Will disconnect all of the input objects. More...
 
virtual void disconnectAllOutputs ()
 Will disconnect all of the output objects. More...
 
virtual ossim_int32 connectMyInputTo (ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will try to connect this objects input to the passed in object. More...
 
virtual ossim_int32 connectMyInputTo (ossim_int32 inputIndex, ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will connect the specified input to the passed in object. More...
 
virtual bool connectMyInputTo (ConnectableObjectList &inputList, bool makeOutputConnection=true, bool createEventFlag=true)
 
virtual ossim_int32 connectMyOutputTo (ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true)
 Will try to connect this objects output to the passed in object. More...
 
virtual bool connectMyOutputTo (ConnectableObjectList &outputList, bool makeInputConnection=true, bool createEventFlag=true)
 
virtual bool connectInputList (ConnectableObjectList &inputList)
 Will disconnect itself from all inputs and reset to the passed in input list. More...
 
virtual bool connectOutputList (ConnectableObjectList &outputList)
 Will disconnect itself from all outputs and reset to the passed in output list. More...
 
virtual ossim_uint32 getNumberOfInputs () const
 Returns the number of input objects. More...
 
virtual ossim_uint32 getNumberOfOutputs () const
 Return the number of output objects. More...
 
ossimConnectableObjectgetInput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetInput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
ossimConnectableObjectgetOutput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetOutput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
virtual void setNumberOfInputs (ossim_int32 numberOfInputs)
 Will set the number of inputs. More...
 
virtual bool getInputListIsFixedFlag () const
 
virtual bool getOutputListIsFixedFlag () const
 
virtual void setNumberOfOutputs (ossim_int32 numberOfInputs)
 Will set the number of outputs. More...
 
const ConnectableObjectListgetInputList () const
 
const ConnectableObjectListgetOutputList () const
 
ConnectableObjectListgetInputList ()
 
ConnectableObjectListgetOutputList ()
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const RTTItypeid &typeInfo, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const ossimString &className, bool recurse=true))
 
virtual void propagateEventToOutputs (ossimEvent &event)
 
virtual void propagateEventToInputs (ossimEvent &event)
 
virtual void setProperty (const ossimString &name, const ossimString &value)
 
virtual ossim_uint32 saveStateOfAllInputs (ossimKeywordlist &kwl, bool saveThisStateFlag=true, ossim_uint32 objectIndex=1, const char *prefix=0) const
 Save the state of all inputs to a keyword list. More...
 
virtual bool fillContainer (ossimConnectableContainer &container)
 Inserts this object and all of its children and inputs into the container provided. More...
 
bool moveInputUp (const ossimId &id)
 Moves the input connection matching id up one in the connection list. More...
 
bool moveInputDown (const ossimId &id)
 Moves the input connection matching id down one in the connection list. More...
 
bool moveInputToTop (const ossimId &id)
 Moves the input connection matching id to the top of the connection list. More...
 
bool moveInputToBottom (const ossimId &id)
 Moves the input connection matching id to the bottom of the connection list. More...
 
virtual void accept (ossimVisitor &visitor)
 We will add a visitor interface for all connectable objects. More...
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 
- Public Member Functions inherited from ossimListenerManager
 ossimListenerManager ()
 
virtual ~ossimListenerManager ()
 
virtual void fireEvent (ossimEvent &event)
 
virtual bool addListener (ossimListener *listener)
 
virtual bool removeListener (ossimListener *listener)
 
virtual bool findListener (ossimListener *listener)
 
- Public Member Functions inherited from ossimPropertyInterface
 ossimPropertyInterface ()
 
virtual ~ossimPropertyInterface ()
 
virtual ossimString getPropertyValueAsString (const ossimString &name) const
 
void getPropertyList (std::vector< ossimRefPtr< ossimProperty > > &propertyList) const
 
void setProperties (std::vector< ossimRefPtr< ossimProperty > > &propertyList)
 
- Public Member Functions inherited from ossimErrorStatusInterface
 ossimErrorStatusInterface ()
 
virtual ~ossimErrorStatusInterface ()
 
virtual ossimErrorCode getErrorStatus () const
 
virtual ossimString getErrorStatusString () const
 
virtual void setErrorStatus (ossimErrorCode error_status) const
 
virtual void setErrorStatus () const
 
virtual void clearErrorStatus () const
 
bool hasError () const
 
- Public Member Functions inherited from ossimProcessInterface
 ossimProcessInterface ()
 
virtual ~ossimProcessInterface ()
 
virtual ossimObjectgetObject ()=0
 
virtual const ossimObjectgetObject () const =0
 
virtual void abort ()
 
bool needsAborting () const
 
bool isAbortRequested () const
 
bool isAborted () const
 
bool isExecuting () const
 
ossimProcessStatus getProcessStatus () const
 
virtual void setProcessStatus (ossimProcessStatus processStatus)
 
virtual double getPercentComplete () const
 
virtual void setPercentComplete (double percentComplete)
 
virtual ossimListenerManagergetManager ()
 
void enableEvents ()
 
void disableEvents ()
 
void setCurrentMessage (const ossimString &message)
 
virtual std::ostream & print (std::ostream &out) const
 
- Public Member Functions inherited from ossimConnectableObjectListener
 ossimConnectableObjectListener ()
 
virtual ~ossimConnectableObjectListener ()
 
virtual void processEvent (ossimEvent &event)
 ProcessEvent. More...
 
virtual void objectDestructingEvent (ossimObjectDestructingEvent &)
 
virtual void connectionEvent (ossimConnectionEvent &)
 
virtual void disconnectInputEvent (ossimConnectionEvent &)
 
virtual void disconnectOutputEvent (ossimConnectionEvent &)
 
virtual void connectInputEvent (ossimConnectionEvent &)
 
virtual void connectOutputEvent (ossimConnectionEvent &)
 
virtual void propertyEvent (ossimPropertyEvent &)
 
virtual void addObjectEvent (ossimContainerEvent &)
 
virtual void removeObjectEvent (ossimContainerEvent &)
 
virtual void containerEvent (ossimContainerEvent &)
 
virtual void refreshEvent (ossimRefreshEvent &)
 
- Public Member Functions inherited from ossimListener
 ossimListener ()
 
virtual ~ossimListener ()
 
void enableListener ()
 
void disableListener ()
 
void setListenerEnableFlag (bool flag)
 
bool isListenerEnabled () const
 
bool getListenerEnableFlag () const
 

Protected Member Functions

virtual ~ossimOverviewBuilderBase ()
 virtual destructor More...
 
ossim_uint32 getRequiredResLevels (const ossimImageHandler *ih) const
 Gets the required number of res levels. More...
 
void initializePreferenceSettings ()
 Initializes preference settings. More...
 
void initializeScanOptions ()
 Checks scalar type and turns on scanning for min, max, nulls if needed. More...
 
- Protected Member Functions inherited from ossimSource
 ossimSource (const ossimSource &rhs)
 
const ossimSourceoperator= (const ossimSource &rhs)
 
- Protected Member Functions inherited from ossimConnectableObject
ossimConnectableObjectfindObjectOfType (ConnectableObjectList *connectableList, ossimVisitor &visitor)
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Member Functions inherited from ossimListenerManager
 ossimListenerManager (const ossimListenerManager &rhs)
 

Protected Attributes

ossim_uint32 m_overviewStopDimension
 
ossimHistogramMode m_histoMode
 
ossimKeywordlist m_bitMaskSpec
 
ossimRefPtr< ossimImageHandlerm_imageHandler
 
std::vector< ossim_uint32m_originalBandList
 
ossimRefPtr< ossimBitMaskWriterm_maskWriter
 
ossimRefPtr< ossimMaskFilterm_maskFilter
 
ossimFilename m_outputFile
 
bool m_scanForMinMax
 
bool m_scanForMinMaxNull
 
bool m_scanFloatData
 
- Protected Attributes inherited from ossimSource
bool theEnableFlag
 
bool theInitializedFlag
 
- Protected Attributes inherited from ossimConnectableObject
ossimId theId
 
ossimString theDescription
 
ossimObjecttheOwner
 
bool theInputListIsFixedFlag
 Indicates whether the theInputObjectList is fixed. More...
 
bool theOutputListIsFixedFlag
 Indicates whether the theOutputObjectList is fixed. More...
 
ConnectableObjectList theInputObjectList
 Holds a list of input objects. More...
 
ConnectableObjectList theOutputObjectList
 Holds a list of output objects. More...
 
- Protected Attributes inherited from ossimListenerManager
std::list< ossimListener * > theListenerList
 
bool theEnabledFlag
 
std::list< ossimListener * > theDelayedAdd
 
std::list< ossimListener * > theDelayedRemove
 
bool theFireEventFlag
 
- Protected Attributes inherited from ossimErrorStatusInterface
ossimErrorCode theErrorStatus
 
- Protected Attributes inherited from ossimProcessInterface
double thePercentComplete
 
ossimProcessStatus theProcessStatus
 
ossimString theMessage
 
bool theEventFlag
 
- Protected Attributes inherited from ossimListener
bool theListenerEnableFlag
 

Additional Inherited Members

- Public Types inherited from ossimConnectableObject
enum  ossimConnectableObjectDirectionType { CONNECTABLE_DIRECTION_NONE = 0, CONNECTABLE_DIRECTION_INPUT = 1, CONNECTABLE_DIRECTION_OUTPUT = 2 }
 
typedef std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
 
- Public Types inherited from ossimProcessInterface
enum  ossimProcessStatus {
  PROCESS_STATUS_UNKNOWN = 0, PROCESS_STATUS_EXECUTING = 1, PROCESS_STATUS_ABORTED = 2, PROCESS_STATUS_ABORT_REQUEST = 3,
  PROCESS_STATUS_NOT_EXECUTING = 4
}
 

Detailed Description

Definition at line 30 of file ossimOverviewBuilderBase.h.

Constructor & Destructor Documentation

◆ ossimOverviewBuilderBase()

ossimOverviewBuilderBase::ossimOverviewBuilderBase ( )

default constructor

◆ ~ossimOverviewBuilderBase()

ossimOverviewBuilderBase::~ossimOverviewBuilderBase ( )
protectedvirtual

virtual destructor

Definition at line 42 of file ossimOverviewBuilderBase.cpp.

References m_imageHandler, m_maskFilter, and m_maskWriter.

43 {
44  m_imageHandler = 0;
45  m_maskWriter = 0;
46  m_maskFilter = 0;
47 }
ossimRefPtr< ossimBitMaskWriter > m_maskWriter
ossimRefPtr< ossimImageHandler > m_imageHandler
ossimRefPtr< ossimMaskFilter > m_maskFilter

Member Function Documentation

◆ execute()

virtual bool ossimOverviewBuilderBase::execute ( )
pure virtual

Builds the overviews.

(pure virtual)

Returns
true on success, false on error.

Implements ossimProcessInterface.

Implemented in ossimTiffOverviewBuilder, ossimGdalOverviewBuilder, and ossimKakaduNitfOverviewBuilder.

◆ finalize()

void ossimOverviewBuilderBase::finalize ( )
virtual

Finalize method.

Should be called at end of execute.

This implementation will reset the the output band list if the source image handler is a band selector.

Definition at line 142 of file ossimOverviewBuilderBase.cpp.

References ossimImageHandler::isBandSelector(), m_imageHandler, m_originalBandList, ossimImageHandler::setOutputBandList(), and ossimRefPtr< T >::valid().

143 {
145  {
147  }
148 }
bool valid() const
Definition: ossimRefPtr.h:75
virtual bool isBandSelector() const
Indicates whether or not the image handler can control output band selection via the setOutputBandLis...
ossimRefPtr< ossimImageHandler > m_imageHandler
std::vector< ossim_uint32 > m_originalBandList
virtual bool setOutputBandList(const std::vector< ossim_uint32 > &band_list)
If the image handler "isBandSeletor()" then the band selection of the output chip can be controlled...

◆ getHistogramMode()

ossimHistogramMode ossimOverviewBuilderBase::getHistogramMode ( ) const

Gets the histogram accumulation mode.

Returns
mode NONE, NORMAL or FAST.

Definition at line 132 of file ossimOverviewBuilderBase.cpp.

References m_histoMode.

133 {
134  return m_histoMode;
135 }

◆ getOutputFile()

virtual ossimFilename ossimOverviewBuilderBase::getOutputFile ( ) const
pure virtual

Gets the output file name.

(pure virtual)

Returns
The output file name or ossimFilename::NIL if it was not set yet and the image handle has not been initialized.
Note
This will return ossimFilename::NIL unless one of was called, setInputSource or setOutputFile.

Implemented in ossimTiffOverviewBuilder, ossimGdalOverviewBuilder, and ossimKakaduNitfOverviewBuilder.

◆ getOverviewStopDimension()

ossim_uint32 ossimOverviewBuilderBase::getOverviewStopDimension ( ) const
virtual

Get the overview stop dimension.

Returns
The overview stop dimension.

Definition at line 122 of file ossimOverviewBuilderBase.cpp.

References m_overviewStopDimension.

Referenced by ossimImageUtil::hasRequiredOverview().

123 {
125 }

◆ getOverviewType()

virtual ossimString ossimOverviewBuilderBase::getOverviewType ( ) const
pure virtual

Gets the overview type.

(pure virtual)

Returns
The overview output type as a string.

Implemented in ossimTiffOverviewBuilder, ossimGdalOverviewBuilder, and ossimKakaduNitfOverviewBuilder.

◆ getRequiredResLevels()

ossim_uint32 ossimOverviewBuilderBase::getRequiredResLevels ( const ossimImageHandler ih) const
protected

Gets the required number of res levels.

Convenience method to get the required number of reduced resolution data sets to get to the smallest dimension of the output tile size. Note that this include r0.

Parameters
ihPointer to the image handler.
Returns
number of res levels.

Definition at line 98 of file ossimOverviewBuilderBase.cpp.

References ossimImageHandler::getNumberOfLines(), ossimImageHandler::getNumberOfSamples(), and m_overviewStopDimension.

100 {
101  ossim_uint32 result = 0;
102  if (ih)
103  {
104  // Note we always have one rset
105  result = 1;
106 
107  ossim_uint32 largestImageDimension =
108  ih->getNumberOfSamples(0) >
109  ih->getNumberOfLines(0) ?
110  ih->getNumberOfSamples(0) :
111  ih->getNumberOfLines(0);
112 
113  while(largestImageDimension > m_overviewStopDimension)
114  {
115  largestImageDimension /= 2;
116  ++result;
117  }
118  }
119  return result;
120 }
virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
unsigned int ossim_uint32
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.

◆ getScanForMinMax()

bool ossimOverviewBuilderBase::getScanForMinMax ( ) const
Returns
scan for min max flag.

Definition at line 160 of file ossimOverviewBuilderBase.cpp.

References m_scanForMinMax.

161 {
162  return m_scanForMinMax;
163 }

◆ getScanForMinMaxNull()

bool ossimOverviewBuilderBase::getScanForMinMaxNull ( ) const
Returns
scan for min max flag.

Definition at line 170 of file ossimOverviewBuilderBase.cpp.

References m_scanForMinMaxNull.

171 {
172  return m_scanForMinMaxNull;
173 }

◆ getTypeNameList()

virtual void ossimOverviewBuilderBase::getTypeNameList ( std::vector< ossimString > &  typeList) const
pure virtual

Method to populate class supported types.

(pure virtual) Example: ossimTiffOverviewNearest ossimTiffOverviewBox

Parameters
typeListList of ossimStrings to add to.

Implemented in ossimTiffOverviewBuilder, ossimGdalOverviewBuilder, and ossimKakaduNitfOverviewBuilder.

Referenced by ossimOverviewBuilderFactory::getTypeNameList(), ossimGdalOverviewBuilderFactory::getTypeNameList(), ossimKakaduOverviewBuilderFactory::getTypeNameList(), and hasOverviewType().

◆ hasOverviewType()

bool ossimOverviewBuilderBase::hasOverviewType ( const ossimString type) const
virtual

Method to check if builder can handle type.

Returns
true if type is handled by builder, false if not.

Definition at line 82 of file ossimOverviewBuilderBase.cpp.

References getTypeNameList().

Referenced by ossimOverviewBuilderFactory::createBuilder(), ossimGdalOverviewBuilderFactory::createBuilder(), and ossimKakaduOverviewBuilderFactory::createBuilder().

83 {
84  std::vector<ossimString> typeList;
85  getTypeNameList(typeList);
86  std::vector<ossimString>::const_iterator i = typeList.begin();
87  while ( i != typeList.end() )
88  {
89  if ( (*i) == type )
90  {
91  return true;
92  }
93  ++i;
94  }
95  return false;
96 }
virtual void getTypeNameList(std::vector< ossimString > &typeList) const =0
Method to populate class supported types.

◆ initializePreferenceSettings()

void ossimOverviewBuilderBase::initializePreferenceSettings ( )
protected

Initializes preference settings.

Currently:

1) Gets the default stop dimension.

Looks for overview_stop_dimension, then will use minimum default tile size if that is not found.

2) Set scan float data flag.

Looks for overview_builder.scan_for_min_max_null_if_float.

If true this will turn the m_scanForMinMaxNull on if the scalar type of image handler is float.

Definition at line 175 of file ossimOverviewBuilderBase.cpp.

References ossim::defaultTileSize(), ossimPreferences::findPreference(), ossimPreferences::instance(), m_overviewStopDimension, m_scanFloatData, ossimKeywordNames::OVERVIEW_STOP_DIMENSION_KW, ossimString::toBool(), ossimString::toUInt32(), ossimIpt::x, and ossimIpt::y.

176 {
177  // Get the stop dimension from ossim preferences.
178  const char* lookup = ossimPreferences::instance()->
180  if (lookup)
181  {
183  }
184 
185  if ( m_overviewStopDimension == 0 )
186  {
187  // Use the smallest default tile size.
188  ossimIpt tileSize;
189  ossim::defaultTileSize(tileSize);
190  m_overviewStopDimension = tileSize.x < tileSize.y ? tileSize.x : tileSize.y;
191  }
192 
193  // Look for overview_builder.scan_for_min_max_null_if_float:
194  lookup = ossimPreferences::instance()->findPreference(SCAN_FLOAT_DATA_KW.c_str());
195  if ( lookup )
196  {
197  m_scanFloatData = ossimString(lookup).toBool();
198  }
199 }
OSSIM_DLL void defaultTileSize(ossimIpt &tileSize)
ossim_uint32 toUInt32() const
const char * findPreference(const char *key) const
bool toBool() const
String to numeric methods.
static ossimPreferences * instance()
ossim_int32 y
Definition: ossimIpt.h:142
ossim_int32 x
Definition: ossimIpt.h:141
static const char * OVERVIEW_STOP_DIMENSION_KW

◆ initializeScanOptions()

void ossimOverviewBuilderBase::initializeScanOptions ( )
protected

Checks scalar type and turns on scanning for min, max, nulls if needed.

Definition at line 201 of file ossimOverviewBuilderBase.cpp.

References ossimImageSource::getOutputScalarType(), m_imageHandler, m_scanFloatData, OSSIM_FLOAT32, OSSIM_FLOAT64, setScanForMinMaxNull(), and ossimRefPtr< T >::valid().

Referenced by setInputSource().

202 {
204  {
206  if ( ( scalar == OSSIM_FLOAT32 ) || ( scalar == OSSIM_FLOAT64 ) )
207  {
208  setScanForMinMaxNull(true);
209  }
210  }
211 }
64 bit floating point
bool valid() const
Definition: ossimRefPtr.h:75
32 bit floating point
void setScanForMinMaxNull(bool flag)
Turn on/off scan for min, max, null flag.
ossimScalarType
ossimRefPtr< ossimImageHandler > m_imageHandler
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.

◆ setBitMaskSpec()

void ossimOverviewBuilderBase::setBitMaskSpec ( const ossimKeywordlist bit_mask_spec)

Specifies parameters (in KWL) for generation of an alpha (bit) mask such that any full or partial null pixels will be masked out.

A mask file will be written to the source image directory with the image file name and extension ".mask".

Definition at line 150 of file ossimOverviewBuilderBase.cpp.

References m_bitMaskSpec.

151 {
152  m_bitMaskSpec = bit_mask_spec;
153 }

◆ setHistogramMode()

void ossimOverviewBuilderBase::setHistogramMode ( ossimHistogramMode  mode)

Sets the histogram accumulation mode.

Parameters
modeNONE, NORMAL or FAST.

Definition at line 137 of file ossimOverviewBuilderBase.cpp.

References m_histoMode.

138 {
139  m_histoMode = mode;
140 }

◆ setInputSource()

bool ossimOverviewBuilderBase::setInputSource ( ossimImageHandler imageSource)
virtual

Sets the input to the builder.

Parameters
imageSourceThe input to the builder.
Returns
True on successful initialization, false on error.

Reimplemented in ossimTiffOverviewBuilder, and ossimGdalOverviewBuilder.

Definition at line 54 of file ossimOverviewBuilderBase.cpp.

References ossimErrorStatusInterface::getErrorStatus(), ossimImageSource::getOutputBandList(), initializeScanOptions(), ossimImageHandler::isBandSelector(), m_imageHandler, m_originalBandList, ossimErrorCodes::OSSIM_OK, and ossimImageHandler::setOutputToInputBandList().

55 {
56  bool result = false;
57  if ( imageSource )
58  {
59  if ( imageSource->getErrorStatus() == ossimErrorCodes::OSSIM_OK )
60  {
61  m_imageHandler = imageSource;
62 
63  // Check handler to see if it's filtering bands.
65  {
66  // Capture for finalize method.
68 
69  // Set output list to input.
71  }
72 
73  // This will set the flag to scan for min, max, nulls if needed.
75 
76  result = true;
77  }
78  }
79  return result;
80 }
static const ossimErrorCode OSSIM_OK
virtual void getOutputBandList(std::vector< ossim_uint32 > &bandList) const
Initializes bandList.
virtual bool setOutputToInputBandList()
If the image handler "isBandSeletor()" then the band selection of the output are set to input or iden...
void initializeScanOptions()
Checks scalar type and turns on scanning for min, max, nulls if needed.
virtual bool isBandSelector() const
Indicates whether or not the image handler can control output band selection via the setOutputBandLis...
ossimRefPtr< ossimImageHandler > m_imageHandler
std::vector< ossim_uint32 > m_originalBandList
virtual ossimErrorCode getErrorStatus() const

◆ setOutputFile()

virtual void ossimOverviewBuilderBase::setOutputFile ( const ossimFilename file)
pure virtual

Sets the output file name.

(pure virtual) file This will be the output file name like foo.ovr

Implemented in ossimTiffOverviewBuilder, ossimGdalOverviewBuilder, and ossimKakaduNitfOverviewBuilder.

◆ setOutputWriter()

bool ossimOverviewBuilderBase::setOutputWriter ( ossimImageFileWriter outputWriter)
virtual

Sets an optional file writer to the builder.

Currently used by the virtual overview builder.

Parameters
outputWriterThe file writer of the builder.
Returns
True on successful initialization, false on error.

Definition at line 49 of file ossimOverviewBuilderBase.cpp.

50 {
51  return false;
52 }

◆ setOverviewStopDimension()

void ossimOverviewBuilderBase::setOverviewStopDimension ( ossim_uint32  dim)
virtual

Sets the overview stop dimension.

This controls how many layers will be built. If set to 64 then the builder will stop when height and width for current level are less than or equal to 64. Note a default can be set in the ossim preferences file, setting the keyword "overview_stop_dimension".

Parameters
dimThe overview stop dimension

Definition at line 127 of file ossimOverviewBuilderBase.cpp.

References m_overviewStopDimension.

128 {
130 }

◆ setOverviewType()

virtual bool ossimOverviewBuilderBase::setOverviewType ( const ossimString type)
pure virtual

Sets the overview output type.

(pure virtual)

Parameters
typeThis should be the string representing the type. This method will do nothing if type is not handled and return false.
Returns
true if type is handled, false if not.
Note
Currently handled types are

Implemented in ossimTiffOverviewBuilder, ossimGdalOverviewBuilder, and ossimKakaduNitfOverviewBuilder.

Referenced by ossimOverviewBuilderFactory::createBuilder(), and ossimGdalOverviewBuilderFactory::createBuilder().

◆ setScanForMinMax()

void ossimOverviewBuilderBase::setScanForMinMax ( bool  flag)

Turn on/off scan for min max flag.

This method assumes the null is known.

Parameters
flagtrue turns scan on, false off. Default=off.

Definition at line 155 of file ossimOverviewBuilderBase.cpp.

References m_scanForMinMax.

156 {
157  m_scanForMinMax = flag;
158 }

◆ setScanForMinMaxNull()

void ossimOverviewBuilderBase::setScanForMinMaxNull ( bool  flag)

Turn on/off scan for min, max, null flag.

Attempts to find null, min and max where null is the minimum value found, min is the second most min and max is max.

Parameters
flagtrue turns scan on, false off. Default=off.

Definition at line 165 of file ossimOverviewBuilderBase.cpp.

References m_scanForMinMaxNull.

Referenced by initializeScanOptions().

166 {
167  m_scanForMinMaxNull = flag;
168 }

Member Data Documentation

◆ m_bitMaskSpec

ossimKeywordlist ossimOverviewBuilderBase::m_bitMaskSpec
protected

Definition at line 226 of file ossimOverviewBuilderBase.h.

Referenced by setBitMaskSpec().

◆ m_histoMode

ossimHistogramMode ossimOverviewBuilderBase::m_histoMode
protected

Definition at line 225 of file ossimOverviewBuilderBase.h.

Referenced by getHistogramMode(), and setHistogramMode().

◆ m_imageHandler

ossimRefPtr<ossimImageHandler> ossimOverviewBuilderBase::m_imageHandler
protected

◆ m_maskFilter

ossimRefPtr<ossimMaskFilter> ossimOverviewBuilderBase::m_maskFilter
protected

Definition at line 230 of file ossimOverviewBuilderBase.h.

Referenced by ~ossimOverviewBuilderBase().

◆ m_maskWriter

ossimRefPtr<ossimBitMaskWriter> ossimOverviewBuilderBase::m_maskWriter
protected

Definition at line 229 of file ossimOverviewBuilderBase.h.

Referenced by ~ossimOverviewBuilderBase().

◆ m_originalBandList

std::vector<ossim_uint32> ossimOverviewBuilderBase::m_originalBandList
protected

Definition at line 228 of file ossimOverviewBuilderBase.h.

Referenced by finalize(), and setInputSource().

◆ m_outputFile

ossimFilename ossimOverviewBuilderBase::m_outputFile
protected

Definition at line 231 of file ossimOverviewBuilderBase.h.

◆ m_overviewStopDimension

ossim_uint32 ossimOverviewBuilderBase::m_overviewStopDimension
protected

◆ m_scanFloatData

bool ossimOverviewBuilderBase::m_scanFloatData
protected

◆ m_scanForMinMax

bool ossimOverviewBuilderBase::m_scanForMinMax
protected

Definition at line 232 of file ossimOverviewBuilderBase.h.

Referenced by getScanForMinMax(), and setScanForMinMax().

◆ m_scanForMinMaxNull

bool ossimOverviewBuilderBase::m_scanForMinMaxNull
protected

Definition at line 233 of file ossimOverviewBuilderBase.h.

Referenced by getScanForMinMaxNull(), and setScanForMinMaxNull().


The documentation for this class was generated from the following files: