OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ossimTiffOverviewBuilder Class Reference

#include <ossimTiffOverviewBuilder.h>

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

Public Types

enum  { DEFAULT_COMPRESS_QUALITY =75 }
 
- 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
}
 

Public Member Functions

 ossimTiffOverviewBuilder ()
 default constructor More...
 
virtual ~ossimTiffOverviewBuilder ()
 virtual destructor More...
 
void setResampleType (ossimFilterResampler::ossimFilterResamplerType resampleType)
 Supports BOX or NEAREST NEIGHBOR. More...
 
bool buildOverview (const ossimFilename &overview_file, bool copy_all=false)
 Builds overview file and sets "theOutputFile" to that of the overview_file. More...
 
virtual bool execute ()
 Calls buildOverview. More...
 
void setCompressionType (ossim_uint16 compression_type)
 Sets the compression type to use when building overviews. More...
 
void setJpegCompressionQuality (ossim_int32 quality)
 Sets the compression quality for use when using a compression type of COMPRESSION_JPEG. More...
 
bool getCopyAllFlag () const
 Method to return copy all flag. More...
 
void setInternalOverviewsFlag (bool flag)
 Sets internal overviews flag. More...
 
bool getInternalOverviewsFlag () const
 
void setCopyAllFlag (bool flag)
 Sets theCopyAllFlag. More...
 
virtual ossimObjectgetObject ()
 
virtual const ossimObjectgetObject () const
 
virtual bool canConnectMyInputTo (ossim_int32 index, const ossimConnectableObject *obj) const
 
virtual bool setInputSource (ossimImageHandler *imageSource)
 Sets the input to the builder. More...
 
virtual void setOutputFile (const ossimFilename &file)
 Sets the output filename. More...
 
virtual ossimFilename getOutputFile () const
 Gets the output file name. More...
 
void setOutputTileSize (const ossimIpt &tileSize)
 
virtual bool setOverviewType (const ossimString &type)
 Sets the overview output type. More...
 
virtual ossimString getOverviewType () const
 Gets the overview type. More...
 
virtual void getTypeNameList (std::vector< ossimString > &typeList) const
 Method to populate class supported types. More...
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 Method to set properties. More...
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 Method to populate the list of property names. More...
 
- Public Member Functions inherited from ossimOverviewBuilderBase
 ossimOverviewBuilderBase ()
 default constructor More...
 
virtual bool setOutputWriter (ossimImageFileWriter *outputWriter)
 Sets an optional file writer to the builder. More...
 
virtual bool hasOverviewType (const ossimString &type) const
 Method to check if builder can handle type. 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 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 ossimRefPtr< ossimPropertygetProperty (const ossimString &name) 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 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 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
 

Private Member Functions

bool writeR0 (TIFF *tif)
 Copy the full resolution image data to the output tif image. More...
 
bool writeRn (ossimImageHandler *imageHandler, TIFF *tif, ossim_uint32 resLevel, bool firstResLevel)
 Write reduced resolution data set to the tif file. More...
 
bool setTags (TIFF *tif, const ossimIrect &outputRect, ossim_int32 resLevel) const
 Set the tiff tags for the appropriate resLevel. More...
 
bool setGeotiffTags (const ossimImageGeometry *geom, const ossimDrect &boundingRect, ossim_uint32 resLevel, TIFF *tif)
 Writes geotiff tags. More...
 
TIFFopenTiff (const ossimString &filename) const
 
void closeTiff (TIFF *tif)
 
bool buildInternalOverviews () const
 
bool copyR0 () const
 
 ossimTiffOverviewBuilder (const ossimTiffOverviewBuilder &source)
 
ossimTiffOverviewBuilderoperator= (const ossimTiffOverviewBuilder &rhs)
 

Private Attributes

std::vector< ossim_uint8m_nullDataBuffer
 
ossim_int32 m_bytesPerPixel
 
ossim_int32 m_bitsPerSample
 
ossim_int32 m_tileWidth
 
ossim_int32 m_tileHeight
 
ossim_int32 m_tileSizeInBytes
 
ossim_int32 m_sampleFormat
 
ossim_int32 m_currentTiffDir
 
ossim_uint16 m_tiffCompressType
 
ossim_int32 m_jpegCompressQuality
 
ossimFilterResampler::ossimFilterResamplerType m_resampleType
 
std::vector< double > m_nullPixelValues
 
bool m_copyAllFlag
 
ossimString m_tempExtension
 
bool m_outputTileSizeSetFlag
 
bool m_internalOverviewsFlag
 

Additional Inherited Members

- Protected Member Functions inherited from ossimOverviewBuilderBase
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 inherited from ossimOverviewBuilderBase
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
 

Detailed Description

Definition at line 33 of file ossimTiffOverviewBuilder.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DEFAULT_COMPRESS_QUALITY 

Definition at line 39 of file ossimTiffOverviewBuilder.h.

Constructor & Destructor Documentation

◆ ossimTiffOverviewBuilder() [1/2]

ossimTiffOverviewBuilder::ossimTiffOverviewBuilder ( )

default constructor

◆ ~ossimTiffOverviewBuilder()

virtual ossimTiffOverviewBuilder::~ossimTiffOverviewBuilder ( )
virtual

virtual destructor

◆ ossimTiffOverviewBuilder() [2/2]

ossimTiffOverviewBuilder::ossimTiffOverviewBuilder ( const ossimTiffOverviewBuilder source)
private

Member Function Documentation

◆ buildInternalOverviews()

bool ossimTiffOverviewBuilder::buildInternalOverviews ( ) const
private
Returns
true if m_internalOverviewsFlag and input image supports building internal overviews. Currently only tiff reader.

◆ buildOverview()

bool ossimTiffOverviewBuilder::buildOverview ( const ossimFilename overview_file,
bool  copy_all = false 
)

Builds overview file and sets "theOutputFile" to that of the overview_file.

Parameters
overview_fileThe overview file name to output.
copy_allIf set to true the entire image will be copied. This can be used to convert an image to a tiled tif.
Returns
trueon success, false on error.

Referenced by ossimImageHandler::buildOverview().

◆ canConnectMyInputTo()

virtual bool ossimTiffOverviewBuilder::canConnectMyInputTo ( ossim_int32  index,
const ossimConnectableObject obj 
) const
virtual
Returns
true if input is an image handler.

Implements ossimConnectableObject.

◆ closeTiff()

void ossimTiffOverviewBuilder::closeTiff ( TIFF tif)
private

◆ copyR0()

bool ossimTiffOverviewBuilder::copyR0 ( ) const
private
Returns
true if m_copyAllFlag is set and build internal overviews is not set.

◆ execute()

virtual bool ossimTiffOverviewBuilder::execute ( )
virtual

Calls buildOverview.

This method uses "theOutputFile" for the file name.

If the copy_all flag is set the entire image will be copied. This can be used to convert an image to a tiled tif.

Returns
true on success, false on error.
Note
If setOutputFile was not called the output name will be derived from the image name. If image was "foo.tif" the overview file will be "foo.ovr".

Implements ossimOverviewBuilderBase.

Referenced by ossimImageFileWriter::writeOverviewFile().

◆ getCopyAllFlag()

bool ossimTiffOverviewBuilder::getCopyAllFlag ( ) const

Method to return copy all flag.

Returns
The copy all flag. If true all data will be written to the overview including R0.

◆ getInternalOverviewsFlag()

bool ossimTiffOverviewBuilder::getInternalOverviewsFlag ( ) const
Returns
The intenal overview flag.

◆ getObject() [1/2]

virtual ossimObject* ossimTiffOverviewBuilder::getObject ( )
virtual
Returns
ossimObject* to this object.

Implements ossimProcessInterface.

◆ getObject() [2/2]

virtual const ossimObject* ossimTiffOverviewBuilder::getObject ( ) const
virtual
Returns
const ossimObject* to this object.

Implements ossimProcessInterface.

◆ getOutputFile()

virtual ossimFilename ossimTiffOverviewBuilder::getOutputFile ( ) const
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 is non-const as a call to this may force initialization of overview builder output file name if the it was not set already.
This will return ossimFilename::NIL unless one of was called, setInputSource or setOutputFile.

Implements ossimOverviewBuilderBase.

◆ getOverviewType()

virtual ossimString ossimTiffOverviewBuilder::getOverviewType ( ) const
virtual

Gets the overview type.

Satisfies pure virtual from ossimOverviewBuilderBase.

Returns
The overview output type as a string.

Implements ossimOverviewBuilderBase.

◆ getPropertyNames()

virtual void ossimTiffOverviewBuilder::getPropertyNames ( std::vector< ossimString > &  propertyNames) const
virtual

Method to populate the list of property names.

Parameters
propertyNamesList to populate. This does not clear the list just adds to it.

Reimplemented from ossimSource.

◆ getTypeNameList()

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

Method to populate class supported types.

Satisfies pure virtual from ossimOverviewBuilderBase.

Parameters
typeListList of ossimStrings to add to.

Implements ossimOverviewBuilderBase.

◆ openTiff()

TIFF* ossimTiffOverviewBuilder::openTiff ( const ossimString filename) const
private

◆ operator=()

ossimTiffOverviewBuilder& ossimTiffOverviewBuilder::operator= ( const ossimTiffOverviewBuilder rhs)
private

◆ setCompressionType()

void ossimTiffOverviewBuilder::setCompressionType ( ossim_uint16  compression_type)

Sets the compression type to use when building overviews.

Parameters
compression_typeCurrent supported types:
  • COMPRESSION_JPEG
  • COMPRESSION_LZW
  • COMPRESSION_DEFLATE
  • COMPRESSION_PACKBITS
  • COMPRESSION_NONE (default)

Referenced by ossimImageHandler::buildOverview(), and ossimImageFileWriter::writeOverviewFile().

◆ setCopyAllFlag()

void ossimTiffOverviewBuilder::setCopyAllFlag ( bool  flag)

Sets theCopyAllFlag.

Parameters
flagThe flag. If true all data will be written to the overview including R0.

Referenced by ossimImageFileWriter::writeOverviewFile().

◆ setGeotiffTags()

bool ossimTiffOverviewBuilder::setGeotiffTags ( const ossimImageGeometry geom,
const ossimDrect boundingRect,
ossim_uint32  resLevel,
TIFF tif 
)
private

Writes geotiff tags.

Parameters
geom
boundingRect
resLevelZero base, 0 being full res.
tif
Returns
true on success, false on error.

◆ setInputSource()

virtual bool ossimTiffOverviewBuilder::setInputSource ( ossimImageHandler imageSource)
virtual

Sets the input to the builder.

Satisfies pure virtual from ossimOverviewBuilderBase.

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

Reimplemented from ossimOverviewBuilderBase.

Referenced by ossimImageHandler::buildOverview(), and ossimImageFileWriter::writeOverviewFile().

◆ setInternalOverviewsFlag()

void ossimTiffOverviewBuilder::setInternalOverviewsFlag ( bool  flag)

Sets internal overviews flag.

Parameters
flagIf true, and input source is tiff format, overviews will be built internally.

◆ setJpegCompressionQuality()

void ossimTiffOverviewBuilder::setJpegCompressionQuality ( ossim_int32  quality)

Sets the compression quality for use when using a compression type of COMPRESSION_JPEG.

Parameters
qualityRange 1 to 100 with 100 being best quality.

Referenced by ossimImageHandler::buildOverview(), and ossimImageFileWriter::writeOverviewFile().

◆ setOutputFile()

virtual void ossimTiffOverviewBuilder::setOutputFile ( const ossimFilename file)
virtual

Sets the output filename.

Satisfies pure virtual from ossimOverviewBuilderBase.

Parameters
fileThe output file name.

Implements ossimOverviewBuilderBase.

Referenced by ossimImageFileWriter::writeOverviewFile().

◆ setOutputTileSize()

void ossimTiffOverviewBuilder::setOutputTileSize ( const ossimIpt tileSize)

◆ setOverviewType()

virtual bool ossimTiffOverviewBuilder::setOverviewType ( const ossimString type)
virtual

Sets the overview output type.

Satisfies pure virtual from ossimOverviewBuilderBase.

Currently handled types are: "ossim_tiff_nearest" and "ossim_tiff_box"

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.

Implements ossimOverviewBuilderBase.

◆ setProperty()

virtual void ossimTiffOverviewBuilder::setProperty ( ossimRefPtr< ossimProperty property)
virtual

Method to set properties.

Parameters
propertyProperty to set.
Note
Currently supported property: name=levels, value should be list of levels separated by a comma with no spaces. Example: "2,4,8,16,32,64"

Reimplemented from ossimSource.

◆ setResampleType()

void ossimTiffOverviewBuilder::setResampleType ( ossimFilterResampler::ossimFilterResamplerType  resampleType)

Supports BOX or NEAREST NEIGHBOR.

When indexed you should probably use nearest neighbor

Referenced by ossimImageHandler::buildOverview().

◆ setTags()

bool ossimTiffOverviewBuilder::setTags ( TIFF tif,
const ossimIrect outputRect,
ossim_int32  resLevel 
) const
private

Set the tiff tags for the appropriate resLevel.

Level zero is the full resolution image.

Parameters
tifPointer to the tif file.
outputRectThe dimensions (zero based) of res set.
rrds_levelThe current reduced res level.

◆ writeR0()

bool ossimTiffOverviewBuilder::writeR0 ( TIFF tif)
private

Copy the full resolution image data to the output tif image.

◆ writeRn()

bool ossimTiffOverviewBuilder::writeRn ( ossimImageHandler imageHandler,
TIFF tif,
ossim_uint32  resLevel,
bool  firstResLevel 
)
private

Write reduced resolution data set to the tif file.

Parameters
firstRestLevelused to tell method that if a histogram is needed, do it on that res level.

Member Data Documentation

◆ m_bitsPerSample

ossim_int32 ossimTiffOverviewBuilder::m_bitsPerSample
private

Definition at line 286 of file ossimTiffOverviewBuilder.h.

◆ m_bytesPerPixel

ossim_int32 ossimTiffOverviewBuilder::m_bytesPerPixel
private

Definition at line 285 of file ossimTiffOverviewBuilder.h.

◆ m_copyAllFlag

bool ossimTiffOverviewBuilder::m_copyAllFlag
private

Definition at line 296 of file ossimTiffOverviewBuilder.h.

◆ m_currentTiffDir

ossim_int32 ossimTiffOverviewBuilder::m_currentTiffDir
private

Definition at line 291 of file ossimTiffOverviewBuilder.h.

◆ m_internalOverviewsFlag

bool ossimTiffOverviewBuilder::m_internalOverviewsFlag
private

Definition at line 299 of file ossimTiffOverviewBuilder.h.

◆ m_jpegCompressQuality

ossim_int32 ossimTiffOverviewBuilder::m_jpegCompressQuality
private

Definition at line 293 of file ossimTiffOverviewBuilder.h.

◆ m_nullDataBuffer

std::vector<ossim_uint8> ossimTiffOverviewBuilder::m_nullDataBuffer
private

Definition at line 284 of file ossimTiffOverviewBuilder.h.

◆ m_nullPixelValues

std::vector<double> ossimTiffOverviewBuilder::m_nullPixelValues
private

Definition at line 295 of file ossimTiffOverviewBuilder.h.

◆ m_outputTileSizeSetFlag

bool ossimTiffOverviewBuilder::m_outputTileSizeSetFlag
private

Definition at line 298 of file ossimTiffOverviewBuilder.h.

◆ m_resampleType

ossimFilterResampler::ossimFilterResamplerType ossimTiffOverviewBuilder::m_resampleType
private

Definition at line 294 of file ossimTiffOverviewBuilder.h.

◆ m_sampleFormat

ossim_int32 ossimTiffOverviewBuilder::m_sampleFormat
private

Definition at line 290 of file ossimTiffOverviewBuilder.h.

◆ m_tempExtension

ossimString ossimTiffOverviewBuilder::m_tempExtension
private

Definition at line 297 of file ossimTiffOverviewBuilder.h.

◆ m_tiffCompressType

ossim_uint16 ossimTiffOverviewBuilder::m_tiffCompressType
private

Definition at line 292 of file ossimTiffOverviewBuilder.h.

◆ m_tileHeight

ossim_int32 ossimTiffOverviewBuilder::m_tileHeight
private

Definition at line 288 of file ossimTiffOverviewBuilder.h.

◆ m_tileSizeInBytes

ossim_int32 ossimTiffOverviewBuilder::m_tileSizeInBytes
private

Definition at line 289 of file ossimTiffOverviewBuilder.h.

◆ m_tileWidth

ossim_int32 ossimTiffOverviewBuilder::m_tileWidth
private

Definition at line 287 of file ossimTiffOverviewBuilder.h.


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