diff --git a/Code/ApplicationEngine/otbWrapperApplicationRegistry.cxx b/Code/ApplicationEngine/otbWrapperApplicationRegistry.cxx index a734739825fed3c54749db8e77eb059f05332ec3..cdc46d4fb3fcf6aa79167fe99074d39a5880fd4a 100644 --- a/Code/ApplicationEngine/otbWrapperApplicationRegistry.cxx +++ b/Code/ApplicationEngine/otbWrapperApplicationRegistry.cxx @@ -129,6 +129,13 @@ ApplicationRegistry::GetAvailableApplications() { availableApp.push_back((*k)->GetName()); } + // If the ITK_AUTOLOAD_PATH contains + // several times the same path, application will appears several + // times in the list.To be cleaner, we erase multiple + std::vector<std::string>::iterator it; + it = std::unique(availableApp.begin(), availableApp.end()); + availableApp.resize( it - availableApp.begin() ); + return availableApp; }