Skip to content
Snippets Groups Projects
Commit 1ff1eac7 authored by Gaëlle USSEGLIO's avatar Gaëlle USSEGLIO
Browse files

ENH : Add extended filename into SAROrthoInterferogram application

parent 7198528e
No related branches found
No related tags found
1 merge request!28Interfero dem
...@@ -94,6 +94,12 @@ namespace otb ...@@ -94,6 +94,12 @@ namespace otb
SetDefaultParameterInt("margin", 1000); SetDefaultParameterInt("margin", 1000);
SetMinimumParameterIntValue("margin", 0); SetMinimumParameterIntValue("margin", 0);
MandatoryOff("margin"); MandatoryOff("margin");
AddParameter(ParameterType_Int, "streamingsizevalue", "Value to specify the streaming size (in MB)");
SetParameterDescription("streamingsizevalue","Value to specify the streaming size (in MB)");
SetDefaultParameterInt("streamingsizevalue", 3000); // Default 3GB
SetMinimumParameterIntValue("streamingsizevalue", 0);
MandatoryOff("streamingsizevalue");
AddParameter(ParameterType_OutputImage, "out", "Interferogram"); AddParameter(ParameterType_OutputImage, "out", "Interferogram");
SetParameterDescription("out","Output Vector Image : Interferogram."); SetParameterDescription("out","Output Vector Image : Interferogram.");
...@@ -118,9 +124,11 @@ namespace otb ...@@ -118,9 +124,11 @@ namespace otb
// Get numeric parameters // Get numeric parameters
double factor_gain = GetParameterFloat("gain"); double factor_gain = GetParameterFloat("gain");
int margin = GetParameterInt("margin"); int margin = GetParameterInt("margin");
int streamingSizeValue = GetParameterInt("streamingsizevalue");
otbAppLogINFO(<<"Gain Factor : "<<factor_gain); otbAppLogINFO(<<"Gain Factor : "<<factor_gain);
otbAppLogINFO(<<"Margin : "<<margin); otbAppLogINFO(<<"Margin : "<<margin);
/////////////////////////////////// Compensated Complex Filter //////////////////////////////////////// /////////////////////////////////// Compensated Complex Filter ////////////////////////////////////////
// Instanciate the first filter // Instanciate the first filter
...@@ -162,6 +170,32 @@ namespace otb ...@@ -162,6 +170,32 @@ namespace otb
filterGroupedBy->SetCartesianMeanInput(CartMeanPtr); filterGroupedBy->SetCartesianMeanInput(CartMeanPtr);
filterGroupedBy->SetCompensatedComplexInput(filterCompensatedComplex->GetOutput()); filterGroupedBy->SetCompensatedComplexInput(filterCompensatedComplex->GetOutput());
// Define the main pipeline (controlled with extended FileName in order to obtain better performances)
Parameter* param = GetParameterByKey("out");
OutputImageParameter* paramDown = dynamic_cast<OutputImageParameter*>(param);
std::string origin_FileName = paramDown->GetFileName();
// Check if FileName is extended (with the ? caracter)
// If not extended then override the FileName
if (origin_FileName.find("?") == std::string::npos && !origin_FileName.empty())
{
otbAppLogINFO(<<"Streaming Size Value : "<<streamingSizeValue);
std::string extendedFileName = origin_FileName;
// Construct the extendedPart
std::ostringstream os;
os << "?&streaming:type=tiled&streaming:sizevalue=" << streamingSizeValue ;
// Add the extendedPart
std::string extendedPart = os.str();
extendedFileName.append(extendedPart);
// Set the new FileName with extended options
SetParameterString("out", extendedFileName);
}
// Main Output // Main Output
SetParameterOutputImage("out", filterGroupedBy->GetOutput()); SetParameterOutputImage("out", filterGroupedBy->GetOutput());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment