Skip to content
Snippets Groups Projects
Commit 94627f2a authored by Julien Malik's avatar Julien Malik
Browse files

ENH: add AvailableMemory is several other apps

parent 3e498857
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,7 @@ int CompareImages::Describe(ApplicationDescriptor* descriptor)
descriptor->AddOption("StartY", "first point in y-axis ", "y0", 1, false, ApplicationDescriptor::Real);
descriptor->AddOption("SizeX", "size in x-axis ", "Nx", 1, false, ApplicationDescriptor::Integer);
descriptor->AddOption("SizeY", "size in y-axis ", "Ny", 1, false, ApplicationDescriptor::Integer);
descriptor->AddOption("AvailableMemory","Set the maximum of available memory for the pipeline execution in mega bytes (optional, 256 by default)","ram", 1, false, otb::ApplicationDescriptor::Integer);
return EXIT_SUCCESS;
}
......@@ -108,6 +109,13 @@ int CompareImages::Execute(otb::ApplicationOptionsResult* parseResult)
filter->SetInput1(extractROIMonoFilter1->GetOutput());
filter->SetInput2(extractROIMonoFilter2->GetOutput());
unsigned int ram = 256;
if (parseResult->IsOptionPresent("AvailableMemory"))
{
ram = parseResult->GetParameterUInt("AvailableMemory");
}
filter->GetStreamer()->SetAutomaticTiledStreaming(ram);
filter->Update();
std::cout << "MSE: " << filter->GetMSE() << std::endl;
......
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