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
eb947359
Commit
eb947359
authored
12 years ago
by
Manuel Grizonnet
Browse files
Options
Downloads
Patches
Plain Diff
ENH: add default pixel type for output image parameter in documentation
parent
f5538ce9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
+18
-17
18 additions, 17 deletions
Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
with
18 additions
and
17 deletions
Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
+
18
−
17
View file @
eb947359
...
...
@@ -158,7 +158,7 @@ bool CommandLineLauncher::ExecuteAndWriteOutput()
{
return
false
;
}
if
(
m_Application
->
ExecuteAndWriteOutput
()
==
0
)
{
this
->
DisplayOutputParameters
();
...
...
@@ -178,7 +178,7 @@ bool CommandLineLauncher::ExecuteAndWriteOutput()
m_Application
->
GetLogger
()
->
Write
(
itk
::
LoggerBase
::
FATAL
,
"An unknown exception has been raised during application execution"
);
return
false
;
}
return
true
;
}
...
...
@@ -380,7 +380,7 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters()
std
::
cerr
<<
"ERROR: No value associated to the parameter :
\"
"
<<
paramKey
<<
"
\"
, invalid number of values "
<<
values
.
size
()
<<
std
::
endl
;
return
INVALIDNUMBEROFVALUE
;
}
// Ensure that the parameter is enabled
m_Application
->
EnableParameter
(
paramKey
);
...
...
@@ -525,7 +525,7 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters()
break
;
}
currentParam
=
currentParam
->
GetRoot
();
if
(
currentParam
->
IsRoot
())
{
// the missing parameter is on an active branch : we need it
...
...
@@ -534,7 +534,7 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters()
}
}
}
if
(
mustBeSet
)
{
if
(
!
paramExists
)
...
...
@@ -557,7 +557,7 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters()
}
}
}
// Check if non mandatory parameter have values
else
{
...
...
@@ -621,12 +621,12 @@ void CommandLineLauncher::DisplayHelp()
m_MaxKeySize
=
appKeyList
[
i
].
size
();
}
}
//// progress report parameter
std
::
string
bigKey
=
"progress"
;
for
(
unsigned
int
i
=
0
;
i
<
m_MaxKeySize
-
std
::
string
(
"progress"
).
size
();
i
++
)
bigKey
.
append
(
" "
);
std
::
cerr
<<
" -"
<<
bigKey
<<
" <boolean> Report progress "
<<
std
::
endl
;
for
(
unsigned
int
i
=
0
;
i
<
nbOfParam
;
i
++
)
...
...
@@ -698,7 +698,7 @@ std::string CommandLineLauncher::DisplayParameterHelp(const Parameter::Pointer &
std
::
string
bigKey
=
paramKey
;
for
(
unsigned
int
i
=
0
;
i
<
m_MaxKeySize
-
paramKey
.
size
();
i
++
)
bigKey
.
append
(
" "
);
oss
<<
"-"
<<
bigKey
<<
" "
;
// Display the type the parameter
...
...
@@ -731,13 +731,14 @@ std::string CommandLineLauncher::DisplayParameterHelp(const Parameter::Pointer &
}
else
itkExceptionMacro
(
"Not handled parameter type."
);
oss
<<
" "
<<
param
->
GetName
()
<<
" "
;
if
(
type
==
ParameterType_OutputImage
)
{
oss
<<
" [pixel=uint8/uint16/int16/uint32/int32/float/double]"
;
oss
<<
" (default value is float)"
;
}
...
...
@@ -753,7 +754,7 @@ std::string CommandLineLauncher::DisplayParameterHelp(const Parameter::Pointer &
if
(
i
!=
keys
.
size
()
-
1
)
oss
<<
"/"
;
}
oss
<<
"]"
;
}
...
...
@@ -764,7 +765,7 @@ std::string CommandLineLauncher::DisplayParameterHelp(const Parameter::Pointer &
else
{
oss
<<
" (optional"
;
if
(
m_Application
->
IsParameterEnabled
(
paramKey
))
{
oss
<<
", on by default"
;
...
...
@@ -835,7 +836,7 @@ bool CommandLineLauncher::CheckKeyValidity(std::string& refKey)
appKeyList
.
push_back
(
"help"
);
appKeyList
.
push_back
(
"progress"
);
appKeyList
.
push_back
(
"testenv"
);
// Check if each key in the expression exists in the application
for
(
unsigned
int
i
=
0
;
i
<
expKeyList
.
size
();
i
++
)
{
...
...
@@ -875,7 +876,7 @@ void CommandLineLauncher::DisplayOutputParameters()
oss
<<
std
::
endl
;
}
if
(
m_Parser
->
IsAttributExists
(
"-testenv"
,
m_Expression
)
)
{
std
::
vector
<
std
::
string
>
val
=
m_Parser
->
GetAttribut
(
"-testenv"
,
m_Expression
);
...
...
@@ -891,7 +892,7 @@ void CommandLineLauncher::DisplayOutputParameters()
ofs
.
close
();
}
}
std
::
cout
<<
"Output parameters value:"
<<
std
::
endl
;
std
::
cout
<<
oss
.
str
()
<<
std
::
endl
;
}
...
...
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