Commit ec651ec0 authored by Victor Poughon's avatar Victor Poughon

REFAC: rewrite of otbGenerateWrappersRstDoc.py & doc improvements

parent 33f5066a
......@@ -5,4 +5,4 @@
export PYTHONPATH=@PYTHONPATH_COOKBOOK@:$PYTHONPATH
export OTB_APPLICATION_PATH=@CMAKE_BINARY_DIR@/lib/otb/applications
python3 @CMAKE_CURRENT_SOURCE_DIR@/Scripts/otbGenerateWrappersRstDoc.py -o "$1"
python3 @CMAKE_CURRENT_SOURCE_DIR@/Scripts/otbGenerateWrappersRstDoc.py "$1"
......@@ -120,6 +120,8 @@ set(OTB_COPYRIGHT_TEXT "${OTB_COPYRIGHT_YEAR} CNES.The OTB CookBook is licensed
configure_file(${RST_SOURCE_DIR}/conf.py.in ${SPHINX_CONF_DIR}/conf.py @ONLY)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/_static DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
add_custom_target(generate_otbapps_rst
COMMAND ${SH_INTERP} ${CMAKE_CURRENT_BINARY_DIR}/RunApplicationsRstGenerator.sh
${RST_BINARY_DIR}
......@@ -142,7 +144,6 @@ add_custom_target(CookBookHTML
-b html
${RST_BINARY_DIR}
${HTML_DIR}
-W
-v
-c ${SPHINX_CONF_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
......@@ -163,7 +164,6 @@ add_custom_target(CookBookArchive
-b latex
${RST_BINARY_DIR}
${LATEX_DIR}
-W
-v
-c ${SPHINX_CONF_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
......
.wy-nav-content {
max-width: 800px;
}
/* Reduce the effect of the p bottom margin before lists
* Very useful for choice parameters in app doc for example
*/
p + ul {
margin-top: -18px;
}
......@@ -24,7 +24,7 @@ Windows
.. include:: Installation_Windows.rst
Linux
------------
-----
.. include:: Installation_Linux.rst
......
......@@ -21,6 +21,11 @@ import sphinx_rtd_theme
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# Customize read the docs theme a bit with a custom css
# taken from https://stackoverflow.com/a/43186995/5815110
def setup(app):
app.add_stylesheet("css/otb_theme.css")
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
......@@ -75,7 +80,7 @@ release = '@OTB_VERSION@'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['@RST_BUILD_DIR@']
exclude_patterns = ['@RST_BUILD_DIR@', 'templates/*.rst']
#exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
......@@ -167,6 +172,16 @@ html_static_path = ['_static']
# If true, the index is split into individual pages for each letter.
#html_split_index = False
html_context = {
'display_gitlab': True,
'gitlab_host': "gitlab.orfeo-toolbox.org",
'gitlab_user': 'orfeotoolbox',
'gitlab_repo': 'OTB',
'gitlab_version': 'develop',
'conf_py_path': '/Documentation/Cookbook/rst/',
#'source_url_prefix': "https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/tree/develop/Documentation/Cookbook/rst/",
}
# If true, links to the reST sources are added to the pages.
html_show_sourcelink = True
......
{heading}
{description}
Description
-----------
{longdescription}
Parameters
----------
.. contents:: :local:
.. |br| raw:: html
<br />
.. |em| raw:: html
&emsp;
{parameters}
Examples
--------
From the command-line:
.. code-block:: bash
{examples_cli}
From Python:
.. code-block:: python
{examples_python}
{limitations}
{see_also}
**{name}** :code:`-{key} {value}` {flags}|br|
{description}
**{name}** :code:`-{key} {value}` {flags}|br|
{description}
{choices}
......@@ -136,7 +136,7 @@ private:
SetParameterDescription("method.dempstershafer","Fusion of classification maps by the Dempster Shafer combination method for each output pixel.");
AddParameter(ParameterType_InputFilenameList, "method.dempstershafer.cmfl", "Confusion Matrices");
SetParameterDescription("method.dempstershafer.cmfl", "A list of confusion matrix files (*.CSV format) to define the masses of belief and the class labels. Each file should be formatted the following way: "
SetParameterDescription("method.dempstershafer.cmfl", "A list of confusion matrix files (.csv format) to define the masses of belief and the class labels. Each file should be formatted the following way: "
"the first line, beginning with a '#' symbol, should be a list of the class labels present in the corresponding input classification image, organized in the same order as the confusion matrix rows/columns.");
AddParameter(ParameterType_Choice, "method.dempstershafer.mob", "Mass of belief measurement");
......
......@@ -116,17 +116,16 @@ private:
SetDefaultOutputPixelType( "out", ImagePixelType_uint8);
AddParameter(ParameterType_OutputImage, "confmap", "Confidence map");
SetParameterDescription( "confmap", "Confidence map of the produced classification. The confidence index depends on the model : \n"
" - LibSVM : difference between the two highest probabilities (needs a model with probability estimates, so that classes probabilities can be computed for each sample)\n"
" - OpenCV\n"
" * Boost : sum of votes\n"
" * DecisionTree : (not supported)\n"
" * GradientBoostedTree : (not supported)\n"
" * KNearestNeighbors : number of neighbors with the same label\n"
" * NeuralNetwork : difference between the two highest responses\n"
" * NormalBayes : (not supported)\n"
" * RandomForest : Confidence (proportion of votes for the majority class). Margin (normalized difference of the votes of the 2 majority classes) is not available for now.\n"
" * SVM : distance to margin (only works for 2-class models)\n");
SetParameterDescription( "confmap", "Confidence map of the produced classification. The confidence index depends on the model: \n\n"
"* LibSVM: difference between the two highest probabilities (needs a model with probability estimates, so that classes probabilities can be computed for each sample)\n"
"* Boost: sum of votes\n"
"* DecisionTree: (not supported)\n"
"* GradientBoostedTree: (not supported)\n"
"* KNearestNeighbors: number of neighbors with the same label\n"
"* NeuralNetwork: difference between the two highest responses\n"
"* NormalBayes: (not supported)\n"
"* RandomForest: Confidence (proportion of votes for the majority class). Margin (normalized difference of the votes of the 2 majority classes) is not available for now.\n"
"* SVM: distance to margin (only works for 2-class models)\n");
SetDefaultOutputPixelType( "confmap", ImagePixelType_double);
MandatoryOff("confmap");
......
......@@ -43,18 +43,27 @@ public:
// Documentation
SetDocName( "Train a classifier from multiple images" );
SetDocLongDescription(
"This application performs a classifier training from multiple pairs of input images and training vector data. "
"Samples are composed of pixel values in each band optionally centered and reduced using an XML statistics file produced by "
"the ComputeImagesStatistics application.\n The training vector data must contain polygons with a positive integer field "
"representing the class label. The name of this field can be set using the \"Class label field\" parameter. Training and validation "
"sample lists are built such that each class is equally represented in both lists. One parameter allows controlling the ratio "
"between the number of samples in training and validation sets. Two parameters allow managing the size of the training and "
"validation sets per class and per image.\n Several classifier parameters can be set depending on the chosen classifier. In the "
"validation process, the confusion matrix is organized the following way: rows = reference labels, columns = produced labels. "
"In the header of the optional confusion matrix output file, the validation (reference) and predicted (produced) class labels"
" are ordered according to the rows/columns of the confusion matrix.\n This application is based on LibSVM, OpenCV Machine Learning "
"(2.3.1 and later), and Shark ML. The output of this application is a text model file, whose format corresponds to the "
"ML model type chosen. There is no image nor vector data output." );
"Train a classifier from multiple pairs of images and training vector data. "
"Samples are composed of pixel values in each band optionally centered and reduced using an XML statistics file produced by "
"the ComputeImagesStatistics application.\n\n"
"The training vector data must contain polygons with a positive integer field "
"representing the class label. The name of this field can be set using the *Class label field* parameter.\n\n"
"Training and validation sample lists are built such that each class is equally represented in both lists. One parameter allows controlling the ratio "
"between the number of samples in training and validation sets. Two parameters allow managing the size of the training and "
"validation sets per class and per image.\n\n"
"In the validation process, the confusion matrix is organized the following way:\n\n"
"* Rows: reference labels,\n"
"* Columns: produced labels.\n\n"
"In the header of the optional confusion matrix output file, the validation (reference) and predicted (produced) class labels"
" are ordered according to the rows/columns of the confusion matrix.\n\n"
"This application is based on LibSVM, OpenCV Machine Learning, and Shark ML. "
"The output of this application is a text model file, whose format corresponds to the "
"ML model type chosen. There is no image nor vector data output.");
SetDocLimitations( "None" );
SetDocAuthors( "OTB-Team" );
SetDocSeeAlso( "OpenCV documentation for machine learning http://docs.opencv.org/modules/ml/doc/ml.html " );
......
......@@ -67,7 +67,7 @@ protected:
"Learning (2.3.1 and later), and Shark ML The output of this application "
"is a text model file, whose format corresponds to the ML model type "
"chosen. There is no image nor vector data output.");
SetDocLimitations( " " );
SetDocLimitations("");
SetDocAuthors( "OTB Team" );
SetDocSeeAlso( " " );
......
......@@ -131,20 +131,16 @@ private:
"Put the same field names as the TrainVectorClassifier application.");
AddParameter(ParameterType_Bool, "confmap", "Confidence map");
SetParameterDescription( "confmap", "Confidence map of the produced classification. "
"The confidence index depends on the model : \n"
" - LibSVM : difference between the two highest probabilities "
"(needs a model with probability estimates, so that classes probabilities can be computed for each sample)\n"
" - OpenCV\n"
" * Boost : sum of votes\n"
" * DecisionTree : (not supported)\n"
" * GradientBoostedTree : (not supported)\n"
" * KNearestNeighbors : number of neighbors with the same label\n"
" * NeuralNetwork : difference between the two highest responses\n"
" * NormalBayes : (not supported)\n"
" * RandomForest : Confidence (proportion of votes for the majority class). "
"Margin (normalized difference of the votes of the 2 majority classes) is not available for now.\n"
" * SVM : distance to margin (only works for 2-class models).\n");
SetParameterDescription( "confmap", "Confidence map of the produced classification. The confidence index depends on the model: \n\n"
"* LibSVM: difference between the two highest probabilities (needs a model with probability estimates, so that classes probabilities can be computed for each sample)\n"
"* Boost: sum of votes\n"
"* DecisionTree: (not supported)\n"
"* GradientBoostedTree: (not supported)\n"
"* KNearestNeighbors: number of neighbors with the same label\n"
"* NeuralNetwork: difference between the two highest responses\n"
"* NormalBayes: (not supported)\n"
"* RandomForest: Confidence (proportion of votes for the majority class). Margin (normalized difference of the votes of the 2 majority classes) is not available for now.\n"
"* SVM: distance to margin (only works for 2-class models)\n");
AddParameter(ParameterType_OutputFilename, "out", "Output vector data file containing class labels");
SetParameterDescription("out","Output vector data file storing sample values (OGR format)."
......
......@@ -34,8 +34,7 @@ namespace Wrapper
::InitBoostParams()
{
AddChoice("classifier.boost", "Boost classifier");
SetParameterDescription("classifier.boost", "This group of parameters allows setting Boost classifier parameters. "
"See complete documentation here \\url{http://docs.opencv.org/modules/ml/doc/boosting.html}.");
SetParameterDescription("classifier.boost", "http://docs.opencv.org/modules/ml/doc/boosting.html");
//BoostType
AddParameter(ParameterType_Choice, "classifier.boost.t", "Boost Type");
AddChoice("classifier.boost.t.discrete", "Discrete AdaBoost");
......
......@@ -35,8 +35,7 @@ LearningApplicationBase<TInputValue,TOutputValue>
{
AddChoice("classifier.dt", "Decision Tree classifier");
SetParameterDescription("classifier.dt",
"This group of parameters allows setting Decision Tree classifier parameters. "
"See complete documentation here \\url{http://docs.opencv.org/modules/ml/doc/decision_trees.html}.");
"http://docs.opencv.org/modules/ml/doc/decision_trees.html");
//MaxDepth
AddParameter(ParameterType_Int, "classifier.dt.max", "Maximum depth of the tree");
#ifdef OTB_OPENCV_3
......
......@@ -38,8 +38,7 @@ LearningApplicationBase<TInputValue,TOutputValue>
AddChoice("classifier.gbt", "Gradient Boosted Tree classifier");
SetParameterDescription(
"classifier.gbt",
"This group of parameters allows setting Gradient Boosted Tree classifier parameters. "
"See complete documentation here \\url{http://docs.opencv.org/modules/ml/doc/gradient_boosted_trees.html}.");
"http://docs.opencv.org/modules/ml/doc/gradient_boosted_trees.html");
if (m_RegressionFlag)
{
......
......@@ -34,8 +34,7 @@ namespace Wrapper
::InitKNNParams()
{
AddChoice("classifier.knn", "KNN classifier");
SetParameterDescription("classifier.knn", "This group of parameters allows setting KNN classifier parameters. "
"See complete documentation here \\url{http://docs.opencv.org/modules/ml/doc/k_nearest_neighbors.html}.");
SetParameterDescription("classifier.knn", "http://docs.opencv.org/modules/ml/doc/k_nearest_neighbors.html");
//K parameter
AddParameter(ParameterType_Int, "classifier.knn.k", "Number of Neighbors");
......
......@@ -35,10 +35,7 @@ LearningApplicationBase<TInputValue,TOutputValue>
::InitNeuralNetworkParams()
{
AddChoice("classifier.ann", "Artificial Neural Network classifier");
SetParameterDescription("classifier.ann",
"This group of parameters allows setting Artificial Neural Network "
"classifier parameters. See complete documentation here "
"\\url{http://docs.opencv.org/modules/ml/doc/neural_networks.html}.");
SetParameterDescription("classifier.ann", "http://docs.opencv.org/modules/ml/doc/neural_networks.html");
//TrainMethod
AddParameter(ParameterType_Choice, "classifier.ann.t", "Train Method Type");
......
......@@ -34,8 +34,7 @@ namespace Wrapper
::InitNormalBayesParams()
{
AddChoice("classifier.bayes", "Normal Bayes classifier");
SetParameterDescription("classifier.bayes", "Use a Normal Bayes Classifier. "
"See complete documentation here \\url{http://docs.opencv.org/modules/ml/doc/normal_bayes_classifier.html}.");
SetParameterDescription("classifier.bayes", "http://docs.opencv.org/modules/ml/doc/normal_bayes_classifier.html");
}
......
......@@ -34,9 +34,7 @@ LearningApplicationBase<TInputValue,TOutputValue>
::InitRandomForestsParams()
{
AddChoice("classifier.rf", "Random forests classifier");
SetParameterDescription("classifier.rf",
"This group of parameters allows setting Random Forests classifier parameters. "
"See complete documentation here \\url{http://docs.opencv.org/modules/ml/doc/random_trees.html}.");
SetParameterDescription("classifier.rf", "http://docs.opencv.org/modules/ml/doc/random_trees.html");
//MaxDepth
AddParameter(ParameterType_Int, "classifier.rf.max", "Maximum depth of the tree");
SetParameterInt("classifier.rf.max",5);
......
......@@ -34,8 +34,7 @@ namespace Wrapper
::InitSVMParams()
{
AddChoice("classifier.svm", "SVM classifier (OpenCV)");
SetParameterDescription("classifier.svm", "This group of parameters allows setting SVM classifier parameters. "
"See complete documentation here \\url{http://docs.opencv.org/modules/ml/doc/support_vector_machines.html}.");
SetParameterDescription("classifier.svm", "http://docs.opencv.org/modules/ml/doc/support_vector_machines.html");
AddParameter(ParameterType_Choice, "classifier.svm.m", "SVM Model Type");
SetParameterDescription("classifier.svm.m", "Type of SVM formulation.");
if (this->m_RegressionFlag)
......
......@@ -31,10 +31,7 @@ template<class TInputValue, class TOutputValue>
void LearningApplicationBase<TInputValue, TOutputValue>::InitSharkKMeansParams()
{
AddChoice( "classifier.sharkkm", "Shark kmeans classifier" );
SetParameterDescription( "classifier.sharkkm",
"This group of parameters allows setting Shark kMeans classifier parameters. "
"See complete documentation here "
"\\url{http://image.diku.dk/shark/sphinx_pages/build/html/rest_sources/tutorials/algorithms/kmeans.html}.\n " );
SetParameterDescription("classifier.sharkkm", "http://image.diku.dk/shark/sphinx_pages/build/html/rest_sources/tutorials/algorithms/kmeans.html ");
//MaxNumberOfIterations
AddParameter( ParameterType_Int, "classifier.sharkkm.maxiter",
"Maximum number of iteration for the kmeans algorithm." );
......
......@@ -38,8 +38,7 @@ LearningApplicationBase<TInputValue,TOutputValue>
AddChoice("classifier.sharkrf", "Shark Random forests classifier");
SetParameterDescription("classifier.sharkrf",
"This group of parameters allows setting Shark Random Forests classifier parameters. "
"See complete documentation here \\url{http://image.diku.dk/shark/doxygen_pages/html/classshark_1_1_r_f_trainer.html}.\n It is noteworthy that training is parallel.");
"http://image.diku.dk/shark/doxygen_pages/html/classshark_1_1_r_f_trainer.html.\n It is noteworthy that training is parallel.");
//MaxNumberOfTrees
AddParameter(ParameterType_Int, "classifier.sharkrf.nbtrees",
"Maximum number of trees in the forest");
......
......@@ -143,7 +143,7 @@ private:
SetParameterDescription("method.maf", "Maximum Autocorrelation Factor.");
AddChoice("method.ica", "ICA");
SetParameterDescription("method.ica", "Independent Component Analysis.");
AddParameter(ParameterType_Int, "method.ica.iter", "number of iterations ");
AddParameter(ParameterType_Int, "method.ica.iter", "number of iterations");
SetMinimumParameterIntValue("method.ica.iter", 1);
SetDefaultParameterInt("method.ica.iter", 20);
MandatoryOff("method.ica.iter");
......
......@@ -122,8 +122,8 @@ private:
AddParameter(ParameterType_OutputImage, "out", "Output Image");
SetParameterDescription("out", "This parameter holds the output file name to"
" which transformed image will be written. This has a slightly different"
" behaviour depending on transform type. \n For Wavelet, output is a"
" single band image for both forward and inverse transform. \n For FFT"
" behaviour depending on transform type. \nFor Wavelet, output is a"
" single band image for both forward and inverse transform. For FFT"
" forward transform, output is two band image where first band represents"
" real part and second band represents imaginary part of a complex image.");
......
......@@ -94,7 +94,7 @@ private:
SetParameterDescription("inxs"," Input XS image.");
AddParameter(ParameterType_OutputImage, "out", "Output image");
SetParameterDescription("out"," Output image.");
SetParameterDescription("out", "Output image.");
AddParameter(ParameterType_Choice, "method", "Algorithm");
SetParameterDescription("method", "Selection of the pan-sharpening method.");
......
......@@ -251,21 +251,25 @@ private:
void DoInit() override
{
SetName("ColorMapping");
SetDescription("Maps an input label image to 8-bits RGB using look-up tables.");
SetDescription("Map a label image to 8-bits RGB using look-up tables.");
SetDocName("Color Mapping");
SetDocLongDescription("This application allows one to map a label image to a 8-bits RGB image (in both ways) using different methods.\n"
" -The custom method allows one to use a custom look-up table. The look-up table is loaded "
"from a text file where each line describes an entry. The typical use of this method is to colorise a "
"classification map.\n -The continuous method allows mapping a range of values in a scalar input image "
"to a colored image using continuous look-up table, in order to enhance image interpretation. Several "
"look-up tables can been chosen with different color ranges.\n-The optimal method computes an optimal "
"look-up table. When processing a segmentation label image (label to color), the color difference between"
" adjacent segmented regions is maximized. When processing an unknown color image (color to label), all "
"the present colors are mapped to a continuous label list.\n - The support image method uses a color support "
"image to associate an average color to each region.");
SetDocLongDescription(
"Map a label image to a 8-bits RGB image (both ways) using different methods:\n\n"
" - **Custom**: use a custom look-up table. The look-up table is loaded "
"from a text file where each line describes an entry. The typical use of this method is to colorise a "
"classification map.\n"
" - **Continuous**: Map a range of values in a scalar input image "
"to a colored image using continuous look-up table, in order to enhance image interpretation. Several "
"look-up tables can been chosen with different color ranges.\n"
" - **Optimal**: Compute an optimal "
"look-up table. When processing a segmentation label image (label to color), the color difference between"
" adjacent segmented regions is maximized. When processing an unknown color image (color to label), all "
"the present colors are mapped to a continuous label list.\n"
" - **Support image**: Use a color support image to associate an average color to each region.");
SetDocLimitations("The segmentation optimal method does not support streaming, and thus large images. The operation color to label "
"is not implemented for the methods continuous LUT and support image LUT.\n ColorMapping using support image is not threaded.");
"is not implemented for the methods continuous LUT and support image LUT.\n\nColorMapping using support image is not threaded.");
SetDocAuthors("OTB-Team");
SetDocSeeAlso("ImageSVMClassifier");
......
......@@ -56,7 +56,10 @@ private:
// Documentation
SetDocName("Images comparison");
SetDocLongDescription("This application computes MSE (Mean Squared Error), MAE (Mean Absolute Error) and PSNR (Peak Signal to Noise Ratio) between the channel of two images (reference and measurement). The user has to set the used channel and can specify a ROI.");
SetDocLongDescription(
"Compute MSE (Mean Squared Error), MAE (Mean Absolute Error) and PSNR (Peak Signal to Noise Ratio) between two image bands (reference and measurement). "
"The user has to set the used channel and can specify a ROI."
);
SetDocLimitations("None");
SetDocAuthors("OTB-Team");
SetDocSeeAlso("BandMath application, ImageStatistics");
......@@ -65,17 +68,17 @@ private:
AddParameter(ParameterType_Group, "ref", "Reference image properties");
AddParameter(ParameterType_InputImage, "ref.in", "Reference image");
SetParameterDescription("ref.in", "Image used as reference in the comparison");
SetParameterDescription("ref.in", "Image used as reference in the comparison.");
AddParameter(ParameterType_Int, "ref.channel", "Reference image channel");
SetParameterDescription("ref.channel", "Used channel for the reference image");
SetParameterDescription("ref.channel", "Used channel for the reference image.");
SetDefaultParameterInt("ref.channel", 1);
SetMinimumParameterIntValue("ref.channel", 1);
AddParameter(ParameterType_Group, "meas", "Measured image properties");
AddParameter(ParameterType_InputImage, "meas.in", "Measured image");
SetParameterDescription("meas.in", "Image used as measured in the comparison");
SetParameterDescription("meas.in", "Image used as measured in the comparison.");
AddParameter(ParameterType_Int, "meas.channel", "Measured image channel");
SetParameterDescription("meas.channel", "Used channel for the measured image");
SetParameterDescription("meas.channel", "Used channel for the measured image.");
SetDefaultParameterInt("meas.channel", 1);
SetMinimumParameterIntValue("meas.channel", 1);
......@@ -102,19 +105,19 @@ private:
SetParameterDescription("roi.sizey","Size along y in pixels.");
AddParameter(ParameterType_Float, "mse", "MSE");
SetParameterDescription("mse", "Mean Squared Error value");
SetParameterDescription("mse", "Mean Squared Error value.");
SetParameterRole("mse", Role_Output );
AddParameter(ParameterType_Float, "mae", "MAE");
SetParameterDescription("mae", "Mean Absolute Error value");
SetParameterDescription("mae", "Mean Absolute Error value.");
SetParameterRole("mae", Role_Output );
AddParameter(ParameterType_Float, "psnr", "PSNR");
SetParameterDescription("psnr", "Peak Signal to Noise Ratio value");
SetParameterDescription("psnr", "Peak Signal to Noise Ratio value.");
SetParameterRole("psnr", Role_Output);
AddParameter(ParameterType_Float, "count", "count");
SetParameterDescription("count", "Nb of pixels which are different");
SetParameterDescription("count", "Nb of pixels which are different.");
SetParameterRole("count", Role_Output);
AddRAMParameter();
......
......@@ -57,11 +57,11 @@ private:
void DoInit() override
{
SetName("ConcatenateImages");
SetDescription("Concatenate a list of images of the same size into a single multi-channel one.");
SetDescription("Concatenate a list of images of the same size into a single multi-channel image.");
// Documentation
SetDocName("Images Concatenation");
SetDocLongDescription("This application performs images channels concatenation. "
SetDocLongDescription("Concatenate a list of images of the same size into a single multi-channel image. "
"It reads the input image list (single or multi-channel) "
"and generates a single multi-channel image. The channel order is the same as the list.");
SetDocLimitations("All input images must have the same size.");
......
......@@ -93,18 +93,21 @@ private:
SetDescription("Change the pixel type and rescale the image's dynamic");
SetDocName("Dynamic Conversion");
SetDocLongDescription("This application performs an image pixel type "
SetDocLongDescription(
"This application performs an image pixel type "
"conversion (short, ushort, uchar, int, uint, float and double types are "
"handled). The output image is written in the specified format (ie. "
"that corresponds to the given extension).\n The conversion can include "
"a rescale of the data range, by default it's set between the 2nd to "
"the 98th percentile. The rescale can be linear or log2. \n The choice "
"that corresponds to the given extension).\n"
"The conversion can include a rescale of the data range, by default it's set between the 2nd to "
"the 98th percentile. The rescale can be linear or log2. \nThe choice "
"of the output channels can be done with the extended filename, but "
"less easy to handle. To do this, a 'channels' parameter allows you to "
"select the desired bands at the output. There are 3 modes, the "
"available choices are: \n * grayscale : to display mono image as "
"standard color image \n * rgb : select 3 bands in the input image "
"(multi-bands) \n * all : keep all bands.");
"available choices are: \n"
" * **All**: keep all bands.\n"
" * **Grayscale**: to display mono image as standard color image \n"
" * **RGB**: select 3 bands in the input image (multi-bands) \n"
);
SetDocLimitations("The application does not support complex pixel types as output.");
SetDocAuthors("OTB-Team");
SetDocSeeAlso("Convert, Rescale");
......
......@@ -58,9 +58,9 @@ private:
SetName("Quicklook");
SetDescription("Generates a subsampled version of an image extract");
SetDocName("Quick Look");
SetDocLongDescription("Generates a subsampled version of an extract of an image defined by ROIStart and ROISize.\n "
SetDocLongDescription("Generates a subsampled version of an extract of an image defined by ROIStart and ROISize.\n"
"This extract is subsampled using the ratio OR the output image Size.");
SetDocLimitations(" This application does not provide yet the optimal way to decode coarser level of resolution from JPEG2000 images (like in Monteverdi).\n"
SetDocLimitations("This application does not provide yet the optimal way to decode coarser level of resolution from JPEG2000 images (like in Monteverdi).\n"
"Trying to subsampled huge JPEG200 image with the application will lead to poor performances for now.");
SetDocAuthors("OTB-Team");
SetDocSeeAlso(" ");
......@@ -100,12 +100,12 @@ private:
MandatoryOff("sr");
AddParameter(ParameterType_Int, "sx", "Size X");
SetParameterDescription( "sx" , "quicklook size in x-direction (used if no sampling ration is given)" );
SetParameterDescription( "sx" , "quicklook size in x-direction (used if no sampling ratio is given)" );
MandatoryOff("sx");
DisableParameter("sx");
AddParameter(ParameterType_Int, "sy", "Size Y");
SetParameterDescription( "sy" , "quicklook size in y-direction (used if no sampling ration is given)" );
SetParameterDescription( "sy" , "quicklook size in y-direction (used if no sampling ratio is given)" );
MandatoryOff("sy");
DisableParameter("sy");
......
......@@ -178,27 +178,26 @@ private:
//SetDefaultParameterInt("channels.rho1240", 1);
AddParameter(ParameterType_ListView, "list", "Available Radiometric Indices");
SetParameterDescription("list","List of available radiometric indices with their relevant channels in brackets:\n\
Vegetation:NDVI - Normalized difference vegetation index (Red, NIR)\n\
Vegetation:TNDVI - Transformed normalized difference vegetation index (Red, NIR)\n\
Vegetation:RVI - Ratio vegetation index (Red, NIR)\n\
Vegetation:SAVI - Soil adjusted vegetation index (Red, NIR)\n\
Vegetation:TSAVI - Transformed soil adjusted vegetation index (Red, NIR)\n\
Vegetation:MSAVI - Modified soil adjusted vegetation index (Red, NIR)\n\
Vegetation:MSAVI2 - Modified soil adjusted vegetation index 2 (Red, NIR)\n\
Vegetation:GEMI - Global environment monitoring index (Red, NIR)\n\
Vegetation:IPVI - Infrared percentage vegetation index (Red, NIR)\n\
\n\
Water:NDWI - Normalized difference water index (Gao 1996) (NIR, MIR)\n\
Water:NDWI2 - Normalized difference water index (Mc Feeters 1996) (Green, NIR)\n\
Water:MNDWI - Modified normalized difference water index (Xu 2006) (Green, MIR)\n\
Water:NDPI - Normalized difference pond index (Lacaux et al.) (MIR, Green)\n\
Water:NDTI - Normalized difference turbidity index (Lacaux et al.) (Red, Green)\n\
\n\
Soil:RI - Redness index (Red, Green)\n\
Soil:CI - Color index (Red, Green)\n\
Soil:BI - Brightness index (Red, Green)\n\
Soil:BI2 - Brightness index 2 (NIR, Red, Green)");
SetParameterDescription("list",
"List of available radiometric indices with their relevant channels in brackets:\n\n"
"* Vegetation:NDVI - Normalized difference vegetation index (Red, NIR)\n"
"* Vegetation:TNDVI - Transformed normalized difference vegetation index (Red, NIR)\n"
"* Vegetation:RVI - Ratio vegetation index (Red, NIR)\n"
"* Vegetation:SAVI - Soil adjusted vegetation index (Red, NIR)\n"
"* Vegetation:TSAVI - Transformed soil adjusted vegetation index (Red, NIR)\n"
"* Vegetation:MSAVI - Modified soil adjusted vegetation index (Red, NIR)\n"
"* Vegetation:MSAVI2 - Modified soil adjusted vegetation index 2 (Red, NIR)\n"
"* Vegetation:GEMI - Global environment monitoring index (Red, NIR)\n"
"* Vegetation:IPVI - Infrared percentage vegetation index (Red, NIR)\n"
"* Water:NDWI - Normalized difference water index (Gao 1996) (NIR, MIR)\n"
"* Water:NDWI2 - Normalized difference water index (Mc Feeters 1996) (Green, NIR)\n"
"* Water:MNDWI - Modified normalized difference water index (Xu 2006) (Green, MIR)\n"
"* Water:NDPI - Normalized difference pond index (Lacaux et al.) (MIR, Green)\n"
"* Water:NDTI - Normalized difference turbidity index (Lacaux et al.) (Red, Green)\n"
"* Soil:RI - Redness index (Red, Green)\n"
"* Soil:CI - Color index (Red, Green)\n"
"* Soil:BI - Brightness index (Red, Green)\n"
"* Soil:BI2 - Brightness index 2 (NIR, Red, Green)");
// Doc example parameter settings
SetDocExampleParameterValue("in", "qb_RoadExtract.tif");
......
......@@ -68,25 +68,25 @@ private:
"This application performs a mathematical operation on several multi-band "
"images and outputs the result into a monoband image. The given expression"
" is computed at each pixel position. Evaluation of the "
"mathematical formula is done by the muParser libraries.\n\n"
"mathematical formula is done by the muParser library.\n\n"
"The formula can be written using:\n\n"
" * numerical values ( 2.3, -5, 3.1e4, ...)\n"
" * variables containing pixel values (e.g. : 'im2b3' is the pixel value"
" * variables containing pixel values (e.g. : ``im2b3`` is the pixel value"
" in 2nd image, 3rd band)\n"
" * binary operators:\n\n"
" * '+' addition, '-' subtraction, '*' multiplication, '/' division\n"
" * '^' raise x to the power of y\n"
" * '<' less than, '>' greater than, '<=' less or equal, '>=' greater or equal\n"
" * '==' equal, '!=' not equal\n"
" * ``+`` addition, ``-`` subtraction, ``*`` multiplication, ``/`` division\n"
" * ``^`` raise x to the power of y\n"
" * ``<`` less than, ``>`` greater than, ``<=`` less or equal, ``>=`` greater or equal\n"
" * ``==`` equal, ``!=`` not equal\n"
#ifdef OTB_MUPARSER_HAS_CXX_LOGICAL_OPERATORS
" * '||' logical or, '&&' logical and\n"
" * if-then-else operator: '(condition ? value_true : value_false)'\n"
" * ``||`` logical or, ``&&`` logical and\n"
" * if-then-else operator: ``(condition ? value_true : value_false)``\n"
#else
" * 'or' logical or, 'and' logical and\n"
" * if-then-else operator: 'if(condition;value_true;value_false)'\n"
" * ``or`` logical or, ``and`` logical and\n"
" * if-then-else operator: ``if(condition;value_true;value_false)``\n"
#endif
" * functions : exp(), log(), sin(), cos(), min(), max(), ...\n\n"
" * functions : ``exp()``, ``log()``, ``sin()``, ``cos()``, ``min()``, ``max()``, ...\n\n"
"The full list of features and operators is available on the muParser website [1]."
);
......@@ -96,17 +96,17 @@ private:
SetDocSeeAlso("[1] http://beltoforion.de/article.php?a=muparser");
AddDocTag(Tags::Manip);
AddParameter( ParameterType_InputImageList, "il", "Input image-list" );
AddParameter( ParameterType_InputImageList, "il", "Input image list" );