Commit c27ca52e authored by Julien Michel's avatar Julien Michel

REFAC: Review most verbose log messages to make them more compact and informative

parent 66fc866d
......@@ -241,8 +241,6 @@ ReadGeometryFromImage(const std::string& filename, bool checkRpcTag)
if (projection)
{
otbMsgDevMacro(<< "OSSIM plugin projection instantiated ! ");
hasMetaData = projection->saveState(geom_kwl);
otb_kwl.SetKeywordlist(geom_kwl);
}
......@@ -479,7 +477,6 @@ WriteGeometry(const ImageKeywordlist& otb_kwl, const std::string& filename)
if (geom_kwl.getSize() > 0)
{
otbMsgDevMacro(<< "Exporting keywordlist ...");
ossimFilename geomFileName(filename);
geomFileName.setExtension(".geom");
geom_kwl.write(geomFileName.chars());
......
......@@ -152,11 +152,6 @@ ExtractROIBase<TInputImage, TOutputImage>
}
requestedRegion.SetIndex(index);
inputPtr->SetRequestedRegion(requestedRegion);
otbMsgDevMacro(<< "InputRequestedRegion (otbExtractROIBase): ");
otbMsgDevMacro(<< " - index: " << requestedRegion.GetIndex());
otbMsgDevMacro(<< " - size: " << requestedRegion.GetSize());
}
/**
......
......@@ -72,7 +72,7 @@ RAMDrivenAdaptativeStreamingManager<TImage>::PrepareStreaming( itk::DataObject *
this->m_Splitter = splitter;
this->m_ComputedNumberOfSplits = this->m_Splitter->GetNumberOfSplits(region, nbDivisions);
otbMsgDevMacro(<< "Number of split : " << this->m_ComputedNumberOfSplits)
this->m_Region = region;
}
......
......@@ -47,12 +47,9 @@ StreamingManager<TImage>::GetActualAvailableRAMInBytes(MemoryPrintType available
if (availableRAMInBytes == 0)
{
otbMsgDevMacro(<< "Retrieving available RAM size from configuration");
// Retrieve it from the configuration
availableRAMInBytes = 1024*1024*ConfigurationManager::GetMaxRAMHint();
}
otbMsgDevMacro("RAM used to estimate memory footprint : " << availableRAMInBytes / 1024 / 1024 << " MB")
return availableRAMInBytes;
}
......@@ -62,8 +59,6 @@ StreamingManager<TImage>::EstimateOptimalNumberOfDivisions(itk::DataObject * inp
MemoryPrintType availableRAM,
double bias)
{
otbMsgDevMacro(<< "availableRAM " << availableRAM)
MemoryPrintType availableRAMInBytes = GetActualAvailableRAMInBytes(availableRAM);
otb::PipelineMemoryPrintCalculator::Pointer memoryPrintCalculator;
......@@ -103,7 +98,6 @@ StreamingManager<TImage>::EstimateOptimalNumberOfDivisions(itk::DataObject * inp
if (smallRegionSuccess)
{
otbMsgDevMacro("Using an extract to estimate memory : " << smallRegion)
// the region is well behaved, inside the largest possible region
memoryPrintCalculator->SetDataToWrite(extractFilter->GetOutput() );
......@@ -114,7 +108,6 @@ StreamingManager<TImage>::EstimateOptimalNumberOfDivisions(itk::DataObject * inp
}
else
{
otbMsgDevMacro("Using the input region to estimate memory : " << region)
// the region is not well behaved
// use the full region
memoryPrintCalculator->SetDataToWrite(input);
......@@ -148,11 +141,9 @@ StreamingManager<TImage>::EstimateOptimalNumberOfDivisions(itk::DataObject * inp
unsigned int optimalNumberOfDivisions =
otb::PipelineMemoryPrintCalculator::EstimateOptimalNumberOfStreamDivisions(pipelineMemoryPrint, availableRAMInBytes);
otbMsgDevMacro( "Estimated Memory print for the full image : "
<< static_cast<unsigned int>(pipelineMemoryPrint * otb::PipelineMemoryPrintCalculator::ByteToMegabyte ) << std::endl)
otbMsgDevMacro( "Optimal number of stream divisions: "
<< optimalNumberOfDivisions << std::endl)
otbLogMacro(Info,<<"Available memory: "<<availableRAMInBytes * otb::PipelineMemoryPrintCalculator::ByteToMegabyte
<<" Mb, estimated needed memory for full processing: "<<pipelineMemoryPrint * otb::PipelineMemoryPrintCalculator::ByteToMegabyte
<<" Mb, optimal number of stream divisions: "<<optimalNumberOfDivisions);
return optimalNumberOfDivisions;
}
......
......@@ -105,7 +105,7 @@ PipelineMemoryPrintCalculator::MemoryPrintType
PipelineMemoryPrintCalculator
::EvaluateProcessObjectPrintRecursive(ProcessObjectType * process)
{
otbMsgDevMacro(<< "EvaluateMemoryPrint for " << process->GetNameOfClass() << " (" << process << ")")
otbLogMacro(Debug,<<"Recursive evaluation of memory print for ProcessObject" << process->GetNameOfClass() << " (" << process << ")");
// This variable will store the final print
MemoryPrintType print = 0;
......@@ -164,8 +164,9 @@ PipelineMemoryPrintCalculator::MemoryPrintType
PipelineMemoryPrintCalculator
::EvaluateDataObjectPrint(DataObjectType * data)
{
otbMsgDevMacro(<< "EvaluateMemoryPrint for " << data->GetNameOfClass() << " (" << data << ")")
otbLogMacro(Debug,<<"Evaluation of memory print for DataObject " << data->GetNameOfClass() << " (" << data << ")");
#define OTB_IMAGE_SIZE_BLOCK(type) \
if(dynamic_cast<itk::Image<type, 2> *>(data) != NULL) \
{ \
......
This diff is collapsed.
......@@ -107,7 +107,6 @@ void
ImageFileReader<TOutputImage, ConvertPixelTraits>
::SetImageIO( otb::ImageIOBase * imageIO)
{
itkDebugMacro("setting ImageIO to " << imageIO );
if (this->m_ImageIO != imageIO )
{
this->m_ImageIO = imageIO;
......@@ -207,12 +206,6 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
char * loadBuffer = new char[nbBytes];
otbMsgDevMacro(<< "buffer size for ImageIO::read = " << nbBytes << " = \n"
<< "ComponentSize ("<< this->m_ImageIO->GetComponentSize() << ") x " \
<< "Nb of Component ( max(" << this->m_ImageIO->GetNumberOfComponents() \
<< " , "<<m_BandList.size() << ") ) x " \
<< "Nb of Pixel to read (" << region.GetNumberOfPixels() << ")");
this->m_ImageIO->Read(loadBuffer);
if (m_FilenameHelper->BandRangeIsSet())
......@@ -410,13 +403,13 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
if (m_FilenameHelper->ExtGEOMFileNameIsSet())
{
otb_kwl = ReadGeometryFromGEOMFile(m_FilenameHelper->GetExtGEOMFileName());
otbMsgDevMacro(<< "Loading external kwl: "<< m_FilenameHelper->GetExtGEOMFileName());
otbLogMacro(Info,<< "Loading metadata from external geom file "<< m_FilenameHelper->GetExtGEOMFileName());
}
// Case 2: attached geom (if present)
else if (itksys::SystemTools::FileExists(attachedGeom))
{
otb_kwl = ReadGeometryFromGEOMFile(attachedGeom);
otbMsgDevMacro(<< "Loading attached kwl");
otbLogMacro(Info,<< "Loading metadata from attached geom file "<<attachedGeom);
}
// Case 3: find an ossimPluginProjection
// Case 4: find an ossimProjection
......@@ -424,7 +417,7 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
else
{
otb_kwl = ReadGeometryFromImage(lFileNameOssimKeywordlist,!m_FilenameHelper->GetSkipRpcTag());
otbMsgDevMacro(<< "Loading internal kwl");
otbLogMacro(Info,<< "Loading metadata from product files");
}
// Don't add an empty ossim keyword list
......@@ -644,8 +637,6 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
fic_trouve = true;
}
otbMsgDevMacro(<< "lFileNameGdal : " << GdalFileName.c_str());
otbMsgDevMacro(<< "fic_trouve : " << fic_trouve);
return (fic_trouve);
}
......
......@@ -38,8 +38,6 @@ template <class TImageType>
TImageType*
InputImageParameter::GetImage()
{
otbMsgDevMacro(<< "GetImage()");
// Used m_PreviousFileName because if not, when the user call twice GetImage,
// it without changing the filename, it returns 2 different
// image pointers
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment