Skip to content
Snippets Groups Projects
Commit c4f5f8cf authored by Valentin Genin's avatar Valentin Genin
Browse files

ENH: Adapt SARMultiLook to otb V8 #33

parent ae5ba67e
No related branches found
No related tags found
3 merge requests!57Update to OTB V8,!56Update to OTB v8,!55Chaine diap otb s1 & s1iw v8
......@@ -11,7 +11,7 @@ else()
endif()
# Execute and Copy during installation
install(DIRECTORY python_src DESTINATION ${CMAKE_INSTALL_PREFIX})
#install(DIRECTORY python_src DESTINATION ${CMAKE_INSTALL_PREFIX})
if(UNIX)
install(CODE "execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_diapOTBEnv.sh ${CMAKE_INSTALL_PREFIX})")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/diapOTBEnv.sh PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ DESTINATION ${CMAKE_INSTALL_PREFIX})
......
# OTB_CREATE_APPLICATION(NAME SARMultiLook
# SOURCES otbSARMultiLook.cxx
# LINK_LIBRARIES ${${otb-module}_LIBRARIES}
# )
OTB_CREATE_APPLICATION(NAME SARMultiLook
SOURCES otbSARMultiLook.cxx
LINK_LIBRARIES ${${otb-module}_LIBRARIES}
)
# OTB_CREATE_APPLICATION(NAME SARDoppler0
# SOURCES otbSARDoppler0.cxx
......
......@@ -27,7 +27,8 @@
#include "itkImageScanlineIterator.h"
#include "itkProgressReporter.h"
#include "itkNumericTraitsPointPixel.h"
#include "otbImageKeywordlist.h"
#include "otbImageMetadata.h"
//#include "otbImageKeywordlist.h"
#include <cmath>
......@@ -113,20 +114,27 @@ SARQuadraticAveragingImageFilter< TImage >
// Override the geom file with MultiLook information
// Retrieve input image keywordlist
ImageKeywordlist inputKwl = inputPtr->GetImageKeywordlist();
//ImageKeywordlist inputKwl = inputPtr->GetImageKeywordlist();
// v8 Change : use ImageMetadata instead of ImageKeyWord
ImageMetadata inputImd = inputPtr->GetImageMetadata();
// According to direction, fill the corresponding information into geom file
if (m_Direction == DirectionType::AZIMUTH)
{
inputKwl.AddKey("support_data.ml_azi", std::to_string(m_AveragingFactor));
inputKwl.AddKey("support_data.ml_number_lines", std::to_string(outputSize[transformedAxis]));
// inputKwl.AddKey("support_data.ml_azi", std::to_string(m_AveragingFactor));
// inputKwl.AddKey("support_data.ml_number_lines", std::to_string(outputSize[transformedAxis]));
inputImd.Add("support_data.ml_azi", std::to_string(m_AveragingFactor));
inputImd.Add("support_data.ml_number_lines", std::to_string(outputSize[transformedAxis]));
}
else
{
inputKwl.AddKey("support_data.ml_ran", std::to_string(m_AveragingFactor));
inputKwl.AddKey("support_data.ml_number_samples", std::to_string(outputSize[transformedAxis]));
// inputKwl.AddKey("support_data.ml_ran", std::to_string(m_AveragingFactor));
// inputKwl.AddKey("support_data.ml_number_samples", std::to_string(outputSize[transformedAxis]));
inputImd.Add("support_data.ml_ran", std::to_string(m_AveragingFactor));
inputImd.Add("support_data.ml_number_samples", std::to_string(outputSize[transformedAxis]));
}
// Set new keyword list to output image
outputPtr->SetImageKeywordList(inputKwl);
// outputPtr->SetImageKeywordList(inputKwl);
outputPtr->SetImageMetadata(inputImd);
}
......
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