Commit f991ce52 authored by Antoine Regimbeau's avatar Antoine Regimbeau
Browse files

REFAC: add doc example and change default value

No related merge requests found
Showing with 16 additions and 5 deletions
+16 -5
...@@ -175,7 +175,7 @@ private: ...@@ -175,7 +175,7 @@ private:
"smoothen the result we interpolate the gain between tiles."); "smoothen the result we interpolate the gain between tiles.");
SetDocLimitations("None"); SetDocLimitations("None");
SetDocAuthors("OTB-Team"); SetDocAuthors("OTB-Team");
SetDocSeeAlso(""); SetDocSeeAlso(" ");
AddDocTag(Tags::Filter); AddDocTag(Tags::Filter);
...@@ -271,6 +271,9 @@ private: ...@@ -271,6 +271,9 @@ private:
"Value for luminance computation" ); "Value for luminance computation" );
SetDefaultParameterFloat("mode.lum.blue.coef", 0.08 ); SetDefaultParameterFloat("mode.lum.blue.coef", 0.08 );
SetDefaultParameterInt( "spatial.local.w" , 256 );
SetDefaultParameterInt( "spatial.local.h" , 256 );
SetMinimumParameterIntValue("mode.lum.red.ch", 0); SetMinimumParameterIntValue("mode.lum.red.ch", 0);
SetMinimumParameterIntValue("mode.lum.green.ch", 0); SetMinimumParameterIntValue("mode.lum.green.ch", 0);
SetMinimumParameterIntValue("mode.lum.blue.ch", 0); SetMinimumParameterIntValue("mode.lum.blue.ch", 0);
...@@ -278,6 +281,14 @@ private: ...@@ -278,6 +281,14 @@ private:
SetMinimumParameterIntValue("spatial.local.h", 1); SetMinimumParameterIntValue("spatial.local.h", 1);
SetMinimumParameterIntValue("spatial.local.w", 1); SetMinimumParameterIntValue("spatial.local.w", 1);
unsigned int exId = AddExample( "Local contrast enhancement by luminance" );
SetDocExampleParameterValue( "in" , "couleurs.tif" , exId );
SetDocExampleParameterValue( "out" , "equalizedcouleurs.tif float" , exId );
SetDocExampleParameterValue( "bins" , "256" , exId );
SetDocExampleParameterValue( "spatial.local.w" , "500" , exId );
SetDocExampleParameterValue( "spatial.local.h" , "500" , exId );
SetDocExampleParameterValue( "mode" , "lum" , exId );
AddRAMParameter(); AddRAMParameter();
} }
...@@ -289,11 +300,11 @@ private: ...@@ -289,11 +300,11 @@ private:
FloatVectorImageType::RegionType::SizeType size; FloatVectorImageType::RegionType::SizeType size;
size = inImage->GetLargestPossibleRegion().GetSize() ; size = inImage->GetLargestPossibleRegion().GetSize() ;
if ( !HasUserValue("spatial.local.w") ) // if ( !HasUserValue("spatial.local.w") )
SetParameterInt( "spatial.local.w" , size[0] ); // SetParameterInt( "spatial.local.w" , size[0] );
if ( !HasUserValue("spatial.local.h") ) // if ( !HasUserValue("spatial.local.h") )
SetParameterInt( "spatial.local.h" , size[1] ); // SetParameterInt( "spatial.local.h" , size[1] );
if ( GetParameterString("spatial") == "local" && if ( GetParameterString("spatial") == "local" &&
HasValue("spatial.local.h") && HasValue("spatial.local.w") && HasValue("spatial.local.h") && HasValue("spatial.local.w") &&
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment