From e1626f784ebfac5914023b2e31d8fd1c74b8c184 Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@cnes.fr> Date: Tue, 6 Mar 2018 10:22:22 +0100 Subject: [PATCH] ENH: More traces clean-up --- .../include/otbStreamingImageVirtualWriter.txx | 9 ++++----- Modules/IO/ImageIO/include/otbImageFileReader.txx | 13 ++++++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Modules/Core/Streaming/include/otbStreamingImageVirtualWriter.txx b/Modules/Core/Streaming/include/otbStreamingImageVirtualWriter.txx index b4fc50fbfa..008b6c0eaa 100644 --- a/Modules/Core/Streaming/include/otbStreamingImageVirtualWriter.txx +++ b/Modules/Core/Streaming/include/otbStreamingImageVirtualWriter.txx @@ -227,11 +227,11 @@ StreamingImageVirtualWriter<TInputImage> m_ObserverID = source->AddObserver(itk::ProgressEvent(), command); m_IsObserving = true; } - else - { - itkWarningMacro(<< "Could not get the source process object. Progress report might be buggy"); - } + const auto firstSplitSize = m_StreamingManager->GetSplit(0).GetSize(); + otbLogMacro(Info,<<"Estimation will be performed in "<<m_NumberOfDivisions<<" blocks of "<<firstSplitSize[0]<<"x"<<firstSplitSize[1]<<" pixels"); + + /** * Loop over the number of pieces, execute the upstream pipeline on each * piece, and copy the results into the output image. @@ -242,7 +242,6 @@ StreamingImageVirtualWriter<TInputImage> m_CurrentDivision++, m_DivisionProgress = 0, this->UpdateFilterProgress()) { streamRegion = m_StreamingManager->GetSplit(m_CurrentDivision); - otbMsgDevMacro(<< "Processing region : " << streamRegion ) //inputPtr->ReleaseData(); //inputPtr->SetRequestedRegion(streamRegion); //inputPtr->Update(); diff --git a/Modules/IO/ImageIO/include/otbImageFileReader.txx b/Modules/IO/ImageIO/include/otbImageFileReader.txx index 155ce0503d..c8d4fb2d0f 100644 --- a/Modules/IO/ImageIO/include/otbImageFileReader.txx +++ b/Modules/IO/ImageIO/include/otbImageFileReader.txx @@ -403,13 +403,13 @@ ImageFileReader<TOutputImage, ConvertPixelTraits> if (m_FilenameHelper->ExtGEOMFileNameIsSet()) { otb_kwl = ReadGeometryFromGEOMFile(m_FilenameHelper->GetExtGEOMFileName()); - otbLogMacro(Info,<< "Loading metadata from external geom file "<< m_FilenameHelper->GetExtGEOMFileName()); + otbLogMacro(Info,<< "Loading kwl metadata from external geom file "<< m_FilenameHelper->GetExtGEOMFileName()); } // Case 2: attached geom (if present) else if (itksys::SystemTools::FileExists(attachedGeom)) { otb_kwl = ReadGeometryFromGEOMFile(attachedGeom); - otbLogMacro(Info,<< "Loading metadata from attached geom file "<<attachedGeom); + otbLogMacro(Info,<< "Loading kwl metadata from attached geom file "<<attachedGeom); } // Case 3: find an ossimPluginProjection // Case 4: find an ossimProjection @@ -417,7 +417,14 @@ ImageFileReader<TOutputImage, ConvertPixelTraits> else { otb_kwl = ReadGeometryFromImage(lFileNameOssimKeywordlist,!m_FilenameHelper->GetSkipRpcTag()); - otbLogMacro(Info,<< "Loading metadata from product files"); + if(!otb_kwl.Empty()) + { + otbLogMacro(Info,<< "Loading kwl metadata from official product in file "<<lFileNameOssimKeywordlist); + } + else + { + otbLogMacro(Info,<< "No kwl metadata found in file "<<lFileNameOssimKeywordlist); + } } // Don't add an empty ossim keyword list -- GitLab