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

#include <ossimElevImageSource.h>

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

Public Member Functions

 ossimElevImageSource ()
 
 ossimElevImageSource (ossimObject *owner)
 
 ossimElevImageSource (ossimObject *owner, const ossimGpt &tie, double latSpacing, double lonSpacing, ossim_uint32 numberLines, ossim_uint32 numberSamples)
 
 ossimElevImageSource (ossimObject *owner, const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual ossimRefPtr< ossimImageDatagetTile (const ossimIrect &rect, ossim_uint32 resLevel=0)
 
virtual bool getImageGeometry (ossimKeywordlist &kwl, const char *prefix=0)
 
virtual ossim_uint32 getNumberOfOutputBands () const
 
virtual ossimIrect getImageRectangle (ossim_uint32 reduced_res_level=0) const
 
virtual ossimIrect getBoundingRect (ossim_uint32 resLevel=0) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
bool canConnectMyInputTo (ossim_int32, const ossimConnectableObject *) const
 required to be overriden by derived classes More...
 
virtual void initialize ()
 
virtual void getDecimationFactor (ossim_uint32 resLevel, ossimDpt &result) const
 
virtual void getDecimationFactors (vector< ossimDpt > &decimations) const
 
virtual ossim_uint32 getNumberOfDecimationLevels () const
 Will return the number of resolution levels. More...
 
virtual ossim_uint32 getNumberOfInputBands () const
 
virtual ossimScalarType getOutputScalarType () const
 This will be used to query the output pixel type of the tile source. 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 changeTileSize (const ossimIpt &size)
 
virtual ossimGpt getTiePoint () const
 
virtual ossim_float64 getLatitudeSpacing () const
 
virtual ossim_float64 getLongitudeSpacing () const
 
virtual ossim_uint32 getNumberOfLines (ossim_uint32 reduced_res_level=0) const
 
virtual ossim_uint32 getNumberOfSamples (ossim_uint32 reduced_res_level=0) const
 
virtual double getMinPixelValue (ossim_uint32 band=0) const
 Returns the min pixel of the band. More...
 
virtual double getMaxPixelValue (ossim_uint32 band=0) const
 Returns the max pixel of the band. More...
 
virtual void setTiePoint (const ossimGpt &gpt)
 
virtual void setLatitudeSpacing (ossim_float64 sp)
 
virtual void setLongitudeSpacing (ossim_float64 sp)
 
virtual void setNumberOfLines (ossim_uint32 lines)
 
virtual void setNumberOfSamples (ossim_uint32 samps)
 
virtual void setMinPixelValue (ossim_float64 min_pix)
 
virtual void setMaxPixelValue (ossim_float64 max_pix)
 
- 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 bool getTile (ossimImageData *result, ossim_uint32 resLevel=0)
 Method to get a tile. More...
 
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 getOutputBandList (std::vector< ossim_uint32 > &bandList) const
 Initializes bandList. More...
 
virtual double getNullPixelValue (ossim_uint32 band=0) const
 Each band has a null pixel associated with it. 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 ossimRefPtr< ossimImageGeometrygetImageGeometry ()
 Returns the image geometry object associated with this tile source or NULL if not defined. More...
 
virtual void setImageGeometry (const ossimImageGeometry *geom)
 Default implementation sets geometry of the first input to the geometry specified. More...
 
virtual void saveImageGeometry () const
 Default method to call input's saveImageGeometry. More...
 
virtual void saveImageGeometry (const ossimFilename &geometry_file) const
 Default method to call input's saveImageGeometry. More...
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
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 Member Functions

virtual ~ossimElevImageSource ()
 
- 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

ossimElevSourcetheElevManager
 
ossimRefPtr< ossimImageDatatheTile
 
ossimGpt theTiePoint
 
ossim_float64 theLatSpacing
 
ossim_float64 theLonSpacing
 
ossim_uint32 theNumberOfLines
 
ossim_uint32 theNumberOfSamps
 
- 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
 

Additional Inherited Members

- Public Types inherited from ossimConnectableObject
enum  ossimConnectableObjectDirectionType { CONNECTABLE_DIRECTION_NONE = 0, CONNECTABLE_DIRECTION_INPUT = 1, CONNECTABLE_DIRECTION_OUTPUT = 2 }
 
typedef std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
 

Detailed Description

Definition at line 25 of file ossimElevImageSource.h.

Constructor & Destructor Documentation

◆ ossimElevImageSource() [1/4]

ossimElevImageSource::ossimElevImageSource ( )

Definition at line 30 of file ossimElevImageSource.cpp.

31  :
32  ossimImageSource(NULL,
33  0,
34  0,
35  true,
36  false),// output list is not fixed
37  theElevManager(NULL),
38  theTile(NULL),
39  theTiePoint(),
40  theLatSpacing(0.0),
41  theLonSpacing(0.0),
44 {}
ossimRefPtr< ossimImageData > theTile
ossimElevSource * theElevManager
ossimImageSource(ossimObject *owner=0)

◆ ossimElevImageSource() [2/4]

ossimElevImageSource::ossimElevImageSource ( ossimObject owner)

Definition at line 46 of file ossimElevImageSource.cpp.

47  :
48  ossimImageSource(owner,
49  0,
50  0,
51  true,
52  false),// output list is not fixed
53  theElevManager(NULL),
54  theTile(NULL),
55  theTiePoint(),
56  theLatSpacing(0.0),
57  theLonSpacing(0.0),
60 {}
ossimRefPtr< ossimImageData > theTile
ossimElevSource * theElevManager
ossimImageSource(ossimObject *owner=0)

◆ ossimElevImageSource() [3/4]

ossimElevImageSource::ossimElevImageSource ( ossimObject owner,
const ossimGpt tie,
double  latSpacing,
double  lonSpacing,
ossim_uint32  numberLines,
ossim_uint32  numberSamples 
)

Definition at line 62 of file ossimElevImageSource.cpp.

References initialize().

68  :
69  ossimImageSource(owner,
70  0,
71  0,
72  true,
73  false),// output list is not fixed
74  theElevManager(NULL),
75  theTile(NULL),
76  theTiePoint(tie),
77  theLatSpacing(latSpacing),
78  theLonSpacing(lonSpacing),
79  theNumberOfLines(numberLines),
80  theNumberOfSamps(numberSamples)
81 {
82  initialize();
83 }
ossimRefPtr< ossimImageData > theTile
ossimElevSource * theElevManager
ossimImageSource(ossimObject *owner=0)

◆ ossimElevImageSource() [4/4]

ossimElevImageSource::ossimElevImageSource ( ossimObject owner,
const ossimKeywordlist kwl,
const char *  prefix = 0 
)

Definition at line 85 of file ossimElevImageSource.cpp.

References loadState(), and ossimErrorStatusInterface::setErrorStatus().

88  :
89  ossimImageSource(owner,
90  0,
91  0,
92  true,
93  false),
94  theElevManager(NULL),
95  theTile(NULL),
96  theTiePoint(),
97  theLatSpacing(0),
98  theLonSpacing(0),
101 {
102  if (loadState(kwl, prefix) == false)
103  {
104  setErrorStatus();
105  }
106 }
ossimRefPtr< ossimImageData > theTile
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
ossimElevSource * theElevManager
ossimImageSource(ossimObject *owner=0)

◆ ~ossimElevImageSource()

ossimElevImageSource::~ossimElevImageSource ( )
protectedvirtual

Definition at line 108 of file ossimElevImageSource.cpp.

109 {
110 }

Member Function Documentation

◆ canConnectMyInputTo()

bool ossimElevImageSource::canConnectMyInputTo ( ossim_int32  myInputIndex,
const ossimConnectableObject object 
) const
inlinevirtual

required to be overriden by derived classes

Implements ossimConnectableObject.

Definition at line 94 of file ossimElevImageSource.h.

96  {
97  return false;
98  }

◆ changeTileSize()

void ossimElevImageSource::changeTileSize ( const ossimIpt size)
virtual

Definition at line 684 of file ossimElevImageSource.cpp.

685 {
686  if (traceDebug())
687  {
688  cout << "ossimElevImageSource::changeTileSize DEBUG:"
689  << "\nx size: " << size.x
690  << "\ny size: " << size.y
691  << endl;
692  }
693 
694  if (!theTile)
695  {
696  cerr << "ossimElevImageSource::changeTileSize ERROR:"
697  << "\nObject not initialized! Returning..." << endl;
698  return;
699  }
700 
701  theTile = new ossimImageData(this,
702  OSSIM_FLOAT,
703  1,
704  size.x,
705  size.y);
706  theTile->initialize();
707 
708  // Set the min / max for any normalization down the chain...
711 }
ossimRefPtr< ossimImageData > theTile
virtual void initialize()
Initialize the data buffer.
yy_size_t size
ossimElevSource * theElevManager
virtual double getMinHeightAboveMSL() const
Access methods for the bounding elevations:
virtual void setMaxPix(ossim_float64 max_pix)
virtual double getMaxHeightAboveMSL() const
32 bit floating point
virtual void setMinPix(ossim_float64 min_pix)

◆ getBoundingRect()

virtual ossimIrect ossimElevImageSource::getBoundingRect ( ossim_uint32  resLevel = 0) const
inlinevirtual

Returns the absolute bounding rectangle of the image. The upper left corner may be non-zero if this is a subimage.

Reimplemented from ossimImageSource.

Definition at line 75 of file ossimElevImageSource.h.

References getImageRectangle().

76  {
77  return getImageRectangle(resLevel);
78  }
virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level=0) const

◆ getDecimationFactor()

void ossimElevImageSource::getDecimationFactor ( ossim_uint32  resLevel,
ossimDpt result 
) const
virtual

Satisfy pure virtuals from base classes...

Reimplemented from ossimImageSource.

Definition at line 635 of file ossimElevImageSource.cpp.

References ossimDpt::line, and ossimDpt::samp.

636 {
637  if (resLevel)
638  {
639  cerr << "ossimElevImageSource::getDecimationFactor ERROR:"
640  << "\nReduced res sets currently not supported!"
641  << endl;
642  }
643 
644  result.line = 1.0;
645  result.samp = 1.0;
646 }
double samp
Definition: ossimDpt.h:164
double line
Definition: ossimDpt.h:165

◆ getDecimationFactors()

void ossimElevImageSource::getDecimationFactors ( vector< ossimDpt > &  decimations) const
virtual

Definition at line 648 of file ossimElevImageSource.cpp.

649 {
650  ossimDpt pt(1.0, 1.0);
651  decimations.clear();
652  decimations.push_back(pt);
653 }

◆ getImageGeometry()

bool ossimElevImageSource::getImageGeometry ( ossimKeywordlist kwl,
const char *  prefix = 0 
)
virtual

Populates the keyword list with image geometry information. This method is used to relay projection/model information to users. Returns true if geometry info is present, false if not.

Definition at line 617 of file ossimElevImageSource.cpp.

References ossimKeywordlist::add(), ossimKeywordNames::NUMBER_LINES_KW, ossimKeywordNames::NUMBER_SAMPLES_KW, ossimLlxyProjection::saveState(), theLatSpacing, theLonSpacing, theNumberOfLines, and theTiePoint.

619 {
620  // Save off the image dimensions.
621  kwl.add(prefix,
624  true);
625  kwl.add(prefix,
628  true);
629 
630  // Save off the projection info (tie and post spacing).
632  return proj.saveState(kwl, prefix);
633 }
static const char * NUMBER_LINES_KW
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
static const char * NUMBER_SAMPLES_KW

◆ getImageRectangle()

ossimIrect ossimElevImageSource::getImageRectangle ( ossim_uint32  reduced_res_level = 0) const
virtual

Returns the zero-based (relative) image rectangle for the reduced resolution data set (rrds) passed in. Note that rrds 0 is the highest resolution rrds.

Definition at line 604 of file ossimElevImageSource.cpp.

References theNumberOfLines, and theNumberOfSamps.

Referenced by getBoundingRect(), and getTile().

605 {
606  ossimIrect result(0, 0, theNumberOfSamps-1, theNumberOfLines-1);
607 
608  if (reduced_res_level != 0)
609  {
610  cerr << "ossimElevImageSource::getImageRectangle ERROR:"
611  << "\nOnly R0 is supported." << endl;
612  }
613 
614  return result;
615 }

◆ getLatitudeSpacing()

virtual ossim_float64 ossimElevImageSource::getLatitudeSpacing ( ) const
inlinevirtual

Definition at line 116 of file ossimElevImageSource.h.

References theLatSpacing.

116 { return theLatSpacing; }

◆ getLongitudeSpacing()

virtual ossim_float64 ossimElevImageSource::getLongitudeSpacing ( ) const
inlinevirtual

Definition at line 117 of file ossimElevImageSource.h.

References theLonSpacing.

117 { return theLonSpacing; }

◆ getMaxPixelValue()

double ossimElevImageSource::getMaxPixelValue ( ossim_uint32  band = 0) const
virtual

Returns the max pixel of the band.

Reimplemented from ossimImageSource.

Definition at line 761 of file ossimElevImageSource.cpp.

References ossimRefPtr< T >::get(), ossimElevSource::getMaxHeightAboveMSL(), ossimImageData::getMaxPix(), theElevManager, and theTile.

Referenced by saveState().

762 {
763  if (band)
764  {
765  cerr << "ossimElevImageSource::getMaxPixelValue ERROR:"
766  << "\nReduced res sets currently not supported!"
767  << endl;
768  return 0.0;
769  }
770 
771  if (theTile.get())
772  {
773  return theTile->getMaxPix(0);
774  }
775  else if (theElevManager)
776  {
778  }
779 
780  return 0.0;
781 }
virtual const ossim_float64 * getMaxPix() const
ossimRefPtr< ossimImageData > theTile
ossimElevSource * theElevManager
virtual double getMaxHeightAboveMSL() const

◆ getMinPixelValue()

double ossimElevImageSource::getMinPixelValue ( ossim_uint32  band = 0) const
virtual

Returns the min pixel of the band.

Reimplemented from ossimImageSource.

Definition at line 739 of file ossimElevImageSource.cpp.

References ossimRefPtr< T >::get(), ossimElevSource::getMinHeightAboveMSL(), ossimImageData::getMinPix(), theElevManager, and theTile.

Referenced by saveState().

740 {
741  if (band)
742  {
743  cerr << "ossimElevImageSource::getMinPixelValue ERROR:"
744  << "\nReduced res sets currently not supported!"
745  << endl;
746  return 0.0;
747  }
748 
749  if (theTile.get())
750  {
751  return theTile->getMinPix(0);
752  }
753  else if (theElevManager)
754  {
756  }
757 
758  return 0.0;
759 }
ossimRefPtr< ossimImageData > theTile
ossimElevSource * theElevManager
virtual double getMinHeightAboveMSL() const
Access methods for the bounding elevations:
virtual const ossim_float64 * getMinPix() const

◆ getNumberOfDecimationLevels()

ossim_uint32 ossimElevImageSource::getNumberOfDecimationLevels ( ) const
virtual

Will return the number of resolution levels.

Note: resolution level 0 is included in the return count.

Reimplemented from ossimImageSource.

Definition at line 655 of file ossimElevImageSource.cpp.

656 {
657  return 1;
658 }

◆ getNumberOfInputBands()

ossim_uint32 ossimElevImageSource::getNumberOfInputBands ( ) const
virtual

Returns the number of bands available from the input.

Implements ossimImageSource.

Definition at line 660 of file ossimElevImageSource.cpp.

661 {
662  return 1;
663 }

◆ getNumberOfLines()

ossim_uint32 ossimElevImageSource::getNumberOfLines ( ossim_uint32  reduced_res_level = 0) const
virtual

Definition at line 713 of file ossimElevImageSource.cpp.

References theNumberOfLines.

714 {
715  if (reduced_res_level)
716  {
717  cerr << "ossimElevImageSource::getNumberOfLines ERROR:"
718  << "\nReduced res sets currently not supported!"
719  << endl;
720  return 0;
721  }
722 
723  return theNumberOfLines;
724 }

◆ getNumberOfOutputBands()

virtual ossim_uint32 ossimElevImageSource::getNumberOfOutputBands ( ) const
inlinevirtual

Returns the number of bands in the image. Alway one for this source.

Reimplemented from ossimImageSource.

Definition at line 61 of file ossimElevImageSource.h.

61 { return 1; }

◆ getNumberOfSamples()

ossim_uint32 ossimElevImageSource::getNumberOfSamples ( ossim_uint32  reduced_res_level = 0) const
virtual

Definition at line 726 of file ossimElevImageSource.cpp.

References theNumberOfSamps.

727 {
728  if (reduced_res_level)
729  {
730  cerr << "ossimElevImageSource::getNumberOfSamples ERROR:"
731  << "\nReduced res sets currently not supported!"
732  << endl;
733  return 0;
734  }
735 
736  return theNumberOfSamps;
737 }

◆ getOutputScalarType()

ossimScalarType ossimElevImageSource::getOutputScalarType ( ) const
virtual

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 665 of file ossimElevImageSource.cpp.

References OSSIM_FLOAT.

666 {
667  return OSSIM_FLOAT;
668 }
32 bit floating point

◆ getTiePoint()

virtual ossimGpt ossimElevImageSource::getTiePoint ( ) const
inlinevirtual

Definition at line 115 of file ossimElevImageSource.h.

References theTiePoint.

115 { return theTiePoint; }

◆ getTile()

ossimRefPtr< ossimImageData > ossimElevImageSource::getTile ( const ossimIrect rect,
ossim_uint32  resLevel = 0 
)
virtual

Returns a pointer to a tile given an origin representing the upper left corner of the tile to grab from the image. Satisfies pure virtual from TileSource class.

Reimplemented from ossimImageSource.

Definition at line 112 of file ossimElevImageSource.cpp.

References ossimIrect::clipToRect(), ossimIrect::completely_within(), ossimRefPtr< T >::get(), ossimImageData::getBuf(), ossimImageData::getHeight(), ossimElevSource::getHeightAboveMSL(), getImageRectangle(), ossimElevSource::getMaxHeightAboveMSL(), ossimElevSource::getMinHeightAboveMSL(), ossimImageData::getWidth(), ossimIrect::height(), ossimImageData::initialize(), ossimIrect::intersects(), ossimSource::isSourceEnabled(), ossimGpt::latd(), ossimGpt::lond(), ossimIrect::lr(), ossimImageData::makeBlank(), ossimImageData::setHeight(), ossimImageData::setMaxPix(), ossimImageData::setMinPix(), ossimImageData::setOrigin(), ossimImageData::setWidth(), theElevManager, theLatSpacing, theLonSpacing, theTiePoint, theTile, ossimIrect::ul(), ossimImageData::validate(), ossimIrect::width(), ossimIpt::x, and ossimIpt::y.

115 {
116  if (!theTile.get())
117  {
118  return theTile;
119  }
120 
121  // First make sure our tile is the right size.
122  ossim_int32 w = tile_rect.width();
123  ossim_int32 h = tile_rect.height();
124  ossim_int32 tileW = theTile->getWidth();
125  ossim_int32 tileH = theTile->getHeight();
126  if( (w != tileW) || (h != tileH) )
127  {
128  theTile->setWidth(w);
129  theTile->setHeight(h);
130  if((w*h)!=(tileW*tileH))
131  {
132  theTile->initialize();
133 
134  //***
135  // Initialize can reset the min max to defaults if the min happens
136  // to be "0" so reset it just in case.
137  // NOTE: We need to fix initialize!
138  //***
141  }
142  }
143 
144  // Set the origin.
145  theTile->setOrigin(tile_rect.ul());
146 
147 
148  if(!isSourceEnabled())
149  {
150  // This tile source bypassed.
151  theTile->makeBlank();
152  return theTile;
153  }
154 
155  //***
156  // No overview support yet...
157  //***
158  if (resLevel)
159  {
160  // NOTE: Need to add overview support.
161  cerr << "ossimElevImageSource::getTile ERROR:\nOverviews not supported!"
162  << endl;
163  theTile->makeBlank();
164  return theTile;
165  }
166 
167  ossimIrect image_rect = getImageRectangle(0);
168 
169  if ( !tile_rect.intersects(image_rect) )
170  {
171  // No point in the tile falls within the set boundaries of this source.
172  theTile->makeBlank();
173  return theTile;
174  }
175 
176  // Ok fill the tile with the data from the post...
177  ossimIrect clip_rect = tile_rect.clipToRect(image_rect);
178 
179  if ( !tile_rect.completely_within(clip_rect) )
180  {
181  // Start with a blank tile since it won't be filled all the way.
182  theTile->makeBlank();
183  }
184 
185 
186  // Move the buffer pointer to the first valid pixel.
187  ossim_uint32 tile_width = theTile->getWidth();
188 
189  ossim_int32 start_offset = (clip_rect.lr().y - tile_rect.ul().y) * tile_width +
190  clip_rect.ul().x - tile_rect.ul().x;
191 
192  //***
193  // Since most elevation formats have posts organized positive line up,
194  // start at the lower left side of the cell so all reads are going
195  // forward in the file.
196  //***
197  double start_lat = theTiePoint.latd() - theLatSpacing *
198  (clip_rect.lr().y - image_rect.ul().y);
199  if (start_lat < -90.0)
200  {
201  start_lat = -(start_lat + 180.0); // Wrapped around the south poll.
202  }
203 
204  double lon = theTiePoint.lond() + theLonSpacing *
205  (clip_rect.ul().x - image_rect.ul().x);
206  if (lon > 180.0)
207  {
208  lon -= 360.0; // Went across the central meridian.
209  }
210 
211  // Copy the data.
212  ossim_uint32 clipHeight = clip_rect.height();
213  ossim_uint32 clipWidth = clip_rect.width();
214 
215  // Get a pointer to the tile buffer.
216  ossim_float32* buf = static_cast<ossim_float32*>(theTile->getBuf());
217 
218  for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
219  {
220  double lat = start_lat;
221  ossim_int32 offset = start_offset;
222  for (ossim_uint32 line = 0; line < clipHeight; ++line)
223  {
224  ossimGpt gpt(lat, lon);
225  buf[offset+sample] = theElevManager->getHeightAboveMSL(gpt);
226 
227  lat += theLatSpacing;
228  if (lat > 90) lat = 180.0 - lat;
229 
230  offset -= tile_width;
231  }
232 
233  lon += theLonSpacing;
234  if (lon > 180.0) lon = lon - 360.0; // Went across the central meridian.
235  }
236 
237 #if 0
238  for (ossim_uint32 line = 0; line < clipHeight; ++line)
239  {
240  double lon = start_lon;
241  for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
242  {
243  ossimGpt gpt(lat, lon);
244  buf[sample] = theElevManager->getHeightAboveMSL(gpt);
245  lon += theLonSpacing;
246  if (start_lon > 180.0)
247  {
248  start_lon -= 360.0; // Went across the central meridian.
249  }
250  }
251 
252  buf += tile_width;
253  lat -= theLatSpacing;
254  if (lat < -90.0) lat = -(lat + 180.0);// Wrapped around the south poll.
255  }
256 #endif
257 
258  theTile->validate();
259  return theTile;
260 }
virtual ossim_uint32 getWidth() const
virtual bool isSourceEnabled() const
Definition: ossimSource.cpp:79
virtual double getHeightAboveMSL(const ossimGpt &)=0
Height access methods:
ossimRefPtr< ossimImageData > theTile
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
float ossim_float32
ossim_uint32 height() const
Definition: ossimIrect.h:487
const ossimIpt & ul() const
Definition: ossimIrect.h:274
virtual ossim_uint32 getHeight() const
virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level=0) const
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
virtual void initialize()
Initialize the data buffer.
virtual void setHeight(ossim_uint32 height)
virtual ossimDataObjectStatus validate() const
ossimElevSource * theElevManager
unsigned int ossim_uint32
virtual void setWidth(ossim_uint32 width)
const ossimIpt & lr() const
Definition: ossimIrect.h:276
ossim_uint32 width() const
Definition: ossimIrect.h:500
ossimIrect clipToRect(const ossimIrect &rect) const
Definition: ossimIrect.cpp:501
virtual double getMinHeightAboveMSL() const
Access methods for the bounding elevations:
virtual void setOrigin(const ossimIpt &origin)
virtual void makeBlank()
Initializes data to null pixel values.
virtual void setMaxPix(ossim_float64 max_pix)
virtual double getMaxHeightAboveMSL() const
ossim_int32 y
Definition: ossimIpt.h:142
virtual const void * getBuf() const
ossim_int32 x
Definition: ossimIpt.h:141
virtual void setMinPix(ossim_float64 min_pix)
int ossim_int32

◆ getTileHeight()

ossim_uint32 ossimElevImageSource::getTileHeight ( ) const
virtual

Returns the default processing tile height.

Reimplemented from ossimImageSource.

Definition at line 677 of file ossimElevImageSource.cpp.

References ossimRefPtr< T >::get(), ossimImageData::getHeight(), and theTile.

678 {
679  if (theTile.get()) return theTile->getHeight();
680 
681  return 0;
682 }
ossimRefPtr< ossimImageData > theTile
virtual ossim_uint32 getHeight() const

◆ getTileWidth()

ossim_uint32 ossimElevImageSource::getTileWidth ( ) const
virtual

Returns the default processing tile width.

Reimplemented from ossimImageSource.

Definition at line 670 of file ossimElevImageSource.cpp.

References ossimRefPtr< T >::get(), ossimImageData::getWidth(), and theTile.

671 {
672  if (theTile.get()) return theTile->getWidth();
673 
674  return 0;
675 }
virtual ossim_uint32 getWidth() const
ossimRefPtr< ossimImageData > theTile

◆ initialize()

void ossimElevImageSource::initialize ( )
virtual

Implements ossimImageSource.

Definition at line 494 of file ossimElevImageSource.cpp.

Referenced by ossimElevImageSource().

495 {
496  static const char MODULE[] = "ossimElevImageSource::initialize";
497 
498  if (traceDebug()) CLOG << " Entered..." << endl;
499 
500  //***
501  // First see if the manager pointer has been captured.
502  //***
504 
505  if (!theElevManager)
506  {
507  setErrorStatus();
508  cerr << MODULE << "ERROR:\nNULL elevation manager pointer!"
509  << "\nObject not initialized!" << endl;
510  return;
511  }
512 
513  // Basic sanity checks.
514  if (!theLatSpacing || !theLonSpacing ||
516  {
517  setErrorStatus();
518  cerr << MODULE << "ERROR:"
519  << "\nMust set latitude/longitude spacing and number of line and"
520  << " samples."
521  << "Object not initialized!" << endl;
522  return;
523 
524  }
525 
526  // Check the ground point.
527  if ( theTiePoint.latd() > 90.0 || theTiePoint.latd() < -90.0 ||
528  theTiePoint.lond() > 180.0 || theTiePoint.lond() < -180.0 )
529  {
530  setErrorStatus();
531  cerr << MODULE << "ERROR:\nBogus tie point."
532  << "\nObject not initialized!" << endl;
533  return;
534  }
535 
536  if (traceDebug())
537  {
538  CLOG << "DEBUG:"
539  << "\nTie point: " << theTiePoint
540  << "\nLatitude spacing: " << theLatSpacing
541  << "\nLongitude spacing: " << theLonSpacing
542  << "\nLines: " << theNumberOfLines
543  << "\nSamples: " << theNumberOfSamps
544  << endl;
545  }
546 
547  //***
548  // Since this will return float data we need to set the min / max values
549  // of the data so that anybody who remaps it to eight bit will do it
550  // properly. So scan the entire image rectangle using the manager.
551  // This will do two things, force the elevation manager to load all the
552  // cells, and at the same time the min / max elevation value will be set.
553  // NOTE:
554  // ??? Should the elevation manager clear the list of sources prior to
555  // the code segment so that the min / max is only from the cells we
556  // need!
557  //***
558 
559  cout << "Initializing elevation manager..." << endl;
560 
561 #if 0
562  // Loop in the longitude or sample direction.
563  time_t start_t = time(NULL);
564  double lon = theTiePoint.lond();
565  for (ossim_uint32 samp = 0; samp < theNumberOfSamps; ++samp)
566  {
567  double lat = theTiePoint.latd() - theLatSpacing * (theNumberOfLines - 1);
568  if (lat < -90.0) lat = -(lat + 180.0); // Wrapped around the south poll.
569 
570  for (ossim_uint32 line = 0; line < theNumberOfLines; ++line)
571  {
572  ossimGpt gpt(lat, lon);
574 
575  lat += theLatSpacing;
576  if (lat > 90) lat = 180 - lat; // Went across poll.
577  }
578 
579  lon += theLonSpacing;
580  if (lon > 180.0) lon -= 360.0; // Went across the central meridian.
581  }
582  time_t stop_t = time(NULL);
583  cout << "Finished loop two..." << endl;
584  cout << "Elapsed time for loop two: " << (stop_t - start_t) << endl;
585 #endif
586 
587  theTile = new ossimImageData(this,
588  OSSIM_FLOAT);
589  theTile->initialize();
590 
591  // Set the min / max for any normalization down the chain...
594 
595  if (traceDebug())
596  {
597  CLOG << "DEBUG:"
598  << "\nMin pix: " << theTile->getMinPix(0)
599  << "\nMax pix: " << theTile->getMaxPix(0)
600  << endl;
601  }
602 }
virtual double getHeightAboveMSL(const ossimGpt &)=0
Height access methods:
virtual const ossim_float64 * getMaxPix() const
#define CLOG
Definition: ossimTrace.h:23
ossimRefPtr< ossimImageData > theTile
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
static ossimElevManager * instance()
METHOD: instance() Implements singelton pattern.
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
virtual void initialize()
Initialize the data buffer.
ossimElevSource * theElevManager
unsigned int ossim_uint32
virtual double getMinHeightAboveMSL() const
Access methods for the bounding elevations:
virtual const ossim_float64 * getMinPix() const
virtual void setMaxPix(ossim_float64 max_pix)
virtual double getMaxHeightAboveMSL() const
32 bit floating point
virtual void setMinPix(ossim_float64 min_pix)

◆ loadState()

bool ossimElevImageSource::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 ossimImageSource.

Definition at line 324 of file ossimElevImageSource.cpp.

References ossimKeywordlist::find(), ossimErrorStatusInterface::getErrorStatus(), ossimGpt::latd(), ossimImageSource::loadState(), ossimErrorCodes::OSSIM_ERROR, theTiePoint, and ossimKeywordNames::TIE_POINT_LAT_KW.

Referenced by ossimElevImageSource().

326 {
327  static const char MODULE[] = "ossimElevImageSource::loadState";
328 
330  {
331  cerr << MODULE
332  << " ERROR detected in keyword list! State not load."
333  << endl;
334  return false;
335  }
336 
337  // Base class...
338  ossimImageSource::loadState(kwl, prefix);
339 
340  const char* lookup;
341 
342  // Get the tie point.
343  lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LAT_KW);
344  if (lookup)
345  {
346  theTiePoint.latd(ossimString(lookup).toDouble());
347  }
348  else
349  {
350  if (traceDebug())
351  {
352  CLOG << "DEBUG:"
353  << "\nRequired keyword not found: "
355  << "\nReturning false"
356  << endl;
357  }
358 
359  return false;
360  }
361 
362  lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LON_KW);
363  if (lookup)
364  {
365  theTiePoint.lond(ossimString(lookup).toDouble());
366  }
367  else
368  {
369  if (traceDebug())
370  {
371  CLOG << "DEBUG:"
372  << "\nRequired keyword not found: "
374  << "\nReturning false"
375  << endl;
376  }
377 
378  return false;
379  }
380 
381  // Get the post spacing.
383  if (lookup)
384  {
385  theLatSpacing = ossimString(lookup).toDouble();
386  }
387  else
388  {
389  if (traceDebug())
390  {
391  CLOG << "DEBUG:"
392  << "\nRequired keyword not found: "
394  << "\nReturning false"
395  << endl;
396  }
397 
398  return false;
399  }
400 
402  if (lookup)
403  {
404  theLonSpacing = ossimString(lookup).toDouble();
405  }
406  else
407  {
408  if (traceDebug())
409  {
410  CLOG << "DEBUG:"
411  << "\nRequired keyword not found: "
413  << "\nReturning false"
414  << endl;
415  }
416 
417  return false;
418  }
419 
420  // Get the image size.
421  lookup = kwl.find(prefix, ossimKeywordNames::NUMBER_LINES_KW);
422  if (lookup)
423  {
425  }
426  else
427  {
428  if (traceDebug())
429  {
430  CLOG << "DEBUG:"
431  << "\nRequired keyword not found: "
433  << "\nReturning false"
434  << endl;
435  }
436 
437  return false;
438  }
439 
440  lookup = kwl.find(prefix, ossimKeywordNames::NUMBER_SAMPLES_KW);
441  if (lookup)
442  {
444  }
445  else
446  {
447  if (traceDebug())
448  {
449  CLOG << "DEBUG:"
450  << "\nRequired keyword not found: "
452  << "\nReturning false"
453  << endl;
454  }
455 
456  return false;
457  }
458 
459  initialize();
460 
461  //***
462  // See if the min / max keyword was set and reset it.
463  // Note this must be done after initialize since it sets the min / max from
464  // the elevation manager.
465  //***
466  lookup = kwl.find(prefix, ossimKeywordNames::MIN_VALUE_KW);
467  if (lookup)
468  {
469  setMinPixelValue(ossimString(lookup).toDouble());
470  }
471  lookup = kwl.find(prefix, ossimKeywordNames::MAX_VALUE_KW);
472  if (lookup)
473  {
474  setMaxPixelValue(ossimString(lookup).toDouble());
475  }
476 
478  {
479  return false;
480  }
481 
482  //***
483  // Reset the base class to have a fixed input list of "0" size.
484  // Note: To not do this will result in a core dump destroying objects
485  // connected to this output.
486  //***
487  theInputObjectList.clear();
489  theOutputListIsFixedFlag = false;
490 
491  return true;
492 }
static const char * MIN_VALUE_KW
static const char * DECIMAL_DEGREES_PER_PIXEL_LAT
#define CLOG
Definition: ossimTrace.h:23
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
static const ossimErrorCode OSSIM_OK
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
static const char * MAX_VALUE_KW
static const char * NUMBER_LINES_KW
static const char * TIE_POINT_LON_KW
static const ossimErrorCode OSSIM_ERROR
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
double toDouble() const
unsigned long toULong() const
static const char * DECIMAL_DEGREES_PER_PIXEL_LON
ConnectableObjectList theInputObjectList
Holds a list of input objects.
virtual void setMaxPixelValue(ossim_float64 max_pix)
virtual ossimErrorCode getErrorStatus() const
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.
static const char * TIE_POINT_LAT_KW
bool theOutputListIsFixedFlag
Indicates whether the theOutputObjectList is fixed.
virtual void setMinPixelValue(ossim_float64 min_pix)
static const char * NUMBER_SAMPLES_KW

◆ saveState()

bool ossimElevImageSource::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 ossimImageSource.

Definition at line 262 of file ossimElevImageSource.cpp.

References ossimKeywordlist::add(), ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT, ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON, ossimErrorStatusInterface::getErrorStatus(), getMaxPixelValue(), getMinPixelValue(), ossimGpt::latd(), ossimGpt::lond(), ossimKeywordNames::MAX_VALUE_KW, ossimKeywordNames::MIN_VALUE_KW, ossimKeywordNames::NUMBER_LINES_KW, ossimKeywordNames::NUMBER_SAMPLES_KW, ossimErrorCodes::OSSIM_ERROR, ossimImageSource::saveState(), theLatSpacing, theLonSpacing, theNumberOfLines, theNumberOfSamps, theTiePoint, ossimKeywordNames::TIE_POINT_LAT_KW, and ossimKeywordNames::TIE_POINT_LON_KW.

264 {
265  static const char MODULE[] = "ossimElevImageSource::saveState";
266 
268  {
269  cerr << MODULE
270  << " ERROR detected in keyword list! State not saved."
271  << endl;
272  return false;
273  }
274 
275  // Save the state of the base class.
276  ossimImageSource::saveState(kwl, prefix);
277 
278  // Save the tie point.
279  kwl.add(prefix,
281  theTiePoint.latd(),
282  true);
283  kwl.add(prefix,
285  theTiePoint.lond(),
286  true);
287 
288  // Save the post spacing.
289  kwl.add(prefix,
292  true);
293  kwl.add(prefix,
296  true);
297 
298  // Save the image size
299  kwl.add(prefix,
302  true);
303  kwl.add(prefix,
306  true);
307 
308  // Save the min / max pixel values.
309  kwl.add(prefix,
311  getMinPixelValue(0),
312  true);
313  kwl.add(prefix,
315  getMaxPixelValue(0),
316  true);
317 
318  return true;
319 }
static const char * MIN_VALUE_KW
static const char * DECIMAL_DEGREES_PER_PIXEL_LAT
virtual double getMinPixelValue(ossim_uint32 band=0) const
Returns the min pixel of the band.
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
static const char * MAX_VALUE_KW
static const char * NUMBER_LINES_KW
static const char * TIE_POINT_LON_KW
static const ossimErrorCode OSSIM_ERROR
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
static const char * DECIMAL_DEGREES_PER_PIXEL_LON
virtual ossimErrorCode getErrorStatus() const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
static const char * TIE_POINT_LAT_KW
static const char * NUMBER_SAMPLES_KW

◆ setLatitudeSpacing()

virtual void ossimElevImageSource::setLatitudeSpacing ( ossim_float64  sp)
inlinevirtual

Definition at line 125 of file ossimElevImageSource.h.

References theLatSpacing.

125 { theLatSpacing = sp; }

◆ setLongitudeSpacing()

virtual void ossimElevImageSource::setLongitudeSpacing ( ossim_float64  sp)
inlinevirtual

Definition at line 126 of file ossimElevImageSource.h.

References theLonSpacing.

126 { theLonSpacing = sp; }

◆ setMaxPixelValue()

void ossimElevImageSource::setMaxPixelValue ( ossim_float64  max_pix)
virtual

Definition at line 803 of file ossimElevImageSource.cpp.

References ossimRefPtr< T >::get(), ossimImageData::setMaxPix(), and theTile.

804 {
805  if (theTile.get())
806  {
807  theTile->setMaxPix(max_pix, 0);
808  if (traceDebug())
809  {
810  cout << "ossimElevImageSource::setMaxPixelValue DEBUG:"
811  << "\nMax pixel value: " << max_pix
812  << endl;
813  }
814  }
815  else
816  {
817  cerr << "ossimElevImageSource::setMinPixelValue ERROR:"
818  << "\nObject not initialized!"
819  << endl;
820  }
821 }
ossimRefPtr< ossimImageData > theTile
virtual void setMaxPix(ossim_float64 max_pix)

◆ setMinPixelValue()

void ossimElevImageSource::setMinPixelValue ( ossim_float64  min_pix)
virtual

Definition at line 783 of file ossimElevImageSource.cpp.

References ossimRefPtr< T >::get(), ossimImageData::setMinPix(), and theTile.

784 {
785  if (theTile.get())
786  {
787  theTile->setMinPix(min_pix, 0);
788  if (traceDebug())
789  {
790  cout << "ossimElevImageSource::setMinPixelValue DEBUG:"
791  << "\nMin pixel value: " << min_pix
792  << endl;
793  }
794  }
795  else
796  {
797  cerr << "ossimElevImageSource::setMinPixelValue ERROR:"
798  << "\nObject not initialized!"
799  << endl;
800  }
801 }
ossimRefPtr< ossimImageData > theTile
virtual void setMinPix(ossim_float64 min_pix)

◆ setNumberOfLines()

virtual void ossimElevImageSource::setNumberOfLines ( ossim_uint32  lines)
inlinevirtual

Definition at line 127 of file ossimElevImageSource.h.

References theNumberOfLines.

127 { theNumberOfLines = lines; }

◆ setNumberOfSamples()

virtual void ossimElevImageSource::setNumberOfSamples ( ossim_uint32  samps)
inlinevirtual

Definition at line 128 of file ossimElevImageSource.h.

References theNumberOfSamps.

128 { theNumberOfSamps = samps;}

◆ setTiePoint()

virtual void ossimElevImageSource::setTiePoint ( const ossimGpt gpt)
inlinevirtual

Definition at line 124 of file ossimElevImageSource.h.

References theTiePoint.

124 { theTiePoint = gpt; }

Member Data Documentation

◆ theElevManager

ossimElevSource* ossimElevImageSource::theElevManager
protected

Definition at line 135 of file ossimElevImageSource.h.

Referenced by getMaxPixelValue(), getMinPixelValue(), and getTile().

◆ theLatSpacing

ossim_float64 ossimElevImageSource::theLatSpacing
protected

◆ theLonSpacing

ossim_float64 ossimElevImageSource::theLonSpacing
protected

◆ theNumberOfLines

ossim_uint32 ossimElevImageSource::theNumberOfLines
protected

◆ theNumberOfSamps

ossim_uint32 ossimElevImageSource::theNumberOfSamps
protected

◆ theTiePoint

ossimGpt ossimElevImageSource::theTiePoint
protected

◆ theTile

ossimRefPtr<ossimImageData> ossimElevImageSource::theTile
protected

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