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
7d3655a1
Commit
7d3655a1
authored
15 years ago
by
Cyrille Valladeau
Browse files
Options
Downloads
Patches
Plain Diff
ENH : TOAToTOC automatization in progress
parent
3f6dfdf4
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/Radiometry/otbAtmosphericCorrectionParameters.cxx
+11
-0
11 additions, 0 deletions
Code/Radiometry/otbAtmosphericCorrectionParameters.cxx
Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h
+41
-38
41 additions, 38 deletions
...adiometry/otbReflectanceToSurfaceReflectanceImageFilter.h
with
52 additions
and
38 deletions
Code/Radiometry/otbAtmosphericCorrectionParameters.cxx
+
11
−
0
View file @
7d3655a1
...
...
@@ -59,7 +59,18 @@ FilterFunctionValues
AtmosphericCorrectionParameters
::
AtmosphericCorrectionParameters
()
{
m_SolarZenithalAngle
=
361.
;
m_SolarAzimutalAngle
=
361.
;
m_ViewingZenithalAngle
=
361.
;
m_ViewingAzimutalAngle
=
361.
;
m_Month
=
0
;
m_Day
=
0
;
m_AtmosphericPressure
=
1030.
;
m_WaterVaporAmount
=
2.5
;
m_OzoneAmount
=
0.28
;
m_AerosolModel
=
CONTINENTAL
;
m_AerosolOptical
=
0.2
;
}
/**PrintSelf method */
...
...
This diff is collapsed.
Click to expand it.
Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h
+
41
−
38
View file @
7d3655a1
...
...
@@ -23,9 +23,11 @@
#define __otbReflectanceToSurfaceReflectanceImageFilter_h
#include
"otbAtmosphericRadiativeTerms.h"
#include
"otbUnaryImageFunctorWithVectorImageFilter.h"
#include
"otbAtmosphericRadiativeTerms.h"
#include
"otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h"
#include
"itkMetaDataDictionary.h"
namespace
otb
{
...
...
@@ -144,64 +146,65 @@ public:
itkTypeMacro
(
ReflectanceToSurfaceReflectanceImageFilter
,
UnaryImageFunctorWithVectorImageFilter
);
/** Supported images definition. */
typedef
typename
InputImageType
::
PixelType
InputPixelType
;
typedef
typename
InputImageType
::
InternalPixelType
InputInternalPixelType
;
typedef
typename
InputImageType
::
RegionType
InputImageRegionType
;
typedef
typename
OutputImageType
::
PixelType
OutputPixelType
;
typedef
typename
OutputImageType
::
InternalPixelType
OutputInternalPixelType
;
typedef
typename
OutputImageType
::
RegionType
OutputImageRegionType
;
typedef
typename
InputImageType
::
PixelType
InputPixelType
;
typedef
typename
InputImageType
::
InternalPixelType
InputInternalPixelType
;
typedef
typename
InputImageType
::
RegionType
InputImageRegionType
;
typedef
typename
OutputImageType
::
PixelType
OutputPixelType
;
typedef
typename
OutputImageType
::
InternalPixelType
OutputInternalPixelType
;
typedef
typename
OutputImageType
::
RegionType
OutputImageRegionType
;
typedef
AtmosphericRadiativeTerms
::
Pointer
AtmosphericRadiativeTermsPointerType
;
typedef
AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
Parameters2RadiativeTermsType
;
typedef
Parameters2RadiativeTermsType
::
Pointer
Parameters2RadiativeTermsPointerType
;
typedef
AtmosphericCorrectionParameters
::
Pointer
CorrectionParametersPointerType
;
typedef
AtmosphericRadiativeTerms
::
Pointer
AtmosphericRadiativeTermsPointerType
;
typedef
itk
::
MetaDataDictionary
MetaDataDictionaryType
;
/** Get/Set Atmospheric Radiative Terms. */
void
SetAtmosphericRadiativeTerms
(
AtmosphericRadiativeTermsPointerType
atmo
)
{
m_AtmosphericRadiativeTerms
=
atmo
;
this
->
SetNthInput
(
1
,
m_AtmosphericRadiativeTerms
);
m_IsSetAtmosphericRadiativeTerms
=
true
;
this
->
Modified
();
}
AtmosphericRadiativeTermsPointerType
GetAtmosphericRadiativeTerms
()
{
return
m_AtmosphericRadiativeTerms
;
}
/** Get/Set Atmospheric Correction Parameters. */
itkGetConstObjectMacro
(
AtmosphericRadiativeTerms
,
AtmosphericRadiativeTerms
);
itkGetObjectMacro
(
CorrectionParameters
,
AtmosphericCorrectionParameters
);
/** Get/Set Aeronet file name. */
itkSetMacro
(
AeronetFileName
,
std
::
string
);
itkGetMacro
(
AeronetFileName
,
std
::
string
);
protected
:
/** Constructor */
ReflectanceToSurfaceReflectanceImageFilter
()
{
m_AtmosphericRadiativeTerms
=
AtmosphericRadiativeTerms
::
New
();
};
ReflectanceToSurfaceReflectanceImageFilter
();
/** Destructor */
virtual
~
ReflectanceToSurfaceReflectanceImageFilter
()
{};
/** Initialize the functor vector */
void
BeforeThreadedGenerateData
()
{
this
->
GetFunctorVector
().
clear
();
for
(
unsigned
int
i
=
0
;
i
<
this
->
GetInput
()
->
GetNumberOfComponentsPerPixel
();
++
i
)
{
double
coef
;
double
res
;
coef
=
static_cast
<
double
>
(
m_AtmosphericRadiativeTerms
->
GetTotalGaseousTransmission
(
i
)
*
m_AtmosphericRadiativeTerms
->
GetDownwardTransmittance
(
i
)
*
m_AtmosphericRadiativeTerms
->
GetUpwardTransmittance
(
i
)
);
coef
=
1.
/
coef
;
res
=
-
m_AtmosphericRadiativeTerms
->
GetIntrinsicAtmosphericReflectance
(
i
)
*
coef
;
FunctorType
functor
;
functor
.
SetCoefficient
(
coef
);
functor
.
SetResidu
(
res
);
functor
.
SetSphericalAlbedo
(
static_cast
<
double
>
(
m_AtmosphericRadiativeTerms
->
GetSphericalAlbedo
(
i
)));
this
->
GetFunctorVector
().
push_back
(
functor
);
}
}
/** If empty, fill AtmosphericRadiativeTerms using image metadata*/
void
UpdateAtmosphericRadiativeTerms
(
const
MetaDataDictionaryType
dict
);
/** Read the aeronet data and extract aerosol optical and water vapor amount. */
void
UpdateAeronetData
(
const
MetaDataDictionaryType
dict
);
/** Initialize the functor vector */
void
BeforeThreadedGenerateData
();
private
:
AtmosphericRadiativeTermsPointerType
m_AtmosphericRadiativeTerms
;
CorrectionParametersPointerType
m_CorrectionParameters
;
bool
m_IsSetAtmosphericRadiativeTerms
;
/** Path to an Aeronet data file, allows to compute aerosol optical and water vapor amounts. */
std
::
string
m_AeronetFileName
;
};
}
// end namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include
"otbReflectanceToSurfaceReflectanceImageFilter.txx"
#endif
#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