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

Class used for rendering range domes (a.k.a. More...

#include <ossimRangeDomeTileSource.h>

Inheritance diagram for ossimRangeDomeTileSource:
ossimImageHandler ossimImageSource ossimSource ossimConnectableObject ossimErrorStatusInterface ossimObject ossimListenerManager ossimPropertyInterface ossimReferenced

Public Member Functions

 ossimRangeDomeTileSource ()
 
virtual ~ossimRangeDomeTileSource ()
 
virtual bool open ()
 Reads CSV file representing range domes. More...
 
virtual bool isOpen () const
 Derived classes must implement this method to be concrete. More...
 
virtual void close ()
 Deletes the overview and clears the valid image vertices. More...
 
virtual void initialize ()
 initialize Does nothing in this class. More...
 
virtual ossimRefPtr< ossimImageDatagetTile (const ossimIrect &rect, ossim_uint32 resLevel=0)
 
virtual bool getTile (ossimImageData *result, ossim_uint32 resLevel=0)
 Method to get a tile. More...
 
virtual ossim_uint32 getNumberOfInputBands () const
 
virtual ossim_uint32 getNumberOfLines (ossim_uint32 resLevel=0) const
 Pure virtual, derived classes must implement. More...
 
virtual ossim_uint32 getNumberOfSamples (ossim_uint32 resLevel=0) const
 Pure virtual, derived classes must implement. More...
 
virtual ossim_uint32 getImageTileWidth () const
 Returns the tile width of the image or 0 if the image is not tiled. More...
 
virtual ossim_uint32 getImageTileHeight () const
 Returns the tile width of the image or 0 if the image is not tiled. More...
 
virtual ossimScalarType getOutputScalarType () const
 This will be used to query the output pixel type of the tile source. More...
 
virtual ossimRefPtr< ossimImageGeometrygetImageGeometry ()
 Returns the image geometry object associated with this tile source or NULL if non defined. 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 setProperty (ossimRefPtr< ossimProperty > property)
 The reader properties are: – the GSD ("meters_per_pixel") More...
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void getGSD (ossimDpt &gsd, ossim_uint32 resLevel) const
 
virtual void setGSD (const ossim_float64 &gsd)
 
ossim_uint32 getNumRangeDomes () const
 
- Public Member Functions inherited from ossimImageHandler
 ossimImageHandler ()
 Constructor (default): More...
 
virtual ~ossimImageHandler ()
 Destructor: Derived classes should implement. 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 (const ossimFilename &imageFile)
 
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 getNumberOfDecimationLevels () const
 This returns the total number of decimation 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...
 
virtual bool isValidRLevel (ossim_uint32 resLevel) const
 Determines if the passed in reslution level is valid. 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 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 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 double getMinPixelValue (ossim_uint32 band=0) const
 Retuns the min pixel value. More...
 
virtual double getMaxPixelValue (ossim_uint32 band=0) const
 Returns the max pixel of the band. More...
 
virtual double getNullPixelValue (ossim_uint32 band=0) const
 Each band has a null pixel associated with it. 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)
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
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 ossim_uint32 getNumberOfOutputBands () const
 Returns the number of bands in a tile returned from this TileSource. More...
 
virtual void getOutputBandList (std::vector< ossim_uint32 > &bandList) const
 Initializes bandList. More...
 
virtual ossim_uint32 getTileWidth () const
 Returns the default processing tile width. More...
 
virtual ossim_uint32 getTileHeight () const
 Returns the default processing tile height. 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)
 
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
 

Protected Attributes

std::vector< ossimRangeDomem_rangeDomes
 
ossimDpt m_gsd
 
- 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
 

Static Protected Attributes

static const ossimString OSSIM_RANGE_DOME_SPEC_MAGIC_NUMBER
 

Additional Inherited Members

- 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 ossimImageHandler
virtual ossimRefPtr< ossimImageGeometrygetExternalImageGeometry () const
 Returns the image geometry object associated with this tile source or NULL if non defined. More...
 
virtual ossimRefPtr< ossimImageGeometrygetInternalImageGeometry () const
 
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)
 

Detailed Description

Class used for rendering range domes (a.k.a.

"threat domes") as 2-D ortho-images.

This base class has the rudimentary capability of reading range dome specifications as a CSV file in the following format (one line per dome object):

id, lat, lon, hgt, R, C [,Az0, Az1] [, description]

where

id – integer ID of data object lat, lon, hgt – Location of center of dome (actually sphere) in WGS84 R – radius (in meters) of dome boundary C – classification id (unsigned 8-bit) corresponding to area inside r Az0, Az1 – [optional] starting and ending azimuth (clockwise from Az0 in degrees). If both Az0 and Az1 are equal, then 360 deg is implied. description – [optional] string

Definition at line 71 of file ossimRangeDomeTileSource.h.

Constructor & Destructor Documentation

◆ ossimRangeDomeTileSource()

ossimRangeDomeTileSource::ossimRangeDomeTileSource ( )

Definition at line 73 of file ossimRangeDomeTileSource.cpp.

74 : m_gsd(1.0, 1.0) // default GSD
75 {
76 }

◆ ~ossimRangeDomeTileSource()

ossimRangeDomeTileSource::~ossimRangeDomeTileSource ( )
virtual

Definition at line 79 of file ossimRangeDomeTileSource.cpp.

References close().

80 {
81  close();
82 }
virtual void close()
Deletes the overview and clears the valid image vertices.

Member Function Documentation

◆ close()

void ossimRangeDomeTileSource::close ( )
virtual

Deletes the overview and clears the valid image vertices.

Derived classes should implement.

Reimplemented from ossimImageHandler.

Definition at line 172 of file ossimRangeDomeTileSource.cpp.

References m_rangeDomes, and ossimImageHandler::theGeometry.

Referenced by ~ossimRangeDomeTileSource().

173 {
174  m_rangeDomes.clear();
175  theGeometry = 0;
176 }
ossimRefPtr< ossimImageGeometry > theGeometry
std::vector< ossimRangeDome > m_rangeDomes

◆ getGSD()

void ossimRangeDomeTileSource::getGSD ( ossimDpt gsd,
ossim_uint32  resLevel 
) const
virtual

Definition at line 379 of file ossimRangeDomeTileSource.cpp.

References m_gsd, ossimDpt::x, and ossimDpt::y.

380 {
381  gsd.x =(1.0/(resLevel+1)) * m_gsd.x;
382  gsd.y =(1.0/(resLevel+1)) * m_gsd.y;
383 }
double y
Definition: ossimDpt.h:165
double x
Definition: ossimDpt.h:164

◆ getImageGeometry()

virtual ossimRefPtr<ossimImageGeometry> ossimRangeDomeTileSource::getImageGeometry ( )
inlinevirtual

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 97 of file ossimRangeDomeTileSource.h.

References ossimImageHandler::theGeometry.

97 { return theGeometry; }
ossimRefPtr< ossimImageGeometry > theGeometry

◆ getImageTileHeight()

virtual ossim_uint32 ossimRangeDomeTileSource::getImageTileHeight ( ) const
inlinevirtual

Returns the tile width of the image or 0 if the image is not tiled.

Note: this is not the same as the ossimImageSource::getTileWidth which returns the output tile width which can be different than the internal image tile width on disk.

Implements ossimImageHandler.

Definition at line 93 of file ossimRangeDomeTileSource.h.

93 { return 0; }

◆ getImageTileWidth()

virtual ossim_uint32 ossimRangeDomeTileSource::getImageTileWidth ( ) const
inlinevirtual

Returns the tile width of the image or 0 if the image is not tiled.

Note: this is not the same as the ossimImageSource::getTileWidth which returns the output tile width which can be different than the internal image tile width on disk.

Implements ossimImageHandler.

Definition at line 92 of file ossimRangeDomeTileSource.h.

92 { return 0; }

◆ getNumberOfInputBands()

ossim_uint32 ossimRangeDomeTileSource::getNumberOfInputBands ( ) const
virtual

Returns the number of bands available from the input.

Implements ossimImageSource.

Definition at line 270 of file ossimRangeDomeTileSource.cpp.

271 {
272  return 1;
273 }

◆ getNumberOfLines()

ossim_uint32 ossimRangeDomeTileSource::getNumberOfLines ( ossim_uint32  resLevel = 0) const
virtual

Pure virtual, derived classes must implement.

Parameters
resLevelReduced resolution level to return lines of. Default = 0
Returns
The number of lines for specified reduced resolution level.

Implements ossimImageHandler.

Definition at line 276 of file ossimRangeDomeTileSource.cpp.

References ossimImageGeometry::getImageSize(), ossimImageHandler::theGeometry, ossimRefPtr< T >::valid(), and ossimIpt::y.

277 {
278  if (theGeometry.valid())
279  return ( theGeometry->getImageSize().y / (resLevel+1) );
280  return 0;
281 }
ossimRefPtr< ossimImageGeometry > theGeometry
const ossimIpt & getImageSize() const
bool valid() const
Definition: ossimRefPtr.h:75
ossim_int32 y
Definition: ossimIpt.h:142

◆ getNumberOfSamples()

ossim_uint32 ossimRangeDomeTileSource::getNumberOfSamples ( ossim_uint32  resLevel = 0) const
virtual

Pure virtual, derived classes must implement.

Parameters
resLevelReduced resolution level to return samples of. Default = 0
Returns
The number of samples for specified reduced resolution level.

Implements ossimImageHandler.

Definition at line 284 of file ossimRangeDomeTileSource.cpp.

References ossimImageGeometry::getImageSize(), ossimImageHandler::theGeometry, ossimRefPtr< T >::valid(), and ossimIpt::x.

285 {
286  if (theGeometry.valid())
287  return ( theGeometry->getImageSize().x / (resLevel+1) );
288  return 0;
289 }
ossimRefPtr< ossimImageGeometry > theGeometry
const ossimIpt & getImageSize() const
bool valid() const
Definition: ossimRefPtr.h:75
ossim_int32 x
Definition: ossimIpt.h:141

◆ getNumRangeDomes()

ossim_uint32 ossimRangeDomeTileSource::getNumRangeDomes ( ) const
inline

Definition at line 112 of file ossimRangeDomeTileSource.h.

112 { return (ossim_uint32)m_rangeDomes.size(); }
std::vector< ossimRangeDome > m_rangeDomes
unsigned int ossim_uint32

◆ getOutputScalarType()

virtual ossimScalarType ossimRangeDomeTileSource::getOutputScalarType ( ) const
inlinevirtual

This will be used to query the output pixel type of the tile source.

Please ignore the argument. It will soon be removed.

Reimplemented from ossimImageSource.

Definition at line 94 of file ossimRangeDomeTileSource.h.

References OSSIM_UINT8.

94 { return OSSIM_UINT8; }
8 bit unsigned integer

◆ getProperty()

ossimRefPtr< ossimProperty > ossimRangeDomeTileSource::getProperty ( const ossimString name) const
virtual

Reimplemented from ossimImageHandler.

Definition at line 362 of file ossimRangeDomeTileSource.cpp.

References ossimImageHandler::getProperty(), m_gsd, ossimKeywordNames::METERS_PER_PIXEL_KW, ossimString::toString(), and ossimDpt::x.

363 {
366  {
368  prop = new ossimStringProperty(name, value);
369  }
370  else
371  {
372  prop = ossimImageHandler::getProperty(name);
373  }
374  return prop;
375 }
static ossimString toString(bool aValue)
Numeric to string methods.
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
static const char * METERS_PER_PIXEL_KW
double x
Definition: ossimDpt.h:164

◆ getTile() [1/2]

ossimRefPtr< ossimImageData > ossimRangeDomeTileSource::getTile ( const ossimIrect rect,
ossim_uint32  resLevel = 0 
)
virtual
Returns
the requested region of interest

Reimplemented from ossimImageSource.

Definition at line 179 of file ossimRangeDomeTileSource.cpp.

References ossimImageDataFactory::create(), ossimRefPtr< T >::get(), ossimImageData::initialize(), ossimImageDataFactory::instance(), and ossimImageData::setImageRectangle().

181 {
183 
184  tile->setImageRectangle(rect);
185  tile->initialize();
186 
187  getTile(tile.get(), resLevel);
188 
189  return tile;
190 }
virtual void setImageRectangle(const ossimIrect &rect)
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &rect, ossim_uint32 resLevel=0)
virtual void initialize()
Initialize the data buffer.
static ossimImageDataFactory * instance()
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const

◆ getTile() [2/2]

bool ossimRangeDomeTileSource::getTile ( ossimImageData result,
ossim_uint32  resLevel = 0 
)
virtual

Method to get a tile.

Parameters
resultThe tile to stuff. Note The requested rectangle in full image space and bands should be set in the result tile prior to passing. This is the default implementation that is not thread-friendly as it uses the object's tile then simply copies its buffer to the provided tile. Eventually, all image sources should override this method.
Returns
true on success false on error. If return is false, result is undefined so caller should handle appropriately with makeBlank or whatever.
Note
Derived classes should override this method to most efficiently stuff result.

Reimplemented from ossimImageSource.

Definition at line 193 of file ossimRangeDomeTileSource.cpp.

References ossim::atan2d(), ossimImageData::fill(), ossimImageGeometry::getBoundingRect(), ossimImageData::getImageRectangle(), ossimImageHandler::getNullPixelValue(), ossimIrect::intersects(), m_rangeDomes, OSSIM_EMPTY, ossimDataObject::setDataObjectStatus(), ossimImageData::setValue(), ossimImageHandler::theGeometry, ossimRefPtr< T >::valid(), and ossimImageData::validate().

194 {
195  if (!result || !theGeometry.valid())
196  return false;
197 
198  // Start with null fill:
199  result->fill(getNullPixelValue());
200 
201  // Verify intersection with dataset. Everything done in R0 space:
202  ossimIrect tile_rect (result->getImageRectangle());
203  ossim_uint32 coord_scale = resLevel + 1;
204  ossimIrect tile_rect_r0 (coord_scale*tile_rect);
205  ossimIrect boundingImgRect;
206  theGeometry->getBoundingRect(boundingImgRect);
207 
208  if (!tile_rect_r0.intersects(boundingImgRect))
209  {
211  return true;
212  }
213 
214  vector<ossimRangeDome>::iterator dome;
215  double d2, x0, y0, dx, dy, az;
216 
217  // Nested loop over all pixels in tile:
218  for (ossim_int32 yn=tile_rect.ul().y; yn<=tile_rect.lr().y; ++yn)
219  {
220  y0 = yn * coord_scale;
221 
222  for (ossim_int32 xn=tile_rect.ul().x; xn<=tile_rect.lr().x; ++xn)
223  {
224  x0 = xn * coord_scale;
225 
226  // Loop over each dome in the list to see if this pixel is affected:
227  dome = m_rangeDomes.begin();
228  while (dome != m_rangeDomes.end())
229  {
230  // Check distance to center:
231  dx = x0 - dome->centerIpt.x;
232  dy = y0 - dome->centerIpt.y;
233  d2 = dx*dx + dy*dy;
234 
235  if (d2 > dome->radiusPixelsSq)
236  {
237  ++dome;
238  continue;
239  }
240 
241  // Passed range test, do azimuth test. First check for simple 360 dome:
242  if (dome->startAz == dome->endAz)
243  {
244  result->setValue(xn, yn, (ossim_uint8) dome->classification);
245  ++dome;
246  continue;
247  }
248 
249  // Need full azimuth test:
250  az = ossim::atan2d(dx, -dy);
251  if (az < 0)
252  az += 360;
253  if (((dome->startAz < dome->endAz) && (az >= dome->startAz) && (az <= dome->endAz)) ||
254  ((dome->startAz > dome->endAz) && (
255  ((az >= dome->startAz) && (az > dome->endAz)) ||
256  ((az < dome->startAz) && (az <= dome->endAz)))))
257  {
258  result->setValue(xn, yn, (ossim_uint8) dome->classification);
259  }
260  ++dome;
261  }
262  }
263  }
264 
265  result->validate();
266  return true;
267 }
void fill(ossim_uint32 band, ossim_float64 value)
will fill the entire band with the value.
ossimRefPtr< ossimImageGeometry > theGeometry
virtual void setValue(ossim_int32 x, ossim_int32 y, ossim_float64 color)
bool valid() const
Definition: ossimRefPtr.h:75
void getBoundingRect(ossimIrect &bounding_rect) const
Get the bounding rect of (0, 0) to (imageSize.x-1, imageSize.y-1).
std::vector< ossimRangeDome > m_rangeDomes
virtual ossimDataObjectStatus validate() const
unsigned int ossim_uint32
virtual ossimIrect getImageRectangle() const
double atan2d(double y, double x)
Definition: ossimCommon.h:267
virtual void setDataObjectStatus(ossimDataObjectStatus status) const
Full list found in ossimConstants.h.
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.
unsigned char ossim_uint8
int ossim_int32

◆ initialize()

void ossimRangeDomeTileSource::initialize ( )
virtual

initialize Does nothing in this class.

Implemented to satisfy pure virtual.

Reimplemented from ossimImageHandler.

Definition at line 127 of file ossimRangeDomeTileSource.cpp.

References ossimGrect::expandToInclude(), ossimRefPtr< T >::get(), ossimMapProjection::getDecimalDegreesPerPixel(), ossimGrect::height(), isOpen(), m_gsd, m_rangeDomes, ossimGrect::makeNan(), ossimGrect::midPoint(), ossimMapProjection::setElevationLookupFlag(), ossimImageGeometry::setImageSize(), ossimMapProjection::setMetersPerPixel(), ossimMapProjection::setOrigin(), ossimMapProjection::setUlTiePoints(), ossimImageHandler::theGeometry, ossimGrect::ul(), ossimGrect::width(), ossimImageGeometry::worldToLocal(), and ossimDpt::x.

Referenced by open(), and setGSD().

128 {
129  if (!isOpen())
130  return;
131 
132  // Establish bounding rect:
133  ossimGrect boundingRect;
134  boundingRect.makeNan();
135  vector<ossimRangeDome>::iterator dome = m_rangeDomes.begin();
136  while (dome != m_rangeDomes.end())
137  {
138  boundingRect.expandToInclude(dome->boundingRect());
139  ++dome;
140  }
141 
142  // Set up the geometry:
144  mapProj->setOrigin(boundingRect.midPoint());
145  mapProj->setMetersPerPixel(m_gsd);
146  ossimDpt degPerPixel (mapProj->getDecimalDegreesPerPixel());
147  mapProj->setElevationLookupFlag(false);
148  mapProj->setUlTiePoints(boundingRect.ul());
149  ossimIpt image_size(boundingRect.width()/degPerPixel.x, boundingRect.height()/degPerPixel.y);
150  theGeometry = new ossimImageGeometry(0, mapProj.get());
151  theGeometry->setImageSize(image_size);
152 
153  // Transform the domes to image space coordinates:
154  dome = m_rangeDomes.begin();
155  double r;
156  while (dome != m_rangeDomes.end())
157  {
158  theGeometry->worldToLocal(dome->centerGpt, dome->centerIpt);
159  r = dome->radiusMeters/m_gsd.x;
160  dome->radiusPixelsSq = r*r;
161  ++dome;
162  }
163 }
virtual const ossimDpt & getDecimalDegreesPerPixel() const
Returns decimal degrees per pixel as an ossimDpt with "x" representing longitude and "y" representing...
ossimRefPtr< ossimImageGeometry > theGeometry
void makeNan()
Definition: ossimGrect.h:284
virtual bool isOpen() const
Derived classes must implement this method to be concrete.
ossim_float64 width() const
Returns the width of a rectangle in deg.
Definition: ossimGrect.h:247
virtual void setOrigin(const ossimGpt &origin)
Sets theOrigin to origin.
void setImageSize(const ossimIpt &size)
virtual void setMetersPerPixel(const ossimDpt &gsd)
void expandToInclude(const ossimGpt &gpt)
Expands existing rect to accommodate argument point.
Definition: ossimGrect.cpp:299
std::vector< ossimRangeDome > m_rangeDomes
const ossimGpt & ul() const
Definition: ossimGrect.h:252
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
ossimGpt midPoint() const
Definition: ossimGrect.h:178
double x
Definition: ossimDpt.h:164
virtual void setUlTiePoints(const ossimGpt &gpt)
bool worldToLocal(const ossimGpt &world_pt, ossimDpt &local_pt) const
Exposes the 3D world-to-local image coordinate reverse projection.
ossim_float64 height() const
Returns the height of a rectangle in deg.
Definition: ossimGrect.h:242
void setElevationLookupFlag(bool flag)

◆ isOpen()

bool ossimRangeDomeTileSource::isOpen ( ) const
virtual

Derived classes must implement this method to be concrete.

Returns
true if open, false if not.

Implements ossimImageHandler.

Definition at line 166 of file ossimRangeDomeTileSource.cpp.

References m_rangeDomes.

Referenced by initialize(), and open().

167 {
168  return (!m_rangeDomes.empty());
169 }
std::vector< ossimRangeDome > m_rangeDomes

◆ loadState()

bool ossimRangeDomeTileSource::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 ossimImageHandler.

Definition at line 310 of file ossimRangeDomeTileSource.cpp.

References ossimString::empty(), ossimKeywordlist::find(), ossimErrorStatusInterface::getErrorStatus(), ossimImageHandler::loadState(), ossimKeywordNames::METERS_PER_PIXEL_KW, ossimKeywordNames::METERS_PER_PIXEL_Y_KW, open(), ossimErrorCodes::OSSIM_ERROR, ossimNotify(), ossimNotifyLevel_WARN, setGSD(), ossimImageHandler::theDecimationFactors, ossimString::toDouble(), and ossimDpt::x.

311 {
312  static const char MODULE[] = "ossimRangeDomeTileSource::loadState()";
313  theDecimationFactors.clear();
314 
315  ossimImageHandler::loadState(kwl, prefix);
317  {
319  << "WARNING: error detected in keyword list! State not load." << std::endl;
320  return false;
321  }
322 
323  ossimDpt gsd;
325  if (!value.empty())
326  gsd.x = value.toDouble();
327 
328  value = kwl.find(prefix, ossimKeywordNames::METERS_PER_PIXEL_Y_KW);
329  if (!value.empty())
330  setGSD(value.toDouble());
331 
332  // The rest of the state is established by opening the file:
333  bool good_open = open();
334  return good_open;
335 }
virtual void setGSD(const ossim_float64 &gsd)
const char * find(const char *key) const
std::vector< ossimDpt > theDecimationFactors
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
static const ossimErrorCode OSSIM_ERROR
static const char * METERS_PER_PIXEL_Y_KW
double toDouble() const
virtual ossimErrorCode getErrorStatus() const
static const char * METERS_PER_PIXEL_KW
double x
Definition: ossimDpt.h:164
bool empty() const
Definition: ossimString.h:411
virtual bool open()
Reads CSV file representing range domes.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ open()

bool ossimRangeDomeTileSource::open ( )
virtual

Reads CSV file representing range domes.

Implements ossimImageHandler.

Definition at line 85 of file ossimRangeDomeTileSource.cpp.

References ossimString::chars(), getline(), initialize(), isOpen(), ossimFilename::isReadable(), m_rangeDomes, OSSIM_RANGE_DOME_SPEC_MAGIC_NUMBER, ossimNotify(), ossimNotifyLevel_WARN, ossimString::size(), ossimString::split(), ossimImageHandler::theImageFile, and ossimRangeDome::valid.

Referenced by loadState().

86 {
87 #if 0 /* Please wrap with traceDebug(). drb */
88  if (!theImageFile.isReadable())
89  {
90  ossimNotify(ossimNotifyLevel_WARN)<<"ossimRangeDomeTileSource::open() -- Error. Coould not"
91  " open CSV file at <"<<theImageFile<<">" << endl;
92  return false;
93  }
94 #endif
95 
96  ossimString dome_spec;
98  char* magic_number = new char [ sizeOfMagic ];
99 
100  // Open the CSV and check proper file type:
101  ifstream indata (theImageFile.chars());
102  if (indata.fail())
103  return false;
104  indata.read(magic_number, sizeOfMagic);
105 
106  if (indata.eof() || indata.fail() || (OSSIM_RANGE_DOME_SPEC_MAGIC_NUMBER != magic_number))
107  return false;
108 
109  // loop over each record/dome spec:
110  vector<ossimString> tokens;
111  while (indata.good())
112  {
113  tokens.clear();
114  getline(indata, dome_spec);
115  dome_spec.split(tokens, ",", true);
116  ossimRangeDome dome (tokens);
117  if (dome.valid)
118  m_rangeDomes.push_back(dome);
119  }
120 
121  // The GSD may be incorrect, but init anyway then redo whe GSD is set:
122  initialize();
123 
124  return isOpen();
125 }
static const ossimString OSSIM_RANGE_DOME_SPEC_MAGIC_NUMBER
ossimFilename theImageFile
std::basic_ifstream< char > ifstream
Class for char input file streams.
Definition: ossimIosFwd.h:44
virtual bool isOpen() const
Derived classes must implement this method to be concrete.
void split(std::vector< ossimString > &result, const ossimString &separatorList, bool skipBlankFields=false) const
Splits this string into a vector of strings (fields) using the delimiter list specified.
std::istream & getline(std::istream &is, ossimString &str, char delim)
Definition: ossimString.h:916
std::vector< ossimRangeDome > m_rangeDomes
std::string::size_type size() const
Definition: ossimString.h:405
unsigned int ossim_uint32
const char * chars() const
For backward compatibility.
Definition: ossimString.h:77
bool isReadable() const
virtual void initialize()
initialize Does nothing in this class.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ saveState()

bool ossimRangeDomeTileSource::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 ossimImageHandler.

Definition at line 292 of file ossimRangeDomeTileSource.cpp.

References ossimKeywordlist::add(), ossimErrorStatusInterface::getErrorStatus(), m_gsd, ossimKeywordNames::METERS_PER_PIXEL_KW, ossimErrorCodes::OSSIM_ERROR, ossimNotify(), ossimNotifyLevel_WARN, ossimImageHandler::saveState(), and ossimDpt::x.

293 {
294  static const char MODULE[] = "ossimRangeDomeTileSource::saveState()";
295 
296  ossimImageHandler::saveState(kwl, prefix);
298  {
300  << " ERROR detected in keyword list! State not saved." << std::endl;
301  return false;
302  }
303 
305 
306  return true;
307 }
static const ossimErrorCode OSSIM_ERROR
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
virtual ossimErrorCode getErrorStatus() const
static const char * METERS_PER_PIXEL_KW
double x
Definition: ossimDpt.h:164
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.

◆ setGSD()

void ossimRangeDomeTileSource::setGSD ( const ossim_float64 gsd)
virtual

Definition at line 386 of file ossimRangeDomeTileSource.cpp.

References initialize(), m_gsd, ossimDpt::x, and ossimDpt::y.

Referenced by loadState(), and setProperty().

387 {
388  if (gsd == m_gsd.x)
389  return;
390 
391  m_gsd.x = gsd;
392  m_gsd.y = gsd;
393 
394  initialize();
395 }
double y
Definition: ossimDpt.h:165
virtual void initialize()
initialize Does nothing in this class.
double x
Definition: ossimDpt.h:164

◆ setProperty()

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

The reader properties are: – the GSD ("meters_per_pixel")

Reimplemented from ossimImageHandler.

Definition at line 338 of file ossimRangeDomeTileSource.cpp.

References ossimString::empty(), ossimProperty::getName(), ossim::isnan(), ossimKeywordNames::METERS_PER_PIXEL_KW, setGSD(), ossimImageHandler::setProperty(), ossimString::toFloat64(), and ossimRefPtr< T >::valid().

339 {
340  if (!property.valid())
341  return;
342 
343  ossimString s;
344  property->valueToString(s);
345  if (s.empty())
346  return;
347 
348  // The user should select either explicit GSD or relative GSD factor, never both:
349  if ( property->getName() == ossimKeywordNames::METERS_PER_PIXEL_KW )
350  {
351  ossim_float64 gsd = s.toFloat64();
352  if (!ossim::isnan(gsd))
353  setGSD(gsd);
354  }
355  else
356  {
358  }
359 }
virtual void setGSD(const ossim_float64 &gsd)
bool valid() const
Definition: ossimRefPtr.h:75
virtual void setProperty(ossimRefPtr< ossimProperty > property)
double ossim_float64
ossim_float64 toFloat64() const
static const char * METERS_PER_PIXEL_KW
bool empty() const
Definition: ossimString.h:411
const ossimString & getName() const
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.
Definition: ossimCommon.h:91

Member Data Documentation

◆ m_gsd

ossimDpt ossimRangeDomeTileSource::m_gsd
protected

Definition at line 116 of file ossimRangeDomeTileSource.h.

Referenced by getGSD(), getProperty(), initialize(), saveState(), and setGSD().

◆ m_rangeDomes

std::vector<ossimRangeDome> ossimRangeDomeTileSource::m_rangeDomes
protected

Definition at line 115 of file ossimRangeDomeTileSource.h.

Referenced by close(), getTile(), initialize(), isOpen(), and open().

◆ OSSIM_RANGE_DOME_SPEC_MAGIC_NUMBER

const ossimString ossimRangeDomeTileSource::OSSIM_RANGE_DOME_SPEC_MAGIC_NUMBER
staticprotected

Definition at line 118 of file ossimRangeDomeTileSource.h.

Referenced by open().


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