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
5c6991f2
Commit
5c6991f2
authored
16 years ago
by
Cyrille Valladeau
Browse files
Options
Downloads
Patches
Plain Diff
OUPS : wrong commit, sorry
parent
90f9f683
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/otbOrthoRectificationFilter.h
+83
-84
83 additions, 84 deletions
Code/Projections/otbOrthoRectificationFilter.h
Testing/Code/Projections/otbOrthoRectificationFilter.cxx
+2
-2
2 additions, 2 deletions
Testing/Code/Projections/otbOrthoRectificationFilter.cxx
with
85 additions
and
86 deletions
Code/Projections/otbOrthoRectificationFilter.h
+
83
−
84
View file @
5c6991f2
...
...
@@ -43,117 +43,116 @@ namespace otb
*
*/
template
<
class
TInputImage
,
class
TOutputImage
,
class
TMapProjection
,
class
TInterpolatorPrecision
=
double
>
class
ITK_EXPORT
OrthoRectificationFilter
:
public
StreamingResampleImageFilter
<
TInputImage
,
TOutputImage
,
TInterpolatorPrecision
>
{
public
:
/** Standard class typedefs */
typedef
StreamingResampleImageFilter
<
TInputImage
,
TOutputImage
,
TInterpolatorPrecision
>
Superclass
;
typedef
OrthoRectificationFilter
Self
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
typedef
typename
TInputImage
::
IndexType
IndexType
;
typedef
typename
TInputImage
::
SizeType
SizeType
;
typedef
typename
TInputImage
::
SpacingType
SpacingType
;
typedef
typename
TInputImage
::
PointType
PointType
;
typedef
typename
TInputImage
::
RegionType
RegionType
;
template
<
class
TInputImage
,
class
TOutputImage
,
class
TMapProjection
,
class
TInterpolatorPrecision
=
double
>
class
ITK_EXPORT
OrthoRectificationFilter
:
public
StreamingResampleImageFilter
<
TInputImage
,
TOutputImage
,
TInterpolatorPrecision
>
{
public
:
/** Standard class typedefs */
typedef
StreamingResampleImageFilter
<
TInputImage
,
TOutputImage
,
TInterpolatorPrecision
>
Superclass
;
typedef
OrthoRectificationFilter
Self
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
typedef
typename
TOutputImage
::
PixelType
OutputPixelType
;
typedef
typename
TInputImage
::
IndexType
IndexType
;
typedef
typename
TInputImage
::
SizeType
SizeType
;
typedef
typename
TInputImage
::
SpacingType
SpacingType
;
typedef
typename
TInputImage
::
PointType
PointType
;
typedef
typename
TInputImage
::
RegionType
RegionType
;
typedef
TMapProjection
MapProjectionType
;
typedef
typename
TMapProjection
::
Pointer
MapProjectionPointerType
;
typedef
typename
TOutputImage
::
PixelType
OutputPixelType
;
typedef
InverseSensorModel
<
double
>
SensorModel
Type
;
typedef
typename
SensorModelType
::
Pointer
SensorModel
PointerType
;
typedef
TMapProjection
MapProjection
Type
;
typedef
typename
TMapProjection
::
Pointer
MapProjection
PointerType
;
typedef
CompositeTransform
<
MapProjectionType
,
SensorModelType
>
CompositeTra
ns
f
or
m
Type
;
typedef
typename
CompositeTra
ns
f
or
m
Type
::
Pointer
CompositeTra
ns
f
or
m
PointerType
;
typedef
InverseSensorModel
<
double
>
Se
nsor
Model
Type
;
typedef
typename
Se
nsor
Model
Type
::
Pointer
Se
nsor
Model
PointerType
;
/** Method for creation through the object factory. */
itkNewMacro
(
Self
)
;
typedef
CompositeTransform
<
MapProjectionType
,
SensorModelType
>
CompositeTransformType
;
typedef
typename
CompositeTransformType
::
Pointer
CompositeTransformPointerType
;
/**
Run-time type information (and related methods)
. */
itk
Type
Macro
(
OrthoRectificationFilter
,
StreamingResampleImageFilter
);
/**
Method for creation through the object factory
. */
itk
New
Macro
(
Self
);
/** Accessors */
virtual
void
SetMapProjection
(
MapProjectionType
*
_arg
)
{
if
(
this
->
m_MapProjection
!=
_arg
)
{
this
->
m_MapProjection
=
_arg
;
m_CompositeTransform
->
SetFirstTransform
(
_arg
);
m_IsComputed
=
false
;
this
->
Modified
();
}
}
/** Run-time type information (and related methods). */
itkTypeMacro
(
OrthoRectificationFilter
,
StreamingResampleImageFilter
);
itkGetObjectMacro
(
MapProjection
,
MapProjectionType
);
/** Specify where are DEM files, and load useful ones */
virtual
void
SetDEMDirectory
(
const
std
::
string
&
directory
)
/** Accessors */
virtual
void
SetMapProjection
(
MapProjectionType
*
_arg
)
{
if
(
this
->
m_MapProjection
!=
_arg
)
{
m_SensorModel
->
SetDEMDirectory
(
directory
);
this
->
Modified
();
this
->
m_MapProjection
=
_arg
;
m_CompositeTransform
->
SetFirstTransform
(
_arg
);
m_IsComputed
=
false
;
this
->
Modified
();
}
}
/** Methods to enable DEM */
virtual
void
EnableDEM
()
{
m_SensorModel
->
EnableDEM
();
this
->
Modified
();
}
itkGetObjectMacro
(
MapProjection
,
MapProjectionType
);
/**
Methods to desable DEM
*/
virtual
void
DisableDEM
(
)
{
m_SensorModel
->
DisableDEM
(
);
this
->
Modified
();
}
/**
Specify where are DEM files, and load useful ones
*/
virtual
void
SetDEMDirectory
(
const
std
::
string
&
directory
)
{
m_SensorModel
->
SetDEMDirectory
(
directory
);
this
->
Modified
();
}
/** Methods to enable DEM */
virtual
void
EnableDEM
()
{
m_SensorModel
->
EnableDEM
();
this
->
Modified
();
}
/**
Specify average elevation.
*/
virtual
void
SetAverageElevation
(
double
elevation
)
{
m_SensorModel
->
SetAverageElevation
(
elevation
);
this
->
Modified
();
}
/**
Methods to desable DEM
*/
virtual
void
DisableDEM
(
)
{
m_SensorModel
->
DisableDEM
(
);
this
->
Modified
();
}
/** Specify average elevation.*/
virtual
void
SetAverageElevation
(
double
elevation
)
{
m_SensorModel
->
SetAverageElevation
(
elevation
);
this
->
Modified
();
}
protected
:
OrthoRectificationFilter
();
~
OrthoRectificationFilter
();
void
PrintSelf
(
std
::
ostream
&
os
,
itk
::
Indent
indent
)
const
;
virtual
void
GenerateInputRequestedRegion
();
virtual
void
GenerateOutputInformation
(
void
);
protected
:
OrthoRectificationFilter
();
~
OrthoRectificationFilter
();
void
PrintSelf
(
std
::
ostream
&
os
,
itk
::
Indent
indent
)
const
;
virtual
void
GenerateInputRequestedRegion
();
virtual
void
GenerateOutputInformation
(
void
);
private
:
OrthoRectificationFilter
(
const
Self
&
);
//purposely not implemented
void
operator
=
(
const
Self
&
);
//purposely not implemented
private
:
OrthoRectificationFilter
(
const
Self
&
);
//purposely not implemented
void
operator
=
(
const
Self
&
);
//purposely not implemented
/** Calculate transformation model from sensor model and map projection composition */
void
ComputeResampleTransformationModel
();
/** Calculate transformation model from sensor model and map projection composition */
void
ComputeResampleTransformationModel
();
/** Boolean used to know if transformation model computation is needed */
bool
m_IsComputed
;
/** Boolean used to know if transformation model computation is needed */
bool
m_IsComputed
;
/** Sensor Model used to transform geographic coordinates in image sensor index */
SensorModelPointerType
m_SensorModel
;
/** Sensor Model used to transform geographic coordinates in image sensor index */
SensorModelPointerType
m_SensorModel
;
/** Map Projection used to transform cartographic coordinates in geographic coordinates */
MapProjectionPointerType
m_MapProjection
;
/** Map Projection used to transform cartographic coordinates in geographic coordinates */
MapProjectionPointerType
m_MapProjection
;
/** Composite Transform of Sensor Model and Map Projection, used for Resampler */
CompositeTransformPointerType
m_CompositeTransform
;
/** Composite Transform of Sensor Model and Map Projection, used for Resampler */
CompositeTransformPointerType
m_CompositeTransform
;
};
};
}
// namespace otb
...
...
This diff is collapsed.
Click to expand it.
Testing/Code/Projections/otbOrthoRectificationFilter.cxx
+
2
−
2
View file @
5c6991f2
...
...
@@ -96,8 +96,8 @@ int otbOrthoRectificationFilter( int argc, char* argv[] )
orthoRectifFilter
->
SetAverageElevation
(
10
);
writer
->
SetInput
(
orthoRectifFilter
->
GetOutput
());
writer
->
SetTilingStreamDivisions
(
10
);
//
writer->SetTilingStreamDivisions();
writer
->
SetTilingStreamDivisions
();
writer
->
Update
();
...
...
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