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
Julien Cabieces
otb
Commits
b883ae63
Commit
b883ae63
authored
13 years ago
by
Otmane Lahlou
Browse files
Options
Downloads
Patches
Plain Diff
ENH: add method to deal with the AutomaticMode from the application
parent
186dbd71
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/ApplicationEngine/otbWrapperApplication.cxx
+18
-0
18 additions, 0 deletions
Code/ApplicationEngine/otbWrapperApplication.cxx
Code/ApplicationEngine/otbWrapperApplication.h
+11
-7
11 additions, 7 deletions
Code/ApplicationEngine/otbWrapperApplication.h
with
29 additions
and
7 deletions
Code/ApplicationEngine/otbWrapperApplication.cxx
+
18
−
0
View file @
b883ae63
...
@@ -175,6 +175,24 @@ void Application::MandatoryOff(std::string paramKey)
...
@@ -175,6 +175,24 @@ void Application::MandatoryOff(std::string paramKey)
GetParameterByKey
(
paramKey
)
->
SetMandatory
(
false
);
GetParameterByKey
(
paramKey
)
->
SetMandatory
(
false
);
}
}
/* Return true if the specified parameter was set automatically in the
* application
*/
bool
Application
::
HasAutomaticValue
(
std
::
string
paramKey
)
const
{
return
GetParameterByKey
(
paramKey
)
->
GetAutomaticValue
();
}
void
Application
::
AutomaticValueOn
(
std
::
string
paramKey
)
{
GetParameterByKey
(
paramKey
)
->
SetAutomaticValue
(
true
);
}
void
Application
::
AutomaticValueOff
(
std
::
string
paramKey
)
{
GetParameterByKey
(
paramKey
)
->
SetAutomaticValue
(
false
);
}
/* Returns true if the parameter has an associated value provided externally
/* Returns true if the parameter has an associated value provided externally
* (not automatically computed by the application) */
* (not automatically computed by the application) */
bool
Application
::
HasUserValue
(
std
::
string
paramKey
)
const
bool
Application
::
HasUserValue
(
std
::
string
paramKey
)
const
...
...
This diff is collapsed.
Click to expand it.
Code/ApplicationEngine/otbWrapperApplication.h
+
11
−
7
View file @
b883ae63
...
@@ -127,6 +127,11 @@ public:
...
@@ -127,6 +127,11 @@ public:
/* Return true if the specified parameter is mandatory */
/* Return true if the specified parameter is mandatory */
bool
IsMandatory
(
std
::
string
paramKey
)
const
;
bool
IsMandatory
(
std
::
string
paramKey
)
const
;
/* Return true if the specified parameter was set automtically in
* the applciation
*/
bool
HasAutomaticValue
(
std
::
string
paramKey
)
const
;
/* Returns true if the parameter has an associated value provided externally
/* Returns true if the parameter has an associated value provided externally
* (not automatically computed by the application) */
* (not automatically computed by the application) */
bool
HasUserValue
(
std
::
string
paramKey
)
const
;
bool
HasUserValue
(
std
::
string
paramKey
)
const
;
...
@@ -277,11 +282,6 @@ public:
...
@@ -277,11 +282,6 @@ public:
*/
*/
FloatVectorImageType
*
GetParameterImage
(
std
::
string
parameter
);
FloatVectorImageType
*
GetParameterImage
(
std
::
string
parameter
);
/* Get an image value
*
* Can be called for types :
* \li ParameterType_InputImage
*/
#define otbGetParameterImageMacro( Image ) \
#define otbGetParameterImageMacro( Image ) \
Image##Type * GetParameter##Image( std::string parameter ) \
Image##Type * GetParameter##Image( std::string parameter ) \
{ \
{ \
...
@@ -321,8 +321,6 @@ public:
...
@@ -321,8 +321,6 @@ public:
otbGetParameterImageMacro
(
Int32RGBAImage
);
otbGetParameterImageMacro
(
Int32RGBAImage
);
otbGetParameterImageMacro
(
FloatRGBAImage
);
otbGetParameterImageMacro
(
FloatRGBAImage
);
otbGetParameterImageMacro
(
DoubleRGBAImage
);
otbGetParameterImageMacro
(
DoubleRGBAImage
);
/* Get an image list value
/* Get an image list value
*
*
* Can be called for types :
* Can be called for types :
...
@@ -433,6 +431,12 @@ protected:
...
@@ -433,6 +431,12 @@ protected:
//TODO: exception if not found ?
//TODO: exception if not found ?
return
ret
;
return
ret
;
}
}
/** Declare a parameter as having an automatic value */
void
AutomaticValueOn
(
std
::
string
paramKey
);
/** Declare a parameter as NOT having an automatic value */
void
AutomaticValueOff
(
std
::
string
paramKey
);
/* Set an output image value
/* Set an output image value
*
*
...
...
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