Skip to content
Snippets Groups Projects
Commit 46492c65 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

ENH: use new demhandler API

parent f84b8535
No related branches found
No related tags found
2 merge requests!57Update to OTB V8,!56Update to OTB v8
......@@ -52,9 +52,7 @@ namespace otb
: m_SarSensorModelAdapter(ITK_NULLPTR), m_NoData(-32768), m_withXYZ(false), m_withH(false),
m_withSatPos(false), m_NbComponents(4), m_indH(4), m_indSatPos(4), m_geoidEmg96(NULL)
{
std::cout << "ConfigurationManager::GetGeoidFile() = " << ConfigurationManager::GetGeoidFile() << std::endl;
DEMHandlerPointerType DEMHandler = DEMHandler::Instance();
auto& DEMHandler = DEMHandler::GetInstance();
m_geoidEmg96 = 0;
const std::string isEmg96 = "egm96";
......@@ -62,7 +60,7 @@ namespace otb
if (!(ConfigurationManager::GetGeoidFile().empty()))
{
// DEMHandler instance to specify the geoid file
DEMHandler->OpenGeoidFile(ConfigurationManager::GetGeoidFile());
DEMHandler.OpenGeoidFile(ConfigurationManager::GetGeoidFile());
// If Geoid by default (emg96) instanciate directly a ossimGeoidEgm96 (increase performance)
std::size_t found = ConfigurationManager::GetGeoidFile().find(isEmg96);
......@@ -293,7 +291,7 @@ SARDEMProjectionImageFilter< TImageIn, TImageOut >
}
else
{
h = DEMHandler::Instance()->GetHeightAboveEllipsoid(demGeoPoint[0],demGeoPoint[1]);
h = DEMHandler::GetInstance().GetHeightAboveEllipsoid(demGeoPoint[0],demGeoPoint[1]);
}
// Correct the height with earth geoid
......
......@@ -143,9 +143,9 @@ namespace otb
SARFFTCorrelationGridImageFilter< TImageIn, TImageOut >
::activateDEM(const std::string DEMDirectory)
{
DEMHandlerPointerType DEMHandler = DEMHandler::Instance();
DEMHandler->ClearDEMs();
DEMHandler->OpenDEMDirectory(DEMDirectory);
auto & DEMHandler = DEMHandler::GetInstance();
DEMHandler.ClearDEMs();
DEMHandler.OpenDEMDirectory(DEMDirectory);
}
/**
......
......@@ -58,10 +58,8 @@ namespace otb
{
// Inputs required
this->SetNumberOfRequiredInputs(2);
std::cout << "ConfigurationManager::GetGeoidFile() = " << ConfigurationManager::GetGeoidFile() << std::endl;
DEMHandlerPointerType DEMHandler = DEMHandler::Instance();
auto & DEMHandler = DEMHandler::GetInstance();
m_geoidEmg96 = 0;
const std::string isEmg96 = "egm96";
......@@ -69,7 +67,7 @@ namespace otb
if (!(ConfigurationManager::GetGeoidFile().empty()))
{
// DEMHandler instance to specify the geoid file
DEMHandler->OpenGeoidFile(ConfigurationManager::GetGeoidFile());
DEMHandler.OpenGeoidFile(ConfigurationManager::GetGeoidFile());
// If Geoid by default (emg96) instanciate directly a ossimGeoidEgm96 (increase performance)
std::size_t found = ConfigurationManager::GetGeoidFile().find(isEmg96);
......
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