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
43f143d7
Commit
43f143d7
authored
13 years ago
by
OTB Bot
Browse files
Options
Downloads
Patches
Plain Diff
STYLE
parent
8626a01e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Applications/Utils/otbColorMapping.cxx
+7
-11
7 additions, 11 deletions
Applications/Utils/otbColorMapping.cxx
Code/ApplicationEngine/otbWrapperElevationParametersHandler.cxx
+1
-1
1 addition, 1 deletion
...pplicationEngine/otbWrapperElevationParametersHandler.cxx
with
8 additions
and
12 deletions
Applications/Utils/otbColorMapping.cxx
+
7
−
11
View file @
43f143d7
...
@@ -55,7 +55,6 @@ namespace Functor
...
@@ -55,7 +55,6 @@ namespace Functor
{
{
template
<
class
TLabel
,
class
TValue
>
class
RGBFromImageValueFunctor
template
<
class
TLabel
,
class
TValue
>
class
RGBFromImageValueFunctor
{
{
public:
public:
...
@@ -143,7 +142,7 @@ public:
...
@@ -143,7 +142,7 @@ public:
{
{
MeanValueMapType
MeanMap
;
MeanValueMapType
MeanMap
;
for
(
unsigned
int
i
=
0
;
i
<
m_WeigthingMap
.
size
();
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
m_WeigthingMap
.
size
();
i
++
)
{
{
TValue
value
=
m_LabelToImageIntensityMap
[
i
];
TValue
value
=
m_LabelToImageIntensityMap
[
i
];
for
(
unsigned
int
index
=
0
;
index
<
value
.
Size
();
index
++
)
for
(
unsigned
int
index
=
0
;
index
<
value
.
Size
();
index
++
)
...
@@ -184,7 +183,6 @@ private:
...
@@ -184,7 +183,6 @@ private:
}
}
class
ColorMapping
:
public
Application
class
ColorMapping
:
public
Application
{
{
public:
public:
...
@@ -216,7 +214,6 @@ public:
...
@@ -216,7 +214,6 @@ public:
typedef
itk
::
ImageRegionConstIterator
<
UInt16ImageType
>
LabelIteratorType
;
typedef
itk
::
ImageRegionConstIterator
<
UInt16ImageType
>
LabelIteratorType
;
// Manual label LUT
// Manual label LUT
typedef
otb
::
ChangeLabelImageFilter
typedef
otb
::
ChangeLabelImageFilter
<
LabelImageType
,
VectorImageType
>
ChangeLabelFilterType
;
<
LabelImageType
,
VectorImageType
>
ChangeLabelFilterType
;
...
@@ -251,8 +248,8 @@ public:
...
@@ -251,8 +248,8 @@ public:
typedef
otb
::
ImageMetadataInterfaceBase
ImageMetadataInterfaceType
;
typedef
otb
::
ImageMetadataInterfaceBase
ImageMetadataInterfaceType
;
typedef
Functor
::
RGBFromImageValueFunctor
<
LabelType
,
FloatVectorImageType
::
PixelType
>
RGBFromImageValueFunctorType
;
typedef
Functor
::
RGBFromImageValueFunctor
<
LabelType
,
FloatVectorImageType
::
PixelType
>
RGBFromImageValueFunctorType
;
typedef
itk
::
BinaryFunctorImageFilter
<
LabelImageType
,
FloatVectorImageType
,
LabelImageType
,
typedef
itk
::
BinaryFunctorImageFilter
<
LabelImageType
,
FloatVectorImageType
,
LabelImageType
,
RGBFromImageValueFunctorType
>
RGBFromImageValueFilterType
;
RGBFromImageValueFunctorType
>
RGBFromImageValueFilterType
;
private:
private:
...
@@ -511,9 +508,9 @@ private:
...
@@ -511,9 +508,9 @@ private:
// Generate
// Generate
histogramFilter
->
Update
();
histogramFilter
->
Update
();
HistogramListType
::
Pointer
histogramList
=
histogramFilter
->
GetOutput
();
//
HistogramListType
::
Pointer
histogramList
=
histogramFilter
->
GetOutput
();
//
// HistogramPointerType histoBand=histogramList->GetNelements(0);
// HistogramPointerType histoBand=histogramList->GetNelements(0);
// std::cout<<histoBand->GetFrequency(0,0)<<std::endl;
// std::cout<<histoBand->GetFrequency(0,
0)<<std::endl;
ImageMetadataInterfaceType
::
Pointer
ImageMetadataInterfaceType
::
Pointer
...
@@ -537,8 +534,8 @@ private:
...
@@ -537,8 +534,8 @@ private:
for
(
unsigned
int
index
=
0
;
index
<
supportImage
->
GetNumberOfComponentsPerPixel
();
index
++
)
for
(
unsigned
int
index
=
0
;
index
<
supportImage
->
GetNumberOfComponentsPerPixel
();
index
++
)
{
{
minVal
.
SetElement
(
index
,
static_cast
<
FloatVectorImageType
::
PixelType
::
ValueType
>
(
histogramList
->
GetNthElement
(
index
)
->
Quantile
(
0
,
static_cast
<
float
>
(
this
->
GetParameterInt
(
"method.image.low"
))
/
100.0
)));
minVal
.
SetElement
(
index
,
static_cast
<
FloatVectorImageType
::
PixelType
::
ValueType
>
(
histogramList
->
GetNthElement
(
index
)
->
Quantile
(
0
,
static_cast
<
float
>
(
this
->
GetParameterInt
(
"method.image.low"
))
/
100.0
)));
maxVal
.
SetElement
(
index
,
static_cast
<
FloatVectorImageType
::
PixelType
::
ValueType
>
(
histogramList
->
GetNthElement
(
index
)
->
Quantile
(
0
,(
100.0
-
static_cast
<
float
>
(
this
->
GetParameterInt
(
"method.image.up"
)))
/
100.0
)));
maxVal
.
SetElement
(
index
,
static_cast
<
FloatVectorImageType
::
PixelType
::
ValueType
>
(
histogramList
->
GetNthElement
(
index
)
->
Quantile
(
0
,
(
100.0
-
static_cast
<
float
>
(
this
->
GetParameterInt
(
"method.image.up"
)))
/
100.0
)));
}
}
// create functor
// create functor
...
@@ -593,7 +590,6 @@ private:
...
@@ -593,7 +590,6 @@ private:
}
}
SetParameterOutputImage
(
"out"
,
m_RBGFromImageMapper
->
GetOutput
());
SetParameterOutputImage
(
"out"
,
m_RBGFromImageMapper
->
GetOutput
());
...
...
This diff is collapsed.
Click to expand it.
Code/ApplicationEngine/otbWrapperElevationParametersHandler.cxx
+
1
−
1
View file @
43f143d7
...
@@ -144,7 +144,7 @@ ElevationParametersHandler::IsGeoidUsed(const Application::Pointer app, const st
...
@@ -144,7 +144,7 @@ ElevationParametersHandler::IsGeoidUsed(const Application::Pointer app, const st
return
app
->
IsParameterEnabled
(
geoidKey
.
str
())
&&
app
->
HasValue
(
geoidKey
.
str
());
return
app
->
IsParameterEnabled
(
geoidKey
.
str
())
&&
app
->
HasValue
(
geoidKey
.
str
());
}
}
bool
bool
ElevationParametersHandler
::
IsElevationEnabled
(
const
Application
::
Pointer
app
,
const
std
::
string
&
key
)
ElevationParametersHandler
::
IsElevationEnabled
(
const
Application
::
Pointer
app
,
const
std
::
string
&
key
)
{
{
return
app
->
IsParameterEnabled
(
key
);
return
app
->
IsParameterEnabled
(
key
);
...
...
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