Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
eb66d4bc
Commit
eb66d4bc
authored
14 years ago
by
Patrick Imbo
Browse files
Options
Downloads
Patches
Plain Diff
ENH: add DEMFunction and suppress DEMHandler in SensorModelBase
parent
a4f1602b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Projections/otbSensorModelBase.h
+21
-8
21 additions, 8 deletions
Code/Projections/otbSensorModelBase.h
Code/Projections/otbSensorModelBase.txx
+0
-4
0 additions, 4 deletions
Code/Projections/otbSensorModelBase.txx
with
21 additions
and
12 deletions
Code/Projections/otbSensorModelBase.h
+
21
−
8
View file @
eb66d4bc
...
...
@@ -22,7 +22,9 @@
#include
"otbMacro.h"
#include
"otbImageKeywordlist.h"
#include
"otbDEMHandler.h"
#include
"itkFunctionBase.h"
#include
"otbElevDatabaseHeightAboveMSLFunction.h"
#include
"projection/ossimProjection.h"
...
...
@@ -51,18 +53,22 @@ class ITK_EXPORT SensorModelBase : public itk::Transform<TScalarType,
public:
/** Standard class typedefs. */
typedef
SensorModelBase
Self
;
typedef
SensorModelBase
Self
;
typedef
itk
::
Transform
<
TScalarType
,
NInputDimensions
,
NOutputDimensions
>
Superclass
;
NOutputDimensions
>
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
typedef
itk
::
Point
<
TScalarType
,
NInputDimensions
>
InputPointType
;
typedef
itk
::
Point
<
TScalarType
,
NOutputDimensions
>
OutputPointType
;
typedef
DEMHandler
DEMHandlerType
;
typedef
typename
DEMHandlerType
::
Pointer
DEMHandlerPointerType
;
typedef
TScalarType
PixelType
;
typedef
itk
::
FunctionBase
<
OutputPointType
,
PixelType
>
DEMFunctionBaseType
;
typedef
typename
DEMFunctionBaseType
::
Pointer
DEMFunctionBasePointer
;
typedef
otb
::
ElevDatabaseHeightAboveMSLFunction
<
PixelType
,
typename
OutputPointType
::
ValueType
>
SRTMFunctionType
;
/** Method for creation through the object factory. */
itkNewMacro
(
Self
);
...
...
@@ -90,9 +96,16 @@ public:
itkSetMacro
(
AverageElevation
,
TScalarType
);
itkGetMacro
(
AverageElevation
,
TScalarType
);
/** Set/Get the DEM Function. */
itkSetObjectMacro
(
DEMFunction
,
DEMFunctionBaseType
);
itkGetConstObjectMacro
(
DEMFunction
,
DEMFunctionBaseType
);
virtual
void
SetDEMDirectory
(
const
std
::
string
&
directory
)
{
m_DEMHandler
->
OpenDEMDirectory
(
directory
.
c_str
());
typename
SRTMFunctionType
::
Pointer
srtmFunction
=
SRTMFunctionType
::
New
();
srtmFunction
->
OpenDEMDirectory
(
directory
);
this
->
SetDEMFunction
(
srtmFunction
.
GetPointer
()
);
m_DEMIsLoaded
=
true
;
this
->
EnableDEM
();
}
...
...
@@ -127,8 +140,8 @@ protected:
/** Specify if DEM is used in Point Transformation */
bool
m_UseDEM
;
/**
Object that read and use
DEM */
DEM
Handler
Pointer
Type
m_DEM
Handler
;
/**
DEM Function : evaluate the height value from a
DEM */
DEM
FunctionBase
Pointer
m_DEM
Function
;
/** Specify an average elevation to use */
TScalarType
m_AverageElevation
;
...
...
This diff is collapsed.
Click to expand it.
Code/Projections/otbSensorModelBase.txx
+
0
−
4
View file @
eb66d4bc
...
...
@@ -40,13 +40,9 @@ SensorModelBase<TScalarType, NInputDimensions, NOutputDimensions>
::SensorModelBase() : Superclass(OutputSpaceDimension, 0)
{
m_Model = NULL;
m_DEMHandler = DEMHandlerType::New();
m_UseDEM = false;
m_DEMIsLoaded = false;
m_AverageElevation = 0.0;
// Ensure that Elev manager never returns default nan value
m_DEMHandler->SetDefaultHeightAboveEllipsoid(0.);
}
template <class TScalarType,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment