Commit c248088f authored by Victor Poughon's avatar Victor Poughon

DOC: fix cookbook warnings

parent ad7d7f72
...@@ -134,7 +134,7 @@ private: ...@@ -134,7 +134,7 @@ private:
void DoUpdateParameters() override void DoUpdateParameters() override
{ {
// Nothing to do here : all parameters are independent // Nothing to do here: all parameters are independent
} }
void DoExecute() override void DoExecute() override
......
...@@ -256,7 +256,7 @@ protected: ...@@ -256,7 +256,7 @@ protected:
GetInternalApplication("training")->SetParameterString("io.out", modelFileName); GetInternalApplication("training")->SetParameterString("io.out", modelFileName);
ExecuteInternal( "training" ); ExecuteInternal( "training" );
otbAppLogINFO("output model : " << GetInternalApplication("training")->GetParameterString("io.out")); otbAppLogINFO("output model: " << GetInternalApplication("training")->GetParameterString("io.out"));
} }
void ComputeImageStatistics( ImageBaseType * img, void ComputeImageStatistics( ImageBaseType * img,
...@@ -267,7 +267,7 @@ protected: ...@@ -267,7 +267,7 @@ protected:
GetInternalApplication("imgstats")->SetParameterString("out", imagesStatsFileName); GetInternalApplication("imgstats")->SetParameterString("out", imagesStatsFileName);
ExecuteInternal( "imgstats" ); ExecuteInternal( "imgstats" );
otbAppLogINFO("image statistics file : " << GetInternalApplication("imgstats")->GetParameterString("out")); otbAppLogINFO("image statistics file: " << GetInternalApplication("imgstats")->GetParameterString("out"));
} }
...@@ -288,7 +288,7 @@ protected: ...@@ -288,7 +288,7 @@ protected:
std::ifstream infile(modelFileName); std::ifstream infile(modelFileName);
if(!infile) if(!infile)
{ {
itkExceptionMacro(<< "File : " << modelFileName << " couldn't be opened"); itkExceptionMacro(<< "File: " << modelFileName << " couldn't be opened");
} }
// get the line with the centroids (starts with "2 ") // get the line with the centroids (starts with "2 ")
...@@ -327,7 +327,7 @@ protected: ...@@ -327,7 +327,7 @@ protected:
class KMeansFileNamesHandler class KMeansFileNamesHandler
{ {
public : public:
KMeansFileNamesHandler(const std::string &outPath) KMeansFileNamesHandler(const std::string &outPath)
{ {
tmpVectorFile = outPath + "_imgEnvelope.shp"; tmpVectorFile = outPath + "_imgEnvelope.shp";
...@@ -403,21 +403,22 @@ private: ...@@ -403,21 +403,22 @@ private:
SetDescription("Unsupervised KMeans image classification"); SetDescription("Unsupervised KMeans image classification");
SetDocName("Unsupervised KMeans image classification"); SetDocName("Unsupervised KMeans image classification");
SetDocLongDescription("Performs unsupervised KMeans image classification." SetDocLongDescription("Unsupervised KMeans image classification. "
"KMeansClassification is a composite application, " "KMeansClassification is a composite application, "
"using an existing training and classification application." "using an existing training and classification application. "
"The SharkKMeans model is used.\n" "The SharkKMeans model is used.\n\n"
"KMeansClassification application is only available if OTB is compiled with Shark support" "KMeansClassification application is only available if OTB is compiled with Shark support"
"(CMake option OTB_USE_SHARK=ON)\n" "(CMake option :code:`OTB_USE_SHARK=ON`).\n\n"
"The steps of this composite application :\n"
"1) ImageEnveloppe : create a shapefile (1 polygon),\n" "The steps of this composite application:\n\n"
"2) PolygonClassStatistics : compute the statistics,\n" "1) ImageEnvelope: create a shapefile (1 polygon),\n"
"3) SampleSelection : select the samples by constant strategy in the shapefile " "2) PolygonClassStatistics: compute the statistics,\n"
"3) SampleSelection: select the samples by constant strategy in the shapefile "
"(1000000 samples max),\n" "(1000000 samples max),\n"
"4) SamplesExtraction : extract the samples descriptors (update of SampleSelection output file),\n" "4) SampleExtraction: extract the samples descriptors (update of SampleSelection output file),\n"
"5) ComputeImagesStatistics : compute images second order statistics,\n" "5) ComputeImagesStatistics: compute images second order statistics,\n"
"6) TrainVectorClassifier : train the SharkKMeans model,\n" "6) TrainVectorClassifier: train the SharkKMeans model,\n"
"7) ImageClassifier : performs the classification of the input image " "7) ImageClassifier: performs the classification of the input image "
"according to a model file.\n\n" "according to a model file.\n\n"
"It's possible to choice random/periodic modes of the SampleSelection application.\n" "It's possible to choice random/periodic modes of the SampleSelection application.\n"
"If you want keep the temporary files (sample selected, model file, ...), " "If you want keep the temporary files (sample selected, model file, ...), "
...@@ -426,8 +427,8 @@ private: ...@@ -426,8 +427,8 @@ private:
SetDocLimitations("The application doesn't support NaN in the input image"); SetDocLimitations("The application doesn't support NaN in the input image");
SetDocAuthors("OTB-Team"); SetDocAuthors("OTB-Team");
SetDocSeeAlso("ImageEnveloppe PolygonClassStatistics SampleSelection SamplesExtraction " SetDocSeeAlso("ImageEnvelope, PolygonClassStatistics, SampleSelection, SampleExtraction, "
"PolygonClassStatistics TrainVectorClassifier ImageClassifier\n" "PolygonClassStatistics, TrainVectorClassifier, ImageClassifier.\n\n"
"[1] http://image.diku.dk/shark/sphinx_pages/build/html/rest_sources/tutorials/algorithms/kmeans.html"); "[1] http://image.diku.dk/shark/sphinx_pages/build/html/rest_sources/tutorials/algorithms/kmeans.html");
AddDocTag(Tags::Learning); AddDocTag(Tags::Learning);
......
...@@ -70,44 +70,45 @@ private: ...@@ -70,44 +70,45 @@ private:
"PolygonClassStatistics. The statistics file is then used to compute the " "PolygonClassStatistics. The statistics file is then used to compute the "
"sampling rates for each class in each image. Several types of sampling " "sampling rates for each class in each image. Several types of sampling "
" are implemented. Each one is a combination of a mono-image strategy " " are implemented. Each one is a combination of a mono-image strategy "
"and a multi-image mode. The mono-image strategies are :\n\n" "and a multi-image mode. The mono-image strategies are:\n\n"
" * smallest (default) : select the same number of sample in each "
"* smallest (default): select the same number of sample in each "
"class so that the smallest one is fully sampled.\n" "class so that the smallest one is fully sampled.\n"
" * constant : select the same number of samples N in each class " "* constant: select the same number of samples N in each class "
"(with N below or equal to the size of the smallest class).\n" "(with N below or equal to the size of the smallest class).\n"
" * byclass : set the required number for each class manually, with an " "* byclass: set the required number for each class manually, with an "
"input CSV file (first column is class name, second one is the required " "input CSV file (first column is class name, second one is the required "
"samples number).\n\n" "samples number).\n\n"
"The multi-image modes (mim) are proportional, equal and custom. The custom " "The multi-image modes (mim) are proportional, equal and custom. The custom "
"mode lets the users choose the distribution of samples among the " "mode lets the users choose the distribution of samples among the "
"images. The different behaviours are described below. Ti(c) and Ni(c) " "images. The different behaviours are described below. Ti(c) and Ni(c) "
" refers resp. to the total number and needed number of samples in " " refers resp. to the total number and needed number of samples in "
"image i for class c. Let's call L the total number of images.\n" "image i for class c. Let's call L the total number of images.\n\n"
" * strategy = all\n\n" "* strategy = all\n\n"
" - Same behaviour for all modes : take all samples\n\n" " - Same behaviour for all modes: take all samples\n\n"
" * strategy = constant :" "* strategy = constant:"
" let's call M the global number of samples required per class." " let's call M the global number of samples required per class."
" For each image i and each class c:\n\n" " For each image i and each class c:\n\n"
" - if mim = proportional, then Ni( c ) = M * Ti( c ) / sum_k( Tk(c) )\n\n" " - if mim = proportional, then Ni( c ) = M * Ti( c ) / sum_k( Tk(c) )\n\n"
" - if mim = equal , then Ni( c ) = M / L\n\n" " - if mim = equal , then Ni( c ) = M / L\n\n"
" - if mim = custom , then Ni( c ) = Mi where Mi is the custom requested number of samples for image i\n\n" " - if mim = custom , then Ni( c ) = Mi where Mi is the custom requested number of samples for image i\n\n"
" * strategy = byClass :" "* strategy = byClass :"
" let's call M(c) the global number of samples for class c)." " let's call M(c) the global number of samples for class c)."
" For each image i and each class c:\n\n" " For each image i and each class c:\n\n"
" - if mim = proportional, then Ni( c ) = M(c) * Ti( c ) / sum_k( Tk(c) )\n\n" " - if mim = proportional, then Ni( c ) = M(c) * Ti( c ) / sum_k( Tk(c) )\n\n"
" - if mim = equal , then Ni( c ) = M(c) / L\n\n" " - if mim = equal , then Ni( c ) = M(c) / L\n\n"
" - if mim = custom , then Ni( c ) = Mi(c) where Mi(c) is the custom requested number of samples for image i and class c\n\n" " - if mim = custom , then Ni( c ) = Mi(c) where Mi(c) is the custom requested number of samples for image i and class c\n\n"
" * strategy = percent :" "* strategy = percent :"
" For each image i and each class c:\n\n" " For each image i and each class c:\n\n"
" - if mim = proportional, then Ni( c ) = p * Ti( c ) where p is the global percentage of samples\n\n" " - if mim = proportional, then Ni( c ) = p * Ti( c ) where p is the global percentage of samples\n\n"
" - if mim = equal , then Ni( c ) = p * sum_k(Tk(c)]/L where p is the global percentage of samples\n\n" " - if mim = equal , then Ni( c ) = p * sum_k(Tk(c)]/L where p is the global percentage of samples\n\n"
" - if mim = custom , then Ni( c ) = p(i) * Ti(c) where p(i) is the percentage of samples for image i. c\n\n" " - if mim = custom , then Ni( c ) = p(i) * Ti(c) where p(i) is the percentage of samples for image i. c\n\n"
" * strategy = total :" "* strategy = total :"
" For each image i and each class c:\n\n" " For each image i and each class c:\n\n"
" - if mim = proportional, then Ni( c ) = total * (sum_k(Ti(k))/sum_kl(Tl(k))) * (Ti(c)/sum_k(Ti(k))) where total is the total number of samples specified.\n\n" " - if mim = proportional, then Ni( c ) = total * (sum_k(Ti(k))/sum_kl(Tl(k))) * (Ti(c)/sum_k(Ti(k))) where total is the total number of samples specified.\n\n"
" - if mim = equal , then Ni( c ) = (total / L) * (Ti(c)/sum_k(Ti(k))) where total is the total number of samples specified.\n\n" " - if mim = equal , then Ni( c ) = (total / L) * (Ti(c)/sum_k(Ti(k))) where total is the total number of samples specified.\n\n"
" - if mim = custom , then Ni( c ) = total(i) * (Ti(c)/sum_k(Ti(k))) where total(i) is the total number of samples specified for image i. \n\n" " - if mim = custom , then Ni( c ) = total(i) * (Ti(c)/sum_k(Ti(k))) where total(i) is the total number of samples specified for image i. \n\n"
" * strategy = smallest class\n\n" "* strategy = smallest class\n\n"
" - if mim = proportional, then the smallest class size (computed globally) is used for the strategy constant+proportional.\n\n" " - if mim = proportional, then the smallest class size (computed globally) is used for the strategy constant+proportional.\n\n"
" - if mim = equal , then the smallest class size (computed globally) is used for the strategy constant+equal.\n\n" " - if mim = equal , then the smallest class size (computed globally) is used for the strategy constant+equal.\n\n"
" - if mim = custom , then the smallest class is computed and used for each image separately." " - if mim = custom , then the smallest class is computed and used for each image separately."
......
...@@ -70,17 +70,17 @@ private: ...@@ -70,17 +70,17 @@ private:
AddParameter(ParameterType_InputVectorData, "inshp", "Name of the input shapefile"); AddParameter(ParameterType_InputVectorData, "inshp", "Name of the input shapefile");
SetParameterDescription("inshp","Name of the input shapefile"); SetParameterDescription("inshp","Name of the input shapefile");
AddParameter(ParameterType_InputFilename, "instats", "XML file containing mean and variance of each feature."); AddParameter(ParameterType_InputFilename, "instats", "XML file containing mean and variance of each feature");
SetParameterDescription("instats", "XML file containing mean and variance of each feature."); SetParameterDescription("instats", "XML file containing mean and variance of each feature.");
AddParameter(ParameterType_OutputFilename, "insvm", "Input model filename."); AddParameter(ParameterType_OutputFilename, "insvm", "Input model filename");
SetParameterDescription("insvm", "Input model filename."); SetParameterDescription("insvm", "Input model filename.");
AddParameter(ParameterType_ListView, "feat", "Features"); AddParameter(ParameterType_ListView, "feat", "Features");
SetParameterDescription("feat","Features to be calculated"); SetParameterDescription("feat","Features to be calculated");
AddParameter(ParameterType_String,"cfield","Field containing the predicted class."); AddParameter(ParameterType_String,"cfield","Field containing the predicted class");
SetParameterDescription("cfield","Field containing the predicted class"); SetParameterDescription("cfield","Field containing the predicted class");
SetParameterString("cfield","predicted"); SetParameterString("cfield","predicted");
......
...@@ -74,18 +74,18 @@ private: ...@@ -74,18 +74,18 @@ private:
// Documentation // Documentation
SetDocName("Polygon Class Statistics"); SetDocName("Polygon Class Statistics");
SetDocLongDescription("The application processes a set of geometries " SetDocLongDescription("Process a set of geometries intended for training (they should have a field giving the associated "
"intended for training (they should have a field giving the associated " "class). The geometries are analyzed against a support image to compute statistics:\n\n"
"class). The geometries are analyzed against a support image to compute " "* Number of samples per class\n"
"statistics : \n" "* Number of samples per geometry\n\n"
" - number of samples per class\n"
" - number of samples per geometry\n"
"An optional raster mask can be used to discard samples. Different types" "An optional raster mask can be used to discard samples. Different types"
" of geometry are supported : polygons, lines, points. The behaviour is " " of geometry are supported: polygons, lines, points. The behaviour is "
"different for each type of geometry :\n" "different for each type of geometry:\n\n"
" - polygon: select pixels whose center is inside the polygon\n" "* Polygon: select pixels whose center is inside the polygon\n"
" - lines : select pixels intersecting the line\n" "* Lines: select pixels intersecting the line\n"
" - points : select closest pixel to the point"); "* Points: select closest pixel to the point");
SetDocLimitations("None"); SetDocLimitations("None");
SetDocAuthors("OTB-Team"); SetDocAuthors("OTB-Team");
SetDocSeeAlso(" "); SetDocSeeAlso(" ");
......
...@@ -146,10 +146,11 @@ private: ...@@ -146,10 +146,11 @@ private:
SetParameterDescription("iv", "Maximum initial neuron weight"); SetParameterDescription("iv", "Maximum initial neuron weight");
MandatoryOff("iv"); MandatoryOff("iv");
AddRANDParameter();
AddRAMParameter(); AddRAMParameter();
// TODO : replace StreamingLines by RAM param ? // TODO : replace StreamingLines by RAM param ?
AddRANDParameter();
// Default parameters // Default parameters
SetDefaultParameterFloat("tp", 1.0); SetDefaultParameterFloat("tp", 1.0);
SetDefaultParameterInt("sx", 32); SetDefaultParameterInt("sx", 32);
......
...@@ -94,7 +94,7 @@ private: ...@@ -94,7 +94,7 @@ private:
"be generated."); "be generated.");
SetDefaultParameterInt("samples",100); SetDefaultParameterInt("samples",100);
AddParameter(ParameterType_ListView, "exclude", "Field names for excluded features."); AddParameter(ParameterType_ListView, "exclude", "Field names for excluded features");
SetParameterDescription("exclude", SetParameterDescription("exclude",
"List of field names in the input vector data that will not be generated in the output file."); "List of field names in the input vector data that will not be generated in the output file.");
...@@ -122,8 +122,7 @@ private: ...@@ -122,8 +122,7 @@ private:
"by using the SMOTE algorithm (http://dx.doi.org/10.1613/jair.953) " "by using the SMOTE algorithm (http://dx.doi.org/10.1613/jair.953) "
"on input samples which are " "on input samples which are "
"randomly selected with replacement."); "randomly selected with replacement.");
AddParameter(ParameterType_Int, "strategy.smote.neighbors", AddParameter(ParameterType_Int, "strategy.smote.neighbors", "Number of nearest neighbors");
"Number of nearest neighbors.");
SetParameterDescription("strategy.smote.neighbors", SetParameterDescription("strategy.smote.neighbors",
"Number of nearest neighbors to be used in the " "Number of nearest neighbors to be used in the "
"SMOTE algorithm"); "SMOTE algorithm");
......
...@@ -213,10 +213,10 @@ private: ...@@ -213,10 +213,10 @@ private:
ElevationParametersHandler::AddElevationParameters(this, "elev"); ElevationParametersHandler::AddElevationParameters(this, "elev");
AddRAMParameter();
AddRANDParameter(); AddRANDParameter();
AddRAMParameter();
// Doc example parameter settings // Doc example parameter settings
SetDocExampleParameterValue("in", "support_image.tif"); SetDocExampleParameterValue("in", "support_image.tif");
SetDocExampleParameterValue("vec", "variousVectors.sqlite"); SetDocExampleParameterValue("vec", "variousVectors.sqlite");
......
...@@ -126,7 +126,7 @@ private: ...@@ -126,7 +126,7 @@ private:
"Caution, the 'cfield' must not exist in the input file if you are updating the file."); "Caution, the 'cfield' must not exist in the input file if you are updating the file.");
SetParameterString("cfield","predicted"); SetParameterString("cfield","predicted");
AddParameter(ParameterType_ListView, "feat", "Field names to be calculated."); AddParameter(ParameterType_ListView, "feat", "Field names to be calculated");
SetParameterDescription("feat","List of field names in the input vector data used as features for training. " SetParameterDescription("feat","List of field names in the input vector data used as features for training. "
"Put the same field names as the TrainVectorClassifier application."); "Put the same field names as the TrainVectorClassifier application.");
......
...@@ -32,20 +32,18 @@ void LearningApplicationBase<TInputValue, TOutputValue>::InitSharkKMeansParams() ...@@ -32,20 +32,18 @@ void LearningApplicationBase<TInputValue, TOutputValue>::InitSharkKMeansParams()
{ {
AddChoice( "classifier.sharkkm", "Shark kmeans classifier" ); AddChoice( "classifier.sharkkm", "Shark kmeans classifier" );
SetParameterDescription("classifier.sharkkm", "http://image.diku.dk/shark/sphinx_pages/build/html/rest_sources/tutorials/algorithms/kmeans.html "); 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." );
SetParameterInt( "classifier.sharkkm.maxiter", 10 );
SetMinimumParameterIntValue( "classifier.sharkkm.maxiter", 0 );
SetParameterDescription( "classifier.sharkkm.maxiter",
"The maximum number of iteration for the kmeans algorithm. 0=unlimited" );
//MaxNumberOfIterations // MaxNumberOfIterations
AddParameter( ParameterType_Int, "classifier.sharkkm.k", "The number of class used for the kmeans algorithm." ); AddParameter(ParameterType_Int, "classifier.sharkkm.maxiter", "Maximum number of iterations for the kmeans algorithm");
SetParameterInt( "classifier.sharkkm.k", 2 ); SetParameterInt("classifier.sharkkm.maxiter", 10);
SetParameterDescription( "classifier.sharkkm.k", SetMinimumParameterIntValue("classifier.sharkkm.maxiter", 0);
"The number of class used for the kmeans algorithm. Default set to 2 class" ); SetParameterDescription("classifier.sharkkm.maxiter", "The maximum number of iterations for the kmeans algorithm. 0=unlimited");
SetMinimumParameterIntValue( "classifier.sharkkm.k", 2 );
// Number of classes
AddParameter(ParameterType_Int, "classifier.sharkkm.k", "Number of classes for the kmeans algorithm");
SetParameterInt("classifier.sharkkm.k", 2);
SetParameterDescription("classifier.sharkkm.k", "The number of classes used for the kmeans algorithm. Default set to 2 class");
SetMinimumParameterIntValue("classifier.sharkkm.k", 2);
} }
template<class TInputValue, class TOutputValue> template<class TInputValue, class TOutputValue>
......
...@@ -36,7 +36,7 @@ void TrainVectorBase::DoInit() ...@@ -36,7 +36,7 @@ void TrainVectorBase::DoInit()
AddParameter( ParameterType_InputVectorDataList, "io.vd", "Input Vector Data" ); AddParameter( ParameterType_InputVectorDataList, "io.vd", "Input Vector Data" );
SetParameterDescription( "io.vd", SetParameterDescription( "io.vd",
"Input geometries used for training (note : all geometries from the layer will be used)" ); "Input geometries used for training (note: all geometries from the layer will be used)" );
AddParameter( ParameterType_InputFilename, "io.stats", "Input XML image statistics file" ); AddParameter( ParameterType_InputFilename, "io.stats", "Input XML image statistics file" );
MandatoryOff( "io.stats" ); MandatoryOff( "io.stats" );
......
...@@ -87,7 +87,7 @@ private: ...@@ -87,7 +87,7 @@ private:
SetDescription("Compute homologous points between images using keypoints"); SetDescription("Compute homologous points between images using keypoints");
SetDocLongDescription("This application allows computing homologous points between images using keypoints. " SetDocLongDescription("This application allows computing homologous points between images using keypoints. "
" SIFT or SURF keypoints can be used and the band on which keypoints are computed can be set independently for both images." " SIFT or SURF keypoints can be used and the band on which keypoints are computed can be set independently for both images."
" The application offers two modes :" " The application offers two modes:"
" the first is the full mode where keypoints are extracted from the full extent of both images" " the first is the full mode where keypoints are extracted from the full extent of both images"
" (please note that in this mode large image file are not supported). " " (please note that in this mode large image file are not supported). "
"The second mode, called geobins, allows one to set-up spatial binning to get fewer points" "The second mode, called geobins, allows one to set-up spatial binning to get fewer points"
...@@ -143,7 +143,7 @@ private: ...@@ -143,7 +143,7 @@ private:
SetMinimumParameterFloatValue("threshold",0.0); SetMinimumParameterFloatValue("threshold",0.0);
SetDefaultParameterFloat("threshold",0.6); SetDefaultParameterFloat("threshold",0.6);
AddParameter(ParameterType_Bool,"backmatching","Use back-matching to filter matches."); AddParameter(ParameterType_Bool,"backmatching","Use back-matching to filter matches");
SetParameterDescription("backmatching","If set to true, matches should be consistent in both ways."); SetParameterDescription("backmatching","If set to true, matches should be consistent in both ways.");
AddParameter(ParameterType_Choice,"mode","Keypoints search mode"); AddParameter(ParameterType_Choice,"mode","Keypoints search mode");
...@@ -179,7 +179,7 @@ private: ...@@ -179,7 +179,7 @@ private:
SetMinimumParameterIntValue("mode.geobins.margin",0); SetMinimumParameterIntValue("mode.geobins.margin",0);
SetDefaultParameterInt("mode.geobins.margin",10); SetDefaultParameterInt("mode.geobins.margin",10);
AddParameter(ParameterType_Float,"precision","Estimated precision of the colocalisation function (in pixels)."); AddParameter(ParameterType_Float,"precision","Estimated precision of the colocalisation function (in pixels)");
SetParameterDescription("precision","Estimated precision of the colocalisation function in pixels"); SetParameterDescription("precision","Estimated precision of the colocalisation function in pixels");
SetDefaultParameterFloat("precision",0.); SetDefaultParameterFloat("precision",0.);
...@@ -425,7 +425,7 @@ private: ...@@ -425,7 +425,7 @@ private:
largestRegion.ShrinkByRadius(image_border_margin); largestRegion.ShrinkByRadius(image_border_margin);
region1.Crop(largestRegion); region1.Crop(largestRegion);
otbAppLogINFO("("<<i+1<<"/"<<nb_bins_x<<", "<<j+1<<"/"<<nb_bins_y<<") Considering region1 : "<<region1.GetIndex()<<", "<<region1.GetSize()); otbAppLogINFO("("<<i+1<<"/"<<nb_bins_x<<", "<<j+1<<"/"<<nb_bins_y<<") Considering region1: "<<region1.GetIndex()<<", "<<region1.GetSize());
extractChannel1->SetExtractionRegion(region1); extractChannel1->SetExtractionRegion(region1);
......
...@@ -88,8 +88,7 @@ private: ...@@ -88,8 +88,7 @@ private:
SetParameterDescription("io", "This group of parameters allows setting input and output data."); SetParameterDescription("io", "This group of parameters allows setting input and output data.");
AddParameter(ParameterType_InputVectorData, "io.vd", "Input Vector Data"); AddParameter(ParameterType_InputVectorData, "io.vd", "Input Vector Data");
SetParameterDescription("io.vd", "Input geometries used for training (note " SetParameterDescription("io.vd", "Input geometries used for training (note: all geometries from the layer will be used)");
": all geometries from the layer will be used)");
AddParameter(ParameterType_OutputFilename, "io.out", "Output model"); AddParameter(ParameterType_OutputFilename, "io.out", "Output model");
SetParameterDescription("io.out", "Output file containing the estimated model (.txt format)."); SetParameterDescription("io.out", "Output file containing the estimated model (.txt format).");
...@@ -98,9 +97,8 @@ private: ...@@ -98,9 +97,8 @@ private:
MandatoryOff("io.stats"); MandatoryOff("io.stats");
SetParameterDescription("io.stats", "XML file containing mean and variance of each feature."); SetParameterDescription("io.stats", "XML file containing mean and variance of each feature.");
AddParameter(ParameterType_StringList, "feat", "Field names to be used for training."); // AddParameter(ParameterType_StringList, "feat", "Field names to be used for training");
SetParameterDescription("feat","List of field names in the input vector data" SetParameterDescription("feat","List of field names in the input vector data used as features for training.");
" used as features for training."); //
Superclass::DoInit(); Superclass::DoInit();
......
...@@ -80,7 +80,7 @@ protected: ...@@ -80,7 +80,7 @@ protected:
DimensionalityReductionModelFactoryType::CleanFactories(); DimensionalityReductionModelFactoryType::CleanFactories();
} }
private: private:
void DoInit() override void DoInit() override
{ {
SetName("VectorDimensionalityReduction"); SetName("VectorDimensionalityReduction");
...@@ -115,11 +115,10 @@ private: ...@@ -115,11 +115,10 @@ private:
"In overwrite mode, the original features will be lost."); "In overwrite mode, the original features will be lost.");
MandatoryOff("out"); MandatoryOff("out");
AddParameter(ParameterType_ListView, "feat", "Input features to use for reduction."); // AddParameter(ParameterType_ListView, "feat", "Input features to use for reduction");
SetParameterDescription("feat","List of field names in the input vector " SetParameterDescription("feat", "List of field names in the input vector data used as features for reduction.");
"data used as features for reduction."); //
AddParameter(ParameterType_Choice, "featout", "Output feature"); // AddParameter(ParameterType_Choice, "featout", "Output feature");
SetParameterDescription("featout", "Naming of output features"); SetParameterDescription("featout", "Naming of output features");
AddChoice("featout.prefix", "Prefix"); AddChoice("featout.prefix", "Prefix");
...@@ -134,22 +133,24 @@ private: ...@@ -134,22 +133,24 @@ private:
SetParameterDescription("featout.list", "Use a list with all names"); SetParameterDescription("featout.list", "Use a list with all names");
AddParameter(ParameterType_StringList, "featout.list.names", "Feature name list"); AddParameter(ParameterType_StringList, "featout.list.names", "Feature name list");
SetParameterDescription("featout.list.names","List of field names for the output " SetParameterDescription("featout.list.names",
"features which result from the reduction."); // "List of field names for the output "
"features which result from the reduction.");
AddParameter(ParameterType_Int, "pcadim", "Principal component dimension"); //
SetParameterDescription("pcadim","This optional parameter can be set to " AddParameter(ParameterType_Int, "pcadim", "Principal component dimension");
"reduce the number of eignevectors used in the PCA model file. This " SetParameterDescription("pcadim",
"parameter can't be used for other models"); // "This optional parameter can be set to "
"reduce the number of eignevectors used in the PCA model file. This "
"parameter can't be used for other models");
MandatoryOff("pcadim"); MandatoryOff("pcadim");
AddParameter(ParameterType_Choice, "mode", "Writing mode"); // AddParameter(ParameterType_Choice, "mode", "Writing mode");
SetParameterDescription("mode", "This parameter determines if the output " SetParameterDescription("mode", "This parameter determines if the output "
"file is overwritten or updated [overwrite/update]. If an output file " "file is overwritten or updated [overwrite/update]. If an output file "
"name is given, the original file is copied before creating the new features."); "name is given, the original file is copied before creating the new features.");
AddChoice("mode.overwrite", "Overwrite"); AddChoice("mode.overwrite", "Overwrite");
SetParameterDescription("mode.overwrite","Overwrite mode"); // SetParameterDescription("mode.overwrite", "Overwrite mode");
AddChoice("mode.update", "Update"); AddChoice("mode.update", "Update");
SetParameterDescription("mode.update", "Update mode"); SetParameterDescription("mode.update", "Update mode");
...@@ -160,7 +161,7 @@ private: ...@@ -160,7 +161,7 @@ private:
SetDocExampleParameterValue("model", "model.txt"); SetDocExampleParameterValue("model", "model.txt");
SetDocExampleParameterValue("out", "vectorDataOut.shp"); SetDocExampleParameterValue("out", "vectorDataOut.shp");
SetDocExampleParameterValue("feat", "perimeter area width"); SetDocExampleParameterValue("feat", "perimeter area width");
//SetOfficialDocLink(); SetOfficialDocLink();
} }
void DoUpdateParameters() override void DoUpdateParameters() override
......
...@@ -87,8 +87,6 @@ private: ...@@ -87,8 +87,6 @@ private:
SetDefaultParameterInt("channel", 1); SetDefaultParameterInt("channel", 1);
SetMinimumParameterIntValue("channel", 1); SetMinimumParameterIntValue("channel", 1);
AddRAMParameter();
AddParameter(ParameterType_Choice, "filter", "Edge feature"); AddParameter(ParameterType_Choice, "filter", "Edge feature");
SetParameterDescription("filter", "Choice of edge feature"); SetParameterDescription("filter", "Choice of edge feature");
...@@ -126,6 +124,8 @@ private: ...@@ -126,6 +124,8 @@ private:
SetDefaultParameterFloat("filter.canny.lowerthreshold", 3.0); SetDefaultParameterFloat("filter.canny.lowerthreshold", 3.0);
*/ */
AddRAMParameter();
// Doc example parameter settings // Doc example parameter settings
SetDocExampleParameterValue("in", "qb_RoadExtract.tif"); SetDocExampleParameterValue("in", "qb_RoadExtract.tif");
SetDocExampleParameterValue("channel", "1"); SetDocExampleParameterValue("channel", "1");
......
...@@ -62,7 +62,7 @@ private: ...@@ -62,7 +62,7 @@ private:
SetDocName( "Smoothing" ); SetDocName( "Smoothing" );
SetDocLongDescription( "This application applies a smoothing filter to an " SetDocLongDescription( "This application applies a smoothing filter to an "
"image. Three methodes can be used : a gaussian filter , a mean filter " "image. Three methodes can be used: a gaussian filter , a mean filter "
", or an anisotropic diffusion using the Perona-Malik algorithm." ); ", or an anisotropic diffusion using the Perona-Malik algorithm." );
SetDocLimitations( "None") ; SetDocLimitations( "None") ;
SetDocAuthors( "OTB-Team" ); SetDocAuthors( "OTB-Team" );
...@@ -75,8 +75,6 @@ private: ...@@ -75,8 +75,6 @@ private:
AddParameter( ParameterType_OutputImage , "out" , "Output Image" ); AddParameter( ParameterType_OutputImage , "out" , "Output Image" );
SetParameterDescription( "out" , "Output smoothed image." ); SetParameterDescription( "out" , "Output smoothed image." );
AddRAMParameter();
AddParameter( ParameterType_Choice, "type" , "Smoothing Type" ); AddParameter( ParameterType_Choice, "type" , "Smoothing Type" );
SetParameterDescription( "type", "Smoothing kernel to apply" ); SetParameterDescription( "type", "Smoothing kernel to apply" );
...@@ -118,6 +116,8 @@ private: ...@@ -118,6 +116,8 @@ private:
SetParameterString( "type" , "anidif"); SetParameterString( "type" , "anidif");
AddRAMParameter();
// Doc example parameter settings // Doc example parameter settings
SetExampleComment( "Image smoothing using a mean filter." , 0 ); SetExampleComment( "Image smoothing using a mean filter." , 0 );
SetDocExampleParameterValue( "in" , "Romania_Extract.tif" ); SetDocExampleParameterValue( "in" , "Romania_Extract.tif" );
...@@ -138,7 +138,7 @@ private: ...@@ -138,7 +138,7 @@ private:
void DoUpdateParameters() override void DoUpdateParameters() override
{ {
// Nothing to do here : all parameters are independent // Nothing to do here: all parameters are independent
} }
void DoExecute() override void DoExecute() override
......
...@@ -103,13 +103,13 @@ private: ...@@ -103,13 +103,13 @@ private:
"spectrum associated with each pixel is a linear combination of pure" "spectrum associated with each pixel is a linear combination of pure"
"materials in the recovery area, commonly known as endmembers. Endmembers can" "materials in the recovery area, commonly known as endmembers. Endmembers can"
"be estimated using the VertexComponentAnalysis application.\n\n" "be estimated using the VertexComponentAnalysis application.\n\n"
"The application allows estimating the abundance maps with several algorithms :\n" "The application allows estimating the abundance maps with several algorithms:\n\n"
" * Unconstrained Least Square (ucls)\n" "* Unconstrained Least Square (ucls)\n"
//" * Fully Constrained Least Square (fcls)\n"