Skip to content
Snippets Groups Projects
Commit 8861ff72 authored by Julien Malik's avatar Julien Malik
Browse files

COMP: do not use toStdString since it causes runtime issues on VC2010

parent d997bbfc
Branches
Tags
No related merge requests found
......@@ -83,11 +83,11 @@ QuicklookModel
if ( viModel->GetNbLod() > 1 )
{
// get the filename and use it to compose the quicklook filename
std::string fnameNoExt = itksys::SystemTools::GetFilenameWithoutExtension(
viModel->GetFilename().toStdString() );
const char* filename = static_cast<const char*>(viModel->GetFilename().toAscii());
std::string path = itksys::SystemTools::GetFilenamePath( viModel->GetFilename().toStdString());
std::string ext = itksys::SystemTools::GetFilenameExtension( viModel->GetFilename().toStdString());
std::string fnameNoExt = itksys::SystemTools::GetFilenameWithoutExtension( filename );
std::string path = itksys::SystemTools::GetFilenamePath( filename );
std::string ext = itksys::SystemTools::GetFilenameExtension( filename );
std::ostringstream qlfname;
qlfname << path<<"/"<<fnameNoExt<<"_quicklook.tif";
......
......@@ -511,7 +511,7 @@ VectorImageModel::GetBestLevelOfDetail(const double zoomFactor,
#if defined(OTB_USE_JPEG2000)
otb::JPEG2000ImageIO::Pointer readerJPEG2000 = otb::JPEG2000ImageIO::New();
std::string filename( m_Filename.toStdString() );
std::string filename( static_cast<const char*>(m_Filename.toAscii()) );
readerJPEG2000->SetFileName( filename.c_str() );
if(readerJPEG2000->CanReadFile( filename.c_str() ) )
......@@ -569,7 +569,7 @@ VectorImageModel
DefaultImageFileReaderType::Pointer tmpReader(
DefaultImageFileReaderType::New() );
tmpReader->SetFileName( m_Filename.toStdString() );
tmpReader->SetFileName( static_cast<const char*>(m_Filename.toAscii()) );
tmpReader->UpdateOutputInformation();
// Get native image largest region, which is LOD level zero.
......@@ -649,7 +649,7 @@ VectorImageModel
try
{
fileReader->SetFileName( lodFilename.toStdString() );
fileReader->SetFileName( static_cast<const char*>(lodFilename.toAscii()) );
fileReader->UpdateOutputInformation();
m_ImageFileReader = fileReader;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment