Commit 2d174e6a authored by Victor Poughon's avatar Victor Poughon

Merge branch 'remove_const_char_overloads' into 'develop'

Remove const char* SetFilename overloads

Closes #1697

See merge request !350
parents c353ad0f 65c1f0f1
......@@ -140,9 +140,6 @@ public:
void SetImageIO( otb::ImageIOBase * imageIO );
itkGetObjectMacro(ImageIO,otb::ImageIOBase);
/** \deprecated const char* overload of SetFileName is deprecated, use std::string instead */
virtual void SetFileName(const char* extendedFileName);
virtual void SetFileName(const std::string& extendedFileName);
virtual const char* GetFileName () const;
......
......@@ -668,17 +668,6 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
return (fic_trouve);
}
template <class TOutputImage, class ConvertPixelTraits>
void
ImageFileReader<TOutputImage, ConvertPixelTraits>
::SetFileName(const char* in)
{
if (in)
{
this->SetFileName(std::string(in));
}
}
template <class TOutputImage, class ConvertPixelTraits>
void
ImageFileReader<TOutputImage, ConvertPixelTraits>
......
......@@ -172,9 +172,6 @@ public:
* has no output. */
void Update() override;
/** \deprecated const char* overload of SetFileName is deprecated, use std::string instead */
virtual void SetFileName(const char* extendedFileName);
virtual void SetFileName(const std::string& extendedFileName);
virtual const char* GetFileName () const;
......
......@@ -837,19 +837,6 @@ ImageFileWriter<TInputImage>
this->Modified();
}
template <class TInputImage>
void
ImageFileWriter<TInputImage>
::SetFileName(const char* extendedFileName)
{
if (extendedFileName == nullptr)
{
itkGenericExceptionMacro( << "Filename is NULL" );
}
this->SetFileName(std::string(extendedFileName));
}
template <class TInputImage>
const char*
ImageFileWriter<TInputImage>
......
......@@ -117,14 +117,6 @@ public:
*/
virtual void SetFileName(const std::string& file);
/**
* Set the file to be read. Once the Filename is set, ReadMeatFile is called in order to get
* the number of image files to be read, the images file names, the band and region
* selection
* \deprecated const char* overload of SetFileName is deprecated, use std::string instead
*/
virtual void SetFileName(const char * file);
/** get the Filenames */
std::string GetFileName(unsigned int i) const
{
......
......@@ -52,17 +52,6 @@ ImageSeriesFileReaderBase<TImage, TInternalImage>
this->Modified();
}
template <class TImage, class TInternalImage>
void
ImageSeriesFileReaderBase<TImage, TInternalImage>
::SetFileName(const char * file)
{
if (file)
{
this->SetFileName(std::string(file));
}
}
template <class TImage, class TInternalImage>
typename ImageSeriesFileReaderBase<TImage, TInternalImage>::OutputImageListType *
ImageSeriesFileReaderBase<TImage, TInternalImage>
......
......@@ -217,9 +217,6 @@ public:
/** Does the real work. */
virtual void Update() override;
/** \deprecated const char* overload of SetFileName is deprecated, use std::string instead */
virtual void SetFileName(const char* extendedFileName);
virtual void SetFileName(const std::string& extendedFileName);
virtual const char* GetFileName () const;
......
......@@ -829,19 +829,6 @@ SimpleParallelTiffWriter<TInputImage>
this->Modified();
}
template <class TInputImage>
void
SimpleParallelTiffWriter<TInputImage>
::SetFileName(const char* extendedFileName)
{
if (extendedFileName == nullptr)
{
itkGenericExceptionMacro( << "Filename is NULL" );
}
this->SetFileName(std::string(extendedFileName));
}
template <class TInputImage>
const char*
SimpleParallelTiffWriter<TInputImage>
......
......@@ -80,9 +80,6 @@ public:
/** Does the real work. */
virtual void Update() override;
/** \deprecated const char* overload of SetFileName is deprecated, use std::string instead */
virtual void SetFileName(const char* extendedFileName);
virtual void SetFileName(const std::string& extendedFileName);
virtual const char* GetFileName () const;
......
......@@ -59,16 +59,6 @@ MPIVrtWriter<TImage>::GetInput()
return static_cast<const InputImageType*>(this->ProcessObject::GetInput(0));
}
template <typename TImage>
void
MPIVrtWriter<TImage>::SetFileName(const char* extendedFileName)
{
if (m_Filename.compare(extendedFileName) != 0 )
{
this->SetFileName(std::string(extendedFileName));
}
}
template <typename TImage>
void
MPIVrtWriter<TImage>::SetFileName(const std::string& extendedFileName)
......
......@@ -110,7 +110,7 @@ VectorImageModel
// << "\tstd::string: " << QFile::encodeName( GetFilename() ).constData()
// << std::endl;
m_ImageFileReader->SetFileName( QFile::encodeName( GetFilename() ) );
m_ImageFileReader->SetFileName(GetFilename().toStdString());
m_ImageFileReader->GetOutput()->UpdateOutputInformation();
// Retrieve the list of Lod from file
......@@ -180,7 +180,7 @@ VectorImageModel
{
fname.append(QChar('?'));
}
imageFileReader->SetFileName( QFile::encodeName( fname.append(QString("&skipgeom=true"))).constData());
imageFileReader->SetFileName(fname.append(QString("&skipgeom=true")).toStdString());
imageFileReader->GetOutput()->UpdateOutputInformation();
}
......
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