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

#include <ossimTerraSarTiffReader.h>

Inheritance diagram for ossimplugins::ossimTerraSarTiffReader:
ossimTiffTileSource ossimImageHandler ossimImageSource ossimSource ossimConnectableObject ossimErrorStatusInterface ossimObject ossimListenerManager ossimPropertyInterface ossimReferenced

Public Member Functions

 ossimTerraSarTiffReader ()
 default constructor More...
 
virtual ~ossimTerraSarTiffReader ()
 virtual destructor More...
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getClassName () const
 
virtual bool open (const ossimFilename &file)
 This open take the product xml file. More...
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 Method to save the state of an object to a keyword list. More...
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 Method to the load (recreate) the state of an object from a keyword list. More...
 
virtual void close ()
 Close method. More...
 
virtual ossimRefPtr< ossimImageGeometrygetImageGeometry ()
 Returns the image geometry object associated with this tile source or NULL if non defined. More...
 
virtual ossimRefPtr< ossimImageGeometrygetInternalImageGeometry () const
 
- Public Member Functions inherited from ossimTiffTileSource
 ossimTiffTileSource ()
 
bool open (std::shared_ptr< ossim::istream > &str, const std::string &connectionString)
 This open takes a stream and stores/captures the shared pointer on success. More...
 
virtual ossimRefPtr< ossimImageDatagetTile (const ossimIrect &rect, ossim_uint32 resLevel=0)
 Returns a pointer to a tile given an origin representing the upper left corner of the tile to grab from the image. More...
 
virtual bool getTile (ossimImageData *result, ossim_uint32 resLevel=0)
 Method to get a tile. More...
 
virtual ossim_uint32 getNumberOfInputBands () const
 Returns the number of bands in the image. More...
 
virtual ossim_uint32 getNumberOfOutputBands () const
 Returns the number of bands in a tile returned from this TileSource. More...
 
virtual bool isBandSelector () const
 Indicates whether or not the image handler can control output band selection via the setOutputBandList method. More...
 
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. More...
 
virtual void getOutputBandList (std::vector< ossim_uint32 > &bandList) const
 Initializes bandList to the zero based order of output bands. More...
 
virtual ossim_uint32 getNumberOfLines (ossim_uint32 resLevel=0) const
 Returns the number of lines in the image. More...
 
virtual ossim_uint32 getNumberOfSamples (ossim_uint32 resLevel=0) const
 Returns the number of samples in the image. More...
 
virtual ossim_uint32 getNumberOfDirectories () const
 Returns the number of image file directories in the tiff image. More...
 
virtual ossim_uint32 getNumberOfDecimationLevels () const
 Returns the number of reduced resolution data sets (rrds). More...
 
virtual bool isOpen () const
 Derived classes must implement this method to be concrete. More...
 
virtual ossimScalarType getOutputScalarType () const
 Returns the output pixel type of the tile source. More...
 
virtual ossim_uint32 getTileWidth () const
 Returns the width of the output tile. More...
 
virtual ossim_uint32 getTileHeight () const
 Returns the height of the output tile. More...
 
bool hasR0 () const
 Returns true if the first directory of the tiff image did not have the reduced resolution file type set. More...
 
virtual ossim_float64 getMinPixelValue (ossim_uint32 band=0) const
 Retuns the min pixel value. More...
 
virtual ossim_float64 getMaxPixelValue (ossim_uint32 band=0) const
 Returns the max pixel of the band. More...
 
virtual ossim_float64 getNullPixelValue (ossim_uint32 band=0) const
 Each band has a null pixel associated with it. More...
 
virtual bool isValidRLevel (ossim_uint32 resLevel) const
 Determines if the passed in reslution level is valid. More...
 
virtual ossim_uint32 getImageTileWidth () const
 
virtual ossim_uint32 getImageTileHeight () const
 
void setApplyColorPaletteFlag (bool flag)
 
bool getApplyColorPaletteFlag () const
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
bool isColorMapped () const
 
virtual std::ostream & print (std::ostream &os) const
 Outputs theErrorStatus as an ossimErrorCode and an ossimString. More...
 
TIFFtiffPtr ()
 
- Public Member Functions inherited from ossimImageHandler
 ossimImageHandler ()
 Constructor (default): More...
 
virtual ~ossimImageHandler ()
 Destructor: Derived classes should implement. More...
 
virtual void initialize ()
 initialize Does nothing in this class. More...
 
virtual bool openOverview ()
 Searches for an overview. More...
 
virtual bool openOverview (const ossimFilename &overview_file)
 Calls closeOverview(), then attempts to open the overview_file. More...
 
virtual void closeOverview ()
 If theOverview is initialized it will be deleted and set to NULL. More...
 
virtual const ossimImageHandlergetOverview () const
 
virtual bool hasOverviews () const
 
virtual ossimFilename createDefaultOverviewFilename () const
 
virtual ossimFilename createDefaultGeometryFilename () const
 
virtual ossimFilename createDefaultMetadataFilename () const
 
virtual ossimFilename createDefaultHistogramFilename () const
 
virtual ossimFilename createDefaultValidVerticesFilename () const
 
virtual bool writeValidImageVertices (const std::vector< ossimIpt > &vertices, const ossimFilename &file=ossimFilename(""))
 Outputs vertices to file and updates the internal vertex array variable "theValidImageVertices". More...
 
virtual bool openValidVertices (const ossimFilename &vertices_file)
 Opens the valid image vertices file and sets theValidImageVerticesFile variable. More...
 
virtual bool openValidVertices ()
 Creates vertices file name based on image, then tries to open. More...
 
virtual bool open (const ossimFilename &imageFile, ossim_uint32 entryIndex)
 Opens the image file. More...
 
virtual bool open (std::shared_ptr< ossim::ImageHandlerState > state)
 
virtual bool buildHistogram (int numberOfRLevels=0, ossimHistogramMode mode=OSSIM_HISTO_MODE_NORMAL)
 Build a histogram for image file. More...
 
virtual bool buildAllHistograms (int numberOfRLevels=0, ossimHistogramMode mode=OSSIM_HISTO_MODE_NORMAL)
 Build a histograms for all image entries. More...
 
virtual bool buildOverview (ossimImageHandlerOverviewCompressionType compressionType=OSSIM_OVERVIEW_COMPRESSION_NONE, ossim_uint32 quality=75, ossimFilterResampler::ossimFilterResamplerType resampleType=ossimFilterResampler::ossimFilterResampler_BOX, bool includeFullResFlag=false)
 Will build over file for theImageFile. More...
 
virtual bool buildAllOverviews (ossimImageHandlerOverviewCompressionType compressionType=OSSIM_OVERVIEW_COMPRESSION_NONE, ossim_uint32 quality=75, ossimFilterResampler::ossimFilterResamplerType resampleType=ossimFilterResampler::ossimFilterResampler_BOX, bool includeFullResFlag=false)
 Will build over file for all image entries. More...
 
virtual bool buildOverview (const ossimFilename &filename, ossimImageHandlerOverviewCompressionType compressionType=OSSIM_OVERVIEW_COMPRESSION_NONE, ossim_uint32 quality=75, ossimFilterResampler::ossimFilterResamplerType resampleType=ossimFilterResampler::ossimFilterResampler_BOX, bool includeFullResFlag=false)
 Will build an over file for filename. More...
 
ossimRefPtr< ossimMultiResLevelHistogramgetImageHistogram () const
 Fetches the current entry image's histogram. More...
 
virtual void setImageGeometry (ossimImageGeometry *geom)
 Sets the image geometry object. More...
 
virtual void saveImageGeometry () const
 Saves the image geometry to a file that will be made based on the image file name. More...
 
virtual void saveImageGeometry (const ossimFilename &geometry_file) const
 Saves the image geometry to a file that will be made based on the image file name. More...
 
virtual ossimIrect getImageRectangle (ossim_uint32 resLevel=0) const
 Returns zero-based bounding rectangle of the image. More...
 
virtual ossimIrect getBoundingRect (ossim_uint32 resLevel=0) const
 Returns zero-based bounding rectangle of the image. More...
 
virtual void getDecimationFactor (ossim_uint32 resLevel, ossimDpt &result) const
 
virtual void getDecimationFactors (vector< ossimDpt > &decimations) const
 This returns all decimation for all levels. More...
 
virtual ossim_uint32 getNumberOfReducedResSets () const
 This method is obsolete. More...
 
virtual void setFilename (const ossimFilename &filename)
 Sets the filename. More...
 
virtual const ossimFilenamegetFilename () const
 Returns the filename. More...
 
bool canConnectMyInputTo (ossim_int32 inputIndex, const ossimConnectableObject *object) const
 Connection rule. More...
 
virtual void getValidImageVertices (vector< ossimIpt > &validVertices, ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER, ossim_uint32 resLevel=0) const
 ordering specifies how the vertices should be arranged. More...
 
virtual bool setOutputToInputBandList ()
 If the image handler "isBandSeletor()" then the band selection of the output are set to input or identity. More...
 
virtual bool isIdentityBandList (const std::vector< ossim_uint32 > &bandList) const
 Convenience method to see if band list is identity. More...
 
virtual bool isImageTiled () const
 Indicates whether or not the image is tiled internally. More...
 
virtual bool hasMetaData () const
 
virtual ossimRefPtr< ossimNBandLutDataObjectgetLut () const
 
virtual bool hasLut () const
 
virtual void loadMetaData ()
 There is an external file with an omd extension. More...
 
virtual void setMinPixelValue (ossim_uint32 band, const ossim_float64 &pix)
 convenience method to set min pixel value. More...
 
virtual void setMaxPixelValue (ossim_uint32 band, const ossim_float64 &pix)
 convenience method to set max pixel value. More...
 
virtual void setNullPixelValue (ossim_uint32 band, const ossim_float64 &pix)
 convenience method to set null pixel value. More...
 
virtual ossim_uint32 getCurrentEntry () const
 
virtual ossim_uint32 getNumberOfEntries () const
 
virtual void getEntryName (ossim_uint32 entryIdx, std::string &name) const
 Get the name of entry as a string. More...
 
virtual void getEntryList (std::vector< ossim_uint32 > &entryList) const
 
virtual void getEntryNames (std::vector< ossimString > &entryNames) const
 
bool useEntryIndex () const
 Convenience method to determine if entry index should be used for support files, e.g. More...
 
ossimFilename getOverviewFile () const
 
virtual bool setCurrentEntry (ossim_uint32 entryIdx)
 
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. More...
 
void getFilenameWithThisExt (const ossimString &ext, ossimFilename &f) const
 Returns the image file with extension set using supplentary directory for dirname if set. More...
 
ossim_uint32 getStartingResLevel () const
 
void setStartingResLevel (ossim_uint32 level)
 
bool getOpenOverviewFlag () const
 
void setOpenOverviewFlag (bool flag)
 Sets theOpenOverviewFlag. More...
 
virtual void setSupplementaryDirectory (const ossimFilename &dir)
 Sets the supplementary directory. More...
 
virtual const ossimFilenamegetSupplementaryDirectory () const
 Returns the supplementary directory. More...
 
const ossimStringgetImageID () const
 Fetches the image ID. More...
 
void setImageID (const ossimString &id)
 Sets the image ID in case it is externally generated. More...
 
ossimPixelType getPixelType () const
 Returns the raster pixel alignment type. More...
 
virtual bool getRgbBandList (std::vector< ossim_uint32 > &bandList) const
 Convenience method to get the zero based rgb output band list. More...
 
template<class T >
std::shared_ptr< T > getStateAs ()
 
template<class T >
std::shared_ptr< const T > getStateAs () const
 
std::shared_ptr< ossim::ImageHandlerState > getState ()
 
std::shared_ptr< const ossim::ImageHandlerState > getState () const
 
void setState (std::shared_ptr< ossim::ImageHandlerState > state)
 
- Public Member Functions inherited from ossimImageSource
 ossimImageSource (ossimObject *owner=0)
 
 ossimImageSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimImageSource ()
 
virtual ossimRefPtr< ossimImageDatagetTile (const ossimIpt &origin, ossim_uint32 resLevel=0)
 
virtual ossimObjectgetObject ()
 For RTTI support. More...
 
virtual const ossimObjectgetObject () const
 For RTTI support. More...
 
virtual void getDecimationFactors (std::vector< ossimDpt > &decimations) const
 Will return an array of all decimations for each resolution level. More...
 
virtual void getBoundingRect (ossimIrect &rect, ossim_uint32 resLevel=0) const
 Gets the bounding rectangle of the source. More...
 
virtual void getValidImageVertices (std::vector< ossimIpt > &validVertices, ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER, ossim_uint32 resLevel=0) const
 ordering specifies how the vertices should be arranged. More...
 
virtual void setImageGeometry (const ossimImageGeometry *geom)
 Default implementation sets geometry of the first input to the geometry specified. More...
 
virtual bool isIndexedData () 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)
 
- 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 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
 

Private Member Functions

bool isTerraSarProductFile (const ossimFilename &file) const
 Method to check file to see if it's a TerraSAR-X product xml file. More...
 
bool isTerraSarProductFile (const ossimXmlDocument *xdoc) const
 Method to check file to see if it's a TerraSAR-X product xml file. More...
 

Private Attributes

ossimFilename theProductXmlFile
 

Additional Inherited Members

- Public Types inherited from ossimTiffTileSource
enum  ReadMethod {
  UNKNOWN, READ_RGBA_U8_TILE, READ_RGBA_U8_STRIP, READ_RGBA_U8A_STRIP,
  READ_SCAN_LINE, READ_TILE, READ_U16_STRIP
}
 
- Public Types inherited from ossimImageHandler
enum  ossimImageHandlerOverviewCompressionType {
  OSSIM_OVERVIEW_COMPRESSION_NONE = 0, OSSIM_OVERVIEW_COMPRESSION_JPEG, OSSIM_OVERVIEW_COMPRESSION_LZW, OSSIM_OVERVIEW_COMPRESSION_DEFLATE,
  OSSIM_OVERVIEW_COMPRESSION_PACKBITS
}
 
- 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
 
- Protected Member Functions inherited from ossimTiffTileSource
virtual ~ossimTiffTileSource ()
 
bool open ()
 Returns true if no errors initializing object. More...
 
- Protected Member Functions inherited from ossimImageHandler
virtual ossimRefPtr< ossimImageGeometrygetExternalImageGeometry () const
 Returns the image geometry object associated with this tile source or NULL if non defined. More...
 
virtual bool getOverviewTile (ossim_uint32 resLevel, ossimImageData *result)
 Method to get an overview tile. More...
 
bool initVertices (const char *file)
 Opens file and attempts to initialize the valid image vertices. More...
 
virtual void completeOpen ()
 Will complete the opening process. More...
 
void initImageParameters (ossimImageGeometry *geom) const
 Convenience method to set things needed in the image geometry from the image handler. More...
 
virtual void establishDecimationFactors ()
 Virtual method determines the decimation factors at each resolution level. More...
 
virtual bool setOutputBandList (const std::vector< ossim_uint32 > &inBandList, std::vector< ossim_uint32 > &outBandList)
 Convenience method to set output band list. More...
 
void getFilenameWithNoExtension (ossimFilename &f) const
 Get filename with no extension, using supplentary directory for dirname if set. More...
 
- Protected Member Functions inherited from ossimImageSource
 ossimImageSource (const ossimImageSource &rhs)
 
const ossimImageSourceoperator= (const ossimImageSource &)
 
- 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 ossimTiffTileSource
TIFFtheTiffPtr
 
- Protected Attributes inherited from ossimImageHandler
ossimFilename theImageFile
 
ossimFilename theOverviewFile
 
ossimFilename theSupplementaryDirectory
 
ossimRefPtr< ossimImageHandlertheOverview
 
vector< ossimIpttheValidImageVertices
 
ossimImageMetaData theMetaData
 
ossimRefPtr< ossimImageGeometrytheGeometry
 
ossimRefPtr< ossimNBandLutDataObjecttheLut
 
std::vector< ossimDpttheDecimationFactors
 
ossimString theImageID
 
ossim_uint32 theStartingResLevel
 theStartingResLevel If set to something other than zero(default) this is indicative that the reader is an overview. More...
 
bool theOpenOverviewFlag
 If true opening of overviews will be attempted. More...
 
ossimPixelType thePixelType
 
std::shared_ptr< ossim::ImageHandlerState > m_state
 
- 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
 

Detailed Description

Definition at line 24 of file ossimTerraSarTiffReader.h.

Constructor & Destructor Documentation

◆ ossimTerraSarTiffReader()

ossimplugins::ossimTerraSarTiffReader::ossimTerraSarTiffReader ( )

default constructor

Definition at line 43 of file ossimTerraSarTiffReader.cpp.

References ossimNotify(), and ossimNotifyLevel_DEBUG.

44  :
46 {
47  if (traceDebug())
48  {
50  << "ossimplugins::ossimTerraSarTiffReader::ossimTerraSarTiffReader entered...\n";
51 #ifdef OSSIM_ID_ENABLED
53  << "OSSIM_ID: " << OSSIM_ID << std::endl;
54 #endif
55  }
56 }
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ ~ossimTerraSarTiffReader()

ossimplugins::ossimTerraSarTiffReader::~ossimTerraSarTiffReader ( )
virtual

virtual destructor

Definition at line 58 of file ossimTerraSarTiffReader.cpp.

59 {
60 }

Member Function Documentation

◆ close()

void ossimplugins::ossimTerraSarTiffReader::close ( )
virtual

Close method.

Reimplemented from ossimTiffTileSource.

Definition at line 198 of file ossimTerraSarTiffReader.cpp.

References ossimTiffTileSource::close().

199 {
202 }
void clear()
Erases the entire container.
Definition: ossimString.h:432
virtual void close()
Deletes the overview and clears the valid image vertices.

◆ getClassName()

ossimString ossimplugins::ossimTerraSarTiffReader::getClassName ( ) const
virtual
Returns
"ossimTerraSarTiffReader"

Reimplemented from ossimObject.

Definition at line 133 of file ossimTerraSarTiffReader.cpp.

134 {
135  return ossimString("ossimTerraSarTiffReader");
136 }

◆ getImageGeometry()

ossimRefPtr< ossimImageGeometry > ossimplugins::ossimTerraSarTiffReader::getImageGeometry ( )
virtual

Returns the image geometry object associated with this tile source or NULL if non defined.

The geometry contains full-to-local image transform as well as projection (image-to-world).

Reimplemented from ossimImageHandler.

Definition at line 204 of file ossimTerraSarTiffReader.cpp.

References ossimImageGeometryRegistry::extendGeometry(), and ossimImageGeometryRegistry::instance().

205 {
206  if ( !theGeometry )
207  {
208  // Check for external geom:
210 
211  if ( !theGeometry )
212  {
213  // Check the internal geometry first to avoid a factory call.
215 
216  // At this point it is assured theGeometry is set.
217 
218  //---
219  // WARNING:
220  // Must create/set theGeometry at this point or the next call to
221  // ossimImageGeometryRegistry::extendGeometry will put us in an infinite loop
222  // as it does a recursive call back to ossimImageHandler::getImageGeometry().
223  //---
224 
225  // Check for set projection.
226  if ( !theGeometry->getProjection() )
227  {
228  // Try factories for projection.
230  }
231  }
232 
233  // Set image things the geometry object should know about.
235  }
236 
237  return theGeometry;
238 }
static ossimImageGeometryRegistry * instance()
ossimRefPtr< ossimImageGeometry > theGeometry
virtual ossimRefPtr< ossimImageGeometry > getInternalImageGeometry() const
virtual bool extendGeometry(ossimImageHandler *handler) const
void initImageParameters(ossimImageGeometry *geom) const
Convenience method to set things needed in the image geometry from the image handler.
virtual ossimRefPtr< ossimImageGeometry > getExternalImageGeometry() const
Returns the image geometry object associated with this tile source or NULL if non defined...
const ossimProjection * getProjection() const
Access methods for projection (may be NULL pointer).

◆ getInternalImageGeometry()

ossimRefPtr< ossimImageGeometry > ossimplugins::ossimTerraSarTiffReader::getInternalImageGeometry ( ) const
virtual
Parameters
Methodto get geometry from the xml file or internal geotiff tags.

Reimplemented from ossimImageHandler.

Definition at line 241 of file ossimTerraSarTiffReader.cpp.

References ossimGeoTiff::addImageGeometry(), ossimRefPtr< T >::get(), ossimplugins::ossimTerraSarProductDoc::getProjection(), ossimProjectionFactoryRegistry::instance(), ossimplugins::ossimTerraSarModel::open(), ossimXmlDocument::openFile(), ossimNotify(), ossimNotifyLevel_DEBUG, ossimGeoTiff::readTags(), ossimImageGeometry::setProjection(), ossimString::upcase(), and ossimRefPtr< T >::valid().

242 {
243  static const char MODULE[] = "ossimplugins::ossimTerraSarTiffReader::getInternalImageGeometry";
244  if (traceDebug())
245  {
246  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
247  }
248 
250 
252  if ( xdoc->openFile(theProductXmlFile) )
253  {
254  ossimTerraSarProductDoc helper;
255  ossimString s;
256  if ( helper.getProjection(xdoc.get(), s) )
257  {
258  s.upcase();
259  if ( s == "GROUNDRANGE" )
260  {
262  new ossimTerraSarModel();
263  if ( model->open(theProductXmlFile) )
264  {
265  // Assign the model to our ossimImageGeometry object.
266  geom->setProjection( model.get() );
267  }
268  }
269  else if ( (s == "MAP") && theTiffPtr )
270  {
271  ossimGeoTiff geotiff;
272 
273  //---
274  // Note: must pass false to readTags so it doesn't close our
275  // tiff pointer.
276  //---
277  geotiff.readTags(theTiffPtr, getCurrentEntry(), false);
278  ossimKeywordlist kwl;
279  if(geotiff.addImageGeometry(kwl))
280  {
283  createProjection(kwl);
284 
285  if ( proj.valid() )
286  {
287  // Assign projection to our ossimImageGeometry object.
288  geom->setProjection( proj.get() );
289  }
290  }
291  }
292  else
293  {
294  if (traceDebug())
295  {
297  << "WARNING: Unhandled projection: " << s << std::endl;
298 
299  }
300  }
301  }
302 
303  } // matches: if ( xdoc->openFile(theProductXmlFile) )
304 
305  if (traceDebug())
306  {
307  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited..." << std::endl;
308  }
309 
310  return geom;
311 }
void setProjection(ossimProjection *projection)
Sets the projection to be used for local-to-world coordinate transformation.
static ossimString upcase(const ossimString &aString)
Definition: ossimString.cpp:34
bool addImageGeometry(ossimKeywordlist &kwl, const char *prefix=0) const
Add geometry info from tags to keword list.
Represents serializable keyword/value map.
bool valid() const
Definition: ossimRefPtr.h:75
bool openFile(const ossimFilename &filename)
virtual ossim_uint32 getCurrentEntry() const
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
static ossimProjectionFactoryRegistry * instance()
bool readTags(const ossimFilename &file, ossim_uint32 entryIdx=0)
Reads tags.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ getLongName()

ossimString ossimplugins::ossimTerraSarTiffReader::getLongName ( ) const
virtual
Returns
"ossim TerraSAR-X reader"

Reimplemented from ossimTiffTileSource.

Definition at line 128 of file ossimTerraSarTiffReader.cpp.

129 {
130  return ossimString("ossim TerraSAR-X tiff reader");
131 }

◆ getShortName()

ossimString ossimplugins::ossimTerraSarTiffReader::getShortName ( ) const
virtual
Returns
"terrasarx"

Reimplemented from ossimTiffTileSource.

Definition at line 123 of file ossimTerraSarTiffReader.cpp.

124 {
125  return ossimString("ossim_terrasar_tiff_reader");
126 }

◆ isTerraSarProductFile() [1/2]

bool ossimplugins::ossimTerraSarTiffReader::isTerraSarProductFile ( const ossimFilename file) const
private

Method to check file to see if it's a TerraSAR-X product xml file.

Parameters
fileThe file to check.
Returns
true on success, false on error.

Definition at line 313 of file ossimTerraSarTiffReader.cpp.

References ossimString::downcase(), ossimFilename::ext(), ossimRefPtr< T >::get(), and ossimXmlDocument::openFile().

315 {
316  bool result = false;
317 
318  // Check extension to see if it's xml.
319  if ( file.ext().downcase() == "xml" )
320  {
322  if ( xdoc->openFile(file) )
323  {
324  result = isTerraSarProductFile( xdoc.get() );
325  }
326  }
327 
328  return result;
329 }
bool isTerraSarProductFile(const ossimFilename &file) const
Method to check file to see if it&#39;s a TerraSAR-X product xml file.
bool openFile(const ossimFilename &filename)
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
ossimString ext() const

◆ isTerraSarProductFile() [2/2]

bool ossimplugins::ossimTerraSarTiffReader::isTerraSarProductFile ( const ossimXmlDocument xdoc) const
private

Method to check file to see if it's a TerraSAR-X product xml file.

Parameters
xdocXML document opened up to product.xml file.
Returns
true on success, false on error.

Definition at line 331 of file ossimTerraSarTiffReader.cpp.

References ossimplugins::ossimTerraSarProductDoc::isTerraSarX().

333 {
334  bool result = false;
335 
336  if (xdoc)
337  {
338  ossimTerraSarProductDoc helper;
339 
340  // See if it's a TerraSAR-X product xml file.
341  result = helper.isTerraSarX(xdoc);
342  }
343 
344  return result;
345 }

◆ loadState()

bool ossimplugins::ossimTerraSarTiffReader::loadState ( const ossimKeywordlist kwl,
const char *  prefix = 0 
)
virtual

Method to the load (recreate) the state of an object from a keyword list.

Return true if ok or false on error.

Reimplemented from ossimTiffTileSource.

Definition at line 80 of file ossimTerraSarTiffReader.cpp.

References ossimKeywordlist::find(), ossimTiffTileSource::loadState(), ossimNotify(), and ossimNotifyLevel_DEBUG.

82 {
83  static const char MODULE[] = "ossimplugins::ossimTerraSarTiffReader::loadState";
84 
85  if (traceDebug())
86  {
88  << MODULE << " entered...\n";
89  }
90 
91  bool result = false;
92 
93  // Get the product.xml file name.
94  const char* lookup = kwl.find(prefix, PRODUCT_XML_FILE_KW);
95  if (lookup)
96  {
97  theProductXmlFile = lookup;
99  {
100  //---
101  // Although we can open any tiff here we only do if we have matching
102  // TerraSAR-X product.xml.
103  //---
104  result = ossimTiffTileSource::loadState(kwl, prefix);
105  }
106  }
107 
108  if (!result)
109  {
111  }
112 
113  if (traceDebug())
114  {
116  << MODULE << " exit status = " << (result?"true":"false\n")
117  << std::endl;
118  }
119 
120  return result;
121 }
void clear()
Erases the entire container.
Definition: ossimString.h:432
bool isTerraSarProductFile(const ossimFilename &file) const
Method to check file to see if it&#39;s a TerraSAR-X product xml file.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
const char * find(const char *key) const
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ open()

bool ossimplugins::ossimTerraSarTiffReader::open ( const ossimFilename file)
virtual

This open take the product xml file.

Parameters
fileFile to open.
Returns
true on success, false on error.

Reimplemented from ossimTiffTileSource.

Definition at line 138 of file ossimTerraSarTiffReader.cpp.

References ossimFilename::dirCat(), ossimString::downcase(), ossimFilename::expand(), ossimFilename::ext(), ossimRefPtr< T >::get(), ossimplugins::ossimTerraSarProductDoc::getImageFile(), ossimTiffTileSource::open(), ossimXmlDocument::openFile(), ossimNotify(), ossimNotifyLevel_DEBUG, and ossimFilename::path().

139 {
140  static const char MODULE[] = "ossimplugins::ossimTerraSarTiffReader::open";
141 
142  if (traceDebug())
143  {
145  << MODULE << " entered...\n"
146  << "file: " << file << "\n";
147  }
148 
149  bool result = false;
150 
151  if ( isOpen() )
152  {
153  close();
154  }
155 
156  // Check extension to see if it's xml.
157  if ( file.ext().downcase() == "xml" )
158  {
160  if ( xdoc->openFile(file) )
161  {
162  // See if it's a TerraSAR-X product xml file.
163  if ( isTerraSarProductFile( xdoc.get() ) )
164  {
165  ossimString s;
166  ossimTerraSarProductDoc helper;
167 
168  if ( helper.getImageFile(xdoc.get(), s) )
169  {
170  ossimFilename imageFile = file.expand().path();
171  imageFile = imageFile.dirCat(s);
172 
173  setFilename(imageFile);
174 
175  result = ossimTiffTileSource::open();
176  if (result)
177  {
178  theProductXmlFile = file;
179 
180  completeOpen();
181  }
182  }
183  }
184  }
185 
186  } // matches: if ( file.ext().downcase() == "xml" )
187 
188  if (traceDebug())
189  {
191  << MODULE << " exit status = " << (result?"true":"false\n")
192  << std::endl;
193  }
194 
195  return result;
196 }
bool open()
Returns true if no errors initializing object.
bool isTerraSarProductFile(const ossimFilename &file) const
Method to check file to see if it&#39;s a TerraSAR-X product xml file.
virtual bool isOpen() const
Derived classes must implement this method to be concrete.
ossimFilename expand() const
Method to do file name expansion.
bool openFile(const ossimFilename &filename)
virtual void setFilename(const ossimFilename &filename)
Sets the filename.
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
virtual void completeOpen()
Will complete the opening process.
ossimFilename dirCat(const ossimFilename &file) const
ossimString ext() const
ossimFilename path() const
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ saveState()

bool ossimplugins::ossimTerraSarTiffReader::saveState ( ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Method to save the state of an object to a keyword list.

Return true if ok or false on error.

Reimplemented from ossimTiffTileSource.

Definition at line 62 of file ossimTerraSarTiffReader.cpp.

References ossimKeywordlist::add(), ossimNotify(), ossimNotifyLevel_DEBUG, and ossimTiffTileSource::saveState().

64 {
65  static const char MODULE[] = "ossimplugins::ossimTerraSarTiffReader::saveState";
66 
67  if (traceDebug())
68  {
70  << MODULE << " entered...\n";
71  }
72 
73  // Save our state:
74  kwl.add(prefix, PRODUCT_XML_FILE_KW, theProductXmlFile.c_str());
75 
76  // Save the base:
77  return ossimTiffTileSource::saveState(kwl, prefix);
78 }
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

Member Data Documentation

◆ theProductXmlFile

ossimFilename ossimplugins::ossimTerraSarTiffReader::theProductXmlFile
private

Definition at line 101 of file ossimTerraSarTiffReader.h.


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