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
87c44f6e
Commit
87c44f6e
authored
16 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Patches
Plain Diff
ENH: add skeleton for otbGeocentricTransform
parent
f7b443e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Projections/otbGeocentricTransform.h
+87
-0
87 additions, 0 deletions
Code/Projections/otbGeocentricTransform.h
Code/Projections/otbGeocentricTransform.txx
+57
-0
57 additions, 0 deletions
Code/Projections/otbGeocentricTransform.txx
with
144 additions
and
0 deletions
Code/Projections/otbGeocentricTransform.h
0 → 100644
+
87
−
0
View file @
87c44f6e
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbGeocentricTransform_h
#define __otbGeocentricTransform_h
#include
"itkTransform.h"
#include
"otbGenericMapProjection.h"
#include
"base/ossimEllipsoid.h"
namespace
otb
{
template
<
InverseOrForwardTransformationEnum
TDirectionOfMapping
,
class
TScalarType
=
double
,
unsigned
int
NInputDimensions
=
3
,
unsigned
int
NOutputDimensions
=
3
>
class
ITK_EXPORT
GeocentricTransform
:
public
itk
::
Transform
<
TScalarType
,
// Data type for scalars
NInputDimensions
,
// Number of dimensions in the input space
NOutputDimensions
>
// Number of dimensions in the output space
{
public
:
/** Standard class typedefs. */
typedef
itk
::
Transform
<
TScalarType
,
NInputDimensions
,
NOutputDimensions
>
Superclass
;
typedef
GeocentricTransform
Self
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
typedef
typename
Superclass
::
ScalarType
ScalarType
;
typedef
ossimProjection
OssimMapProjectionType
;
typedef
itk
::
Point
<
ScalarType
,
NInputDimensions
>
InputPointType
;
typedef
itk
::
Point
<
ScalarType
,
NOutputDimensions
>
OutputPointType
;
/** Method for creation through the object factory. */
itkNewMacro
(
Self
);
/** Run-time type information (and related methods). */
itkTypeMacro
(
GeocentricTransform
,
itk
::
Transform
);
typedef
InverseOrForwardTransformationEnum
DirectionOfMappingEnumType
;
itkStaticConstMacro
(
DirectionOfMapping
,
DirectionOfMappingEnumType
,
TDirectionOfMapping
);
itkStaticConstMacro
(
InputSpaceDimension
,
unsigned
int
,
NInputDimensions
);
itkStaticConstMacro
(
OutputSpaceDimension
,
unsigned
int
,
NOutputDimensions
);
itkStaticConstMacro
(
SpaceDimension
,
unsigned
int
,
NInputDimensions
);
itkStaticConstMacro
(
ParametersDimension
,
unsigned
int
,
NInputDimensions
*
(
NInputDimensions
+
1
));
OutputPointType
TransformPoint
(
const
InputPointType
&
point
)
const
;
protected:
GeocentricTransform
();
virtual
~
GeocentricTransform
();
ossimEllipsoid
*
m_Ellipsoid
;
private
:
GeocentricTransform
(
const
Self
&
);
//purposely not implemented
void
operator
=
(
const
Self
&
);
//purposely not implemented
};
}
// namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include
"otbGeocentricTransform.txx"
#endif
#endif
This diff is collapsed.
Click to expand it.
Code/Projections/otbGeocentricTransform.txx
0 → 100644
+
57
−
0
View file @
87c44f6e
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbGeocentricTransform_txx
#define __otbGeocentricTransform_txx
#include "otbGeocentricTransform.h"
namespace otb
{
template<InverseOrForwardTransformationEnum TransformDirection, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
GeocentricTransform<TransformDirection, TScalarType, NInputDimensions, NOutputDimensions>
::GeocentricTransform() : Superclass(SpaceDimension,ParametersDimension)
{
m_Ellipsoid = new ossimEllipsoid();
}
template<InverseOrForwardTransformationEnum TransformDirection, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
GeocentricTransform<TransformDirection, TScalarType, NInputDimensions, NOutputDimensions>
::~GeocentricTransform()
{
if (m_Ellipsoid != NULL)
{
delete m_Ellipsoid;
}
}
template<InverseOrForwardTransformationEnum TransformDirection, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
typename GeocentricTransform<TransformDirection, TScalarType, NInputDimensions, NOutputDimensions>::OutputPointType
GeocentricTransform<TransformDirection, TScalarType, NInputDimensions, NOutputDimensions>
::TransformPoint(const InputPointType & point) const
{
OutputPointType outputPoint;
//To be completed
return outputPoint;
}
} // namespace otb
#endif
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