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
cd57a9d1
Commit
cd57a9d1
authored
14 years ago
by
Patrick Imbo
Browse files
Options
Downloads
Patches
Plain Diff
ENH: polarisation information for Noise class
parent
032cac4e
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
Utilities/otbossimplugins/ossim/otb/Noise.cpp
+27
-3
27 additions, 3 deletions
Utilities/otbossimplugins/ossim/otb/Noise.cpp
Utilities/otbossimplugins/ossim/otb/Noise.h
+18
-0
18 additions, 0 deletions
Utilities/otbossimplugins/ossim/otb/Noise.h
with
45 additions
and
3 deletions
Utilities/otbossimplugins/ossim/otb/Noise.cpp
+
27
−
3
View file @
cd57a9d1
...
...
@@ -20,10 +20,12 @@ namespace ossimplugins
{
static
const
char
NOISE
[]
=
"noise"
;
static
const
char
NUMBER_OF_NOISE_RECORDS_KW
[]
=
"numberOfNoiseRecords"
;
static
const
char
NAME_OF_NOISE_POLARISATION_KW
[]
=
"nameOfOfNoisePolarisation"
;
Noise
::
Noise
()
:
_numberOfNoiseRecords
(
0
),
_tabImageNoise
()
_tabImageNoise
(),
_polarisation
(
"UNDEFINED"
)
{
}
...
...
@@ -34,7 +36,8 @@ Noise::~Noise()
Noise
::
Noise
(
const
Noise
&
rhs
)
:
_numberOfNoiseRecords
(
rhs
.
_numberOfNoiseRecords
),
_tabImageNoise
(
rhs
.
_tabImageNoise
)
_tabImageNoise
(
rhs
.
_tabImageNoise
),
_polarisation
(
rhs
.
_polarisation
)
{
}
...
...
@@ -42,6 +45,7 @@ Noise& Noise::operator=(const Noise& rhs)
{
_numberOfNoiseRecords
=
rhs
.
_numberOfNoiseRecords
;
_tabImageNoise
=
rhs
.
_tabImageNoise
;
_polarisation
=
rhs
.
_polarisation
;
return
*
this
;
}
...
...
@@ -53,8 +57,14 @@ bool Noise::saveState(ossimKeywordlist& kwl, const char* prefix) const
pfx
=
prefix
;
}
pfx
+=
NOISE
;
std
::
string
s
=
pfx
+
"."
+
NUMBER_OF_NOISE_RECORDS_KW
;
std
::
string
s
=
pfx
+
"."
+
NAME_OF_NOISE_POLARISATION_KW
;
kwl
.
add
(
prefix
,
s
.
c_str
(),
_polarisation
);
s
=
pfx
+
"."
+
NUMBER_OF_NOISE_RECORDS_KW
;
kwl
.
add
(
prefix
,
s
.
c_str
(),
_numberOfNoiseRecords
);
for
(
unsigned
int
i
=
0
;
i
<
_tabImageNoise
.
size
();
++
i
)
{
std
::
string
s2
=
pfx
+
"["
+
ossimString
::
toString
(
i
)
+
"]"
;
...
...
@@ -81,6 +91,18 @@ bool Noise::loadState(const ossimKeywordlist& kwl, const char* prefix)
const
char
*
lookup
=
0
;
std
::
string
s1
=
pfx
+
"."
;
lookup
=
kwl
.
find
(
s1
.
c_str
(),
NAME_OF_NOISE_POLARISATION_KW
);
if
(
lookup
)
{
_polarisation
=
lookup
;
}
else
{
ossimNotify
(
ossimNotifyLevel_WARN
)
<<
MODULE
<<
" Keyword not found: "
<<
NAME_OF_NOISE_POLARISATION_KW
<<
"
\n
"
;
result
=
false
;
}
lookup
=
kwl
.
find
(
s1
.
c_str
(),
NUMBER_OF_NOISE_RECORDS_KW
);
if
(
lookup
)
{
...
...
@@ -122,6 +144,8 @@ std::ostream& Noise::print(std::ostream& out) const
pfx
+=
NOISE
;
std
::
string
s
=
pfx
+
"."
+
NUMBER_OF_NOISE_RECORDS_KW
;
kwl
.
add
(
prefix
,
s
.
c_str
(),
_numberOfNoiseRecords
);
s
=
pfx
+
"."
+
NAME_OF_NOISE_POLARISATION_KW
;
kwl
.
add
(
prefix
,
s
.
c_str
(),
_polarisation
);
for
(
unsigned
int
i
=
0
;
i
<
_tabImageNoise
.
size
();
++
i
)
{
std
::
string
s2
=
pfx
+
"["
+
ossimString
::
toString
(
i
)
+
"]"
;
...
...
This diff is collapsed.
Click to expand it.
Utilities/otbossimplugins/ossim/otb/Noise.h
+
18
−
0
View file @
cd57a9d1
...
...
@@ -81,6 +81,18 @@ public:
{
return
_tabImageNoise
;
}
void
set_imagePolarisation
(
const
ossimString
&
polarisation
)
{
_polarisation
=
polarisation
;
}
const
ossimString
&
get_imagePolarisation
()
const
{
return
_polarisation
;
}
protected
:
...
...
@@ -92,6 +104,12 @@ protected:
* @brief Image Noise.
*/
std
::
vector
<
ImageNoise
>
_tabImageNoise
;
/**
* @brief Noise Polarisation Layer.
*/
ossimString
_polarisation
;
private
:
};
...
...
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