Example¶
This application opens an image and save it. Pay attention, it includes Latex snippets in order to generate software guide documentation
Detailed description¶
The purpose of this application is to present parameters types, and Application class framework. It is used to generate Software guide documentation for Application chapter example.
Parameters¶
This section describes in details the parameters available for this application. Table [1] presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is Example .
[1] | Table: Parameters table for Example. |
Parameter Key | Parameter Type | Parameter Description |
---|---|---|
in | Input image | Input image |
out | Output image | Output image |
boolean | Boolean | Boolean |
int | Int | Int |
float | Float | Float |
string | String | String |
filename | Input File name | Input File name |
directory | Directory | Directory |
choice | Choices | Choices |
choice choice1 | Choice | Choice 1 |
choice choice2 | Choice | Choice 2 |
choice choice3 | Choice | Choice 3 |
choice.choice1.floatchoice1 | Float | Float |
choice.choice3.floatchoice3 | Float | Float |
ingroup | Group | Group |
ingroup.integer | Int | Int |
ingroup.images | Group | Group |
ingroup.images.inputimage | Input image | Input image |
outgroup | Group | Group |
outgroup.outputimage | Output image | Output image |
il | Input image list | Input image list |
cl | List | List |
ram | Int | Int |
cin | Input image | Input image |
cout | Output image | Output image |
inxml | XML input parameters file | XML input parameters file |
outxml | XML output parameters file | XML output parameters file |
Input Image
- Integer of Group
- Input Images Group
- Input Image
Output Image
- Output Image
Boolean
Integer
Float
String
File name
Directory name
Choice Available choices are:
- Choice 1
- Float of choice1
- Choice 2
- Choice 3
- Float of choice3
[Input Group]
- Integer of Group
- Input Images Group
- Input Image
[Output Group]
- Output Image
Input image list
Output Image channels
Available RAM: Set the maximum of available memory for the pipeline execution in mega bytes (optional, 256 by default).
Input Complex Image
Output Complex Image
Load otb application from xml file: Load otb application from xml file.
Save otb application to xml file: Save otb application to xml file.
Example¶
To run this example in command-line, use the following:
otbcli_Example -boolean true -in QB_Suburb.png -out Application_Example.png
To run this example from Python, use the following code snippet:
#!/usr/bin/python
# Import the otb applications package
import otbApplication
# The following line creates an instance of the Example application
Example = otbApplication.Registry.CreateApplication("Example")
# The following lines set all the application parameters:
Example.SetParameterString("boolean","1")
Example.SetParameterString("in", "QB_Suburb.png")
Example.SetParameterString("out", "Application_Example.png")
# The following line execute the application
Example.ExecuteAndWriteOutput()
Limitations¶
None
Authors¶
This application has been written by OTB-Team.