Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
5da24b09
Commit
5da24b09
authored
Oct 26, 2011
by
Otmane Lahlou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: use the method SetDefaultParameter{Int,Float} when setting default values
parent
a067c357
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
34 additions
and
34 deletions
+34
-34
Applications/Classification/otbKMeansClassification.cxx
Applications/Classification/otbKMeansClassification.cxx
+5
-5
Applications/Classification/otbTrainSVMImagesClassifier.cxx
Applications/Classification/otbTrainSVMImagesClassifier.cxx
+2
-2
Applications/Hyperspectral/otbHyperspectralUnmixing.cxx
Applications/Hyperspectral/otbHyperspectralUnmixing.cxx
+1
-1
Applications/RadiometricIndices/otbRadiometricVegetationIndices.cxx
...ns/RadiometricIndices/otbRadiometricVegetationIndices.cxx
+2
-2
Applications/Radiometry/otbOpticalCalibration.cxx
Applications/Radiometry/otbOpticalCalibration.cxx
+4
-4
Applications/Segmentation/otbMeanShiftSegmentation.cxx
Applications/Segmentation/otbMeanShiftSegmentation.cxx
+4
-4
Applications/Test/otbTestApplication.cxx
Applications/Test/otbTestApplication.cxx
+2
-2
Applications/Util/otbExtractROI.cxx
Applications/Util/otbExtractROI.cxx
+5
-5
Applications/Util/otbMultiResolutionPyramid.cxx
Applications/Util/otbMultiResolutionPyramid.cxx
+3
-3
Applications/Util/otbRescale.cxx
Applications/Util/otbRescale.cxx
+2
-2
Applications/Util/otbSmoothing.cxx
Applications/Util/otbSmoothing.cxx
+4
-4
No files found.
Applications/Classification/otbKMeansClassification.cxx
View file @
5da24b09
...
...
@@ -100,19 +100,19 @@ private:
SetParameterDescription
(
"vm"
,
"Validity mask. Only non-zero pixels will be used to estimate KMeans modes."
);
AddParameter
(
ParameterType_Int
,
"ts"
,
"Training set size"
);
SetParameterDescription
(
"ts"
,
"Size of the training set."
);
SetParameterInt
(
"ts"
,
100
);
Set
Default
ParameterInt
(
"ts"
,
100
);
AddParameter
(
ParameterType_Float
,
"tp"
,
"Training set sample selection probability"
);
SetParameterDescription
(
"tp"
,
"Probability for a sample to be selected in the training set."
);
SetParameterFloat
(
"tp"
,
0.5
);
Set
Default
ParameterFloat
(
"tp"
,
0.5
);
AddParameter
(
ParameterType_Int
,
"nc"
,
"Number of classes"
);
SetParameterDescription
(
"nc"
,
"number of modes, which will be used to generate class membership."
);
SetParameterInt
(
"nc"
,
3
);
Set
Default
ParameterInt
(
"nc"
,
3
);
AddParameter
(
ParameterType_Float
,
"cp"
,
"Initial class centroid probability"
);
SetParameterDescription
(
"cp"
,
"Probability for a pixel to be selected as an initial class centroid"
);
SetParameterFloat
(
"cp"
,
0.8
);
Set
Default
ParameterFloat
(
"cp"
,
0.8
);
AddParameter
(
ParameterType_Int
,
"sl"
,
"Number of lines for each streaming block"
);
SetParameterDescription
(
"sl"
,
"input image will be divided into sl lines."
);
SetParameterInt
(
"sl"
,
1000
);
Set
Default
ParameterInt
(
"sl"
,
1000
);
}
void
DoUpdateParameters
()
...
...
Applications/Classification/otbTrainSVMImagesClassifier.cxx
View file @
5da24b09
...
...
@@ -183,11 +183,11 @@ private:
SetParameterDescription
(
"k"
,
"SVM Kernel Type."
);
AddParameter
(
ParameterType_Int
,
"mt"
,
"Maximum training sample size"
);
MandatoryOff
(
"mt"
);
SetParameterInt
(
"mt"
,
-
1
);
Set
Default
ParameterInt
(
"mt"
,
-
1
);
SetParameterDescription
(
"mt"
,
"Maximum size of the training sample (default = -1)."
);
AddParameter
(
ParameterType_Int
,
"mv"
,
"Maximum validation sample size"
);
MandatoryOff
(
"mv"
);
SetParameterInt
(
"mv"
,
-
1
);
Set
Default
ParameterInt
(
"mv"
,
-
1
);
SetParameterDescription
(
"mv"
,
"Maximum size of the validation sample (default = -1)"
);
AddParameter
(
ParameterType_Float
,
"vtr"
,
"training and validation sample ratio"
);
SetParameterDescription
(
"vtr"
,
...
...
Applications/Hyperspectral/otbHyperspectralUnmixing.cxx
View file @
5da24b09
...
...
@@ -131,7 +131,7 @@ private:
MandatoryOff
(
"dr"
);
AddParameter
(
ParameterType_Int
,
"ne"
,
"Number of endmembers"
);
SetParameterInt
(
"ne"
,
1
);
Set
Default
ParameterInt
(
"ne"
,
1
);
MandatoryOff
(
"ne"
);
AddParameter
(
ParameterType_Choice
,
"de"
,
"Dimensionnality estimation"
);
...
...
Applications/RadiometricIndices/otbRadiometricVegetationIndices.cxx
View file @
5da24b09
...
...
@@ -112,10 +112,10 @@ private:
SetParameterDescription
(
"channels"
,
"Channels selection"
);
AddParameter
(
ParameterType_Int
,
"channels.red"
,
"Red Channel"
);
SetParameterDescription
(
"channels.red"
,
"Red channel index"
);
SetParameterInt
(
"channels.red"
,
3
);
Set
Default
ParameterInt
(
"channels.red"
,
3
);
AddParameter
(
ParameterType_Int
,
"channels.nir"
,
"NIR Channel"
);
SetParameterDescription
(
"channels.nir"
,
"NIR channel index"
);
SetParameterInt
(
"channels.nir"
,
4
);
Set
Default
ParameterInt
(
"channels.nir"
,
4
);
AddParameter
(
ParameterType_Group
,
"index"
,
"Indices selection"
);
SetParameterDescription
(
"index"
,
"List of available radiometric indices"
);
...
...
Applications/Radiometry/otbOpticalCalibration.cxx
View file @
5da24b09
...
...
@@ -131,11 +131,11 @@ private:
AddParameter
(
ParameterType_Float
,
"atmo"
,
"Atmospheric Pressure"
);
AddParameter
(
ParameterType_Float
,
"opt"
,
"Aerosol Optical"
);
SetParameterFloat
(
"oz"
,
0.
);
SetParameterFloat
(
"wa"
,
2.5
);
SetParameterFloat
(
"atmo"
,
1030.
);
Set
Default
ParameterFloat
(
"oz"
,
0.
);
Set
Default
ParameterFloat
(
"wa"
,
2.5
);
Set
Default
ParameterFloat
(
"atmo"
,
1030.
);
SetParameterFloat
(
"opt"
,
0.2
);
Set
Default
ParameterFloat
(
"opt"
,
0.2
);
MandatoryOff
(
"oz"
);
MandatoryOff
(
"wa"
);
MandatoryOff
(
"atmo"
);
...
...
Applications/Segmentation/otbMeanShiftSegmentation.cxx
View file @
5da24b09
...
...
@@ -80,10 +80,10 @@ private:
AddParameter
(
ParameterType_Float
,
"ranger"
,
"Range radius"
);
AddParameter
(
ParameterType_Int
,
"minsize"
,
"Min region size"
);
AddParameter
(
ParameterType_Float
,
"scale"
,
"Scale"
);
SetParameterInt
(
"spatialr"
,
5
);
SetParameterFloat
(
"ranger"
,
15.0
);
SetParameterInt
(
"minsize"
,
100
);
SetParameterFloat
(
"scale"
,
100000.
);
Set
Default
ParameterInt
(
"spatialr"
,
5
);
Set
Default
ParameterFloat
(
"ranger"
,
15.0
);
Set
Default
ParameterInt
(
"minsize"
,
100
);
Set
Default
ParameterFloat
(
"scale"
,
100000.
);
}
void
DoUpdateParameters
()
...
...
Applications/Test/otbTestApplication.cxx
View file @
5da24b09
...
...
@@ -77,12 +77,12 @@ private:
AddChoice
(
"choice.choice2"
,
"Choice 2"
);
AddChoice
(
"choice.choice3"
,
"Choice 3"
);
AddParameter
(
ParameterType_Float
,
"choice.choice1.floatchoice1"
,
"Float of choice1"
);
SetParameterFloat
(
"choice.choice1.floatchoice1"
,
0.125
);
Set
Default
ParameterFloat
(
"choice.choice1.floatchoice1"
,
0.125
);
// Test a choice without associated parameter
// AddParameter(ParameterType_Float, "choice.choice2.floatchoice2", "Float of choice2");
// SetParameterFloat("choice.choice2.floatchoice2", 1.0);
AddParameter
(
ParameterType_Float
,
"choice.choice3.floatchoice3"
,
"Float of choice3"
);
SetParameterFloat
(
"choice.choice3.floatchoice3"
,
5.0
);
Set
Default
ParameterFloat
(
"choice.choice3.floatchoice3"
,
5.0
);
AddParameter
(
ParameterType_Group
,
"ingroup"
,
"Input Group"
);
...
...
Applications/Util/otbExtractROI.cxx
View file @
5da24b09
...
...
@@ -81,11 +81,11 @@ private:
SetParameterDescription
(
"sizex"
,
"size along x in pixels."
);
AddParameter
(
ParameterType_Int
,
"sizey"
,
"Size Y"
);
SetParameterDescription
(
"sizey"
,
"size along y in pixels."
);
// Default values
SetParameterInt
(
"startx"
,
0
);
SetParameterInt
(
"starty"
,
0
);
SetParameterInt
(
"sizex"
,
0
);
SetParameterInt
(
"sizey"
,
0
);
//
// Default values
//
Set
Default
ParameterInt("startx", 0);
//
Set
Default
ParameterInt("starty", 0);
//
Set
Default
ParameterInt("sizex", 0);
//
Set
Default
ParameterInt("sizey", 0);
// Channelist Parameters
AddParameter
(
ParameterType_ListView
,
"cl"
,
"Output Image channels"
);
...
...
Applications/Util/otbMultiResolutionPyramid.cxx
View file @
5da24b09
...
...
@@ -85,14 +85,14 @@ private:
SetParameterRole
(
"out"
,
Role_Output
);
AddParameter
(
ParameterType_Int
,
"level"
,
"Number Of Levels"
);
SetParameterInt
(
"level"
,
1
);
Set
Default
ParameterInt
(
"level"
,
1
);
SetParameterDescription
(
"level"
,
"Number of levels in the pyramid (default is 1)."
);
AddParameter
(
ParameterType_Int
,
"sfactor"
,
"Subsampling factor"
);
SetParameterInt
(
"sfactor"
,
2
);
Set
Default
ParameterInt
(
"sfactor"
,
2
);
AddParameter
(
ParameterType_Float
,
"vfactor"
,
"Subsampling factor"
);
SetParameterFloat
(
"vfactor"
,
0.6
);
Set
Default
ParameterFloat
(
"vfactor"
,
0.6
);
// Boolean Fast scheme
AddParameter
(
ParameterType_Empty
,
"fast"
,
"Use Fast Scheme"
);
...
...
Applications/Util/otbRescale.cxx
View file @
5da24b09
...
...
@@ -74,9 +74,9 @@ private:
SetParameterDescription
(
"out"
,
"The rescaled image filename."
);
AddParameter
(
ParameterType_Float
,
"outmin"
,
"Output min value"
);
AddParameter
(
ParameterType_Float
,
"outmax"
,
"Output max value"
);
SetParameterFloat
(
"outmin"
,
0.0
);
Set
Default
ParameterFloat
(
"outmin"
,
0.0
);
SetParameterDescription
(
"outmin"
,
"Minimum value of the output image."
);
SetParameterFloat
(
"outmax"
,
255.0
);
Set
Default
ParameterFloat
(
"outmax"
,
255.0
);
SetParameterDescription
(
"outmax"
,
"Maximum value of the output image."
);
MandatoryOff
(
"outmin"
);
...
...
Applications/Util/otbSmoothing.cxx
View file @
5da24b09
...
...
@@ -83,18 +83,18 @@ private:
SetParameterDescription
(
"type"
,
"smoothing kernel to apply : mean, gaussian, anisotropric diffusion."
);
AddChoice
(
"type.mean"
,
"Mean"
);
AddParameter
(
ParameterType_Radius
,
"type.mean.radius"
,
"Radius"
);
SetParameterInt
(
"type.mean.radius"
,
2
);
Set
Default
ParameterInt
(
"type.mean.radius"
,
2
);
AddChoice
(
"type.gaussian"
,
"Gaussian"
);
AddParameter
(
ParameterType_Radius
,
"type.gaussian.radius"
,
"Radius"
);
SetParameterInt
(
"type.gaussian.radius"
,
2
);
Set
Default
ParameterInt
(
"type.gaussian.radius"
,
2
);
AddChoice
(
"type.anidif"
,
"Anisotropic Diffusion"
);
AddParameter
(
ParameterType_Float
,
"type.anidif.timestep"
,
"Time Step"
);
AddParameter
(
ParameterType_Int
,
"type.anidif.nbiter"
,
"Nb Iterations"
);
SetParameterFloat
(
"type.anidif.timestep"
,
0.125
);
SetParameterInt
(
"type.anidif.nbiter"
,
10
);
Set
Default
ParameterFloat
(
"type.anidif.timestep"
,
0.125
);
Set
Default
ParameterInt
(
"type.anidif.nbiter"
,
10
);
SetParameterString
(
"type"
,
"anidif"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment