Commit 7b7f119c authored by Manuel Grizonnet's avatar Manuel Grizonnet

BUG: missing initialization of m_FileName member

parent 7a8655f2
......@@ -48,6 +48,7 @@ OutputImageParameter::OutputImageParameter()
{
this->SetName("Output Image");
this->SetKey("out");
m_FileName = "";
}
......@@ -235,10 +236,10 @@ void OutputImageParameter::InitializeWriters()
}
template <typename TInput, typename TOutput>
std::pair<itk::ProcessObject::Pointer,itk::ProcessObject::Pointer>
template <typename TInput, typename TOutput>
std::pair<itk::ProcessObject::Pointer,itk::ProcessObject::Pointer>
ClampAndWriteVectorImage( TInput * in ,
const std::string & filename ,
const std::string & filename ,
const unsigned int & ramValue )
{
std::pair<itk::ProcessObject::Pointer,itk::ProcessObject::Pointer> ret;
......@@ -247,7 +248,7 @@ ClampAndWriteVectorImage( TInput * in ,
clampFilter->SetInput( in);
ret.first = clampFilter.GetPointer();
bool useStandardWriter = true;
#ifdef OTB_USE_MPI
......@@ -284,17 +285,17 @@ ClampAndWriteVectorImage( TInput * in ,
sptWriter->GetStreamingManager()->SetDefaultRAM(ramValue);
ret.second = sptWriter.GetPointer();
}
#endif
else
{
itkGenericExceptionMacro("File format "<<extension<<" not supported for parallel writing with MPI. Supported formats are .vrt and .tif. Extended filenames are not supported.");
}
}
#endif
if(useStandardWriter)
{
typename otb::ImageFileWriter<TOutput>::Pointer writer =
......@@ -378,7 +379,7 @@ OutputImageParameter::SwitchInput(TInput *img)
ret = ClampAndWriteVectorImage < TInput , ComplexInt16VectorImageType > (
img ,
m_FileName ,
m_RAMValue );
m_RAMValue );
break;
}
case ImagePixelType_cint32:
......@@ -386,7 +387,7 @@ OutputImageParameter::SwitchInput(TInput *img)
ret = ClampAndWriteVectorImage < TInput , ComplexInt32VectorImageType > (
img ,
m_FileName ,
m_RAMValue );
m_RAMValue );
break;
}
case ImagePixelType_cfloat:
......@@ -394,7 +395,7 @@ OutputImageParameter::SwitchInput(TInput *img)
ret = ClampAndWriteVectorImage < TInput , ComplexFloatVectorImageType > (
img ,
m_FileName ,
m_RAMValue );
m_RAMValue );
break;
}
case ImagePixelType_cdouble:
......@@ -447,8 +448,7 @@ OutputImageParameter::SetValue(ImageBaseType* image)
bool
OutputImageParameter::HasValue() const
{
std::string filename(this->GetFileName());
return !filename.empty();
return !m_FileName.empty();
}
std::string
......
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