Commit f33c4d85 authored by Julien Michel's avatar Julien Michel

ENH: Removing resets of reader pointer to avoid reading back geom each time

parent e7ef883a
......@@ -1040,10 +1040,6 @@ void GlImageActor::UpdateResolution()
std::ostringstream extFilename;
extFilename<<m_FileName<<"?&resol="<<m_CurrentResolution;
// ReaderType::New() is forced because of warning message
// 'Duplicated option detected: <option>. Using value <value>.'
// output by otb::ExtendedFilenameHelper.
m_FileReader = ReaderType::New();
m_FileReader->SetFileName(extFilename.str());
m_FileReader->GetOutput()->UpdateOutputInformation();
// std::cout << "Switched to resolution: " << m_CurrentResolution <<
......
......@@ -108,8 +108,8 @@ VectorImageModel
// << std::endl;
m_ImageFileReader->SetFileName( QFile::encodeName( GetFilename() ) );
m_ImageFileReader->UpdateOutputInformation();
m_ImageFileReader->GetOutput()->UpdateOutputInformation();
// Retrieve the list of Lod from file
m_LodCount = m_ImageFileReader->GetOverviewsCount();
......@@ -539,15 +539,9 @@ VectorImageModel
lodFilename.append( QString( "?&resol=%1" ).arg( lod ) );
// Update m_ImageFileReader
DefaultImageFileReaderType::Pointer fileReader(
DefaultImageFileReaderType::New()
);
fileReader->SetFileName( QFile::encodeName( lodFilename ).constData() );
fileReader->UpdateOutputInformation();
m_ImageFileReader = fileReader;
m_ImageFileReader->SetFileName( QFile::encodeName( lodFilename ).constData() );
m_ImageFileReader->GetOutput()->UpdateOutputInformation();
// (Always) Update m_Image reference.
m_Image = m_ImageFileReader->GetOutput();
}
......
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