Commit 897c7307 authored by Guillaume Pasero's avatar Guillaume Pasero

BUG: set the default requested region properly in otb::ImageFileWriter

parent 30bafb43
......@@ -233,6 +233,8 @@ protected:
/** Does the real work. */
virtual void GenerateData(void);
virtual void GenerateOutputRequestedRegion(itk::DataObject *output);
private:
ImageFileWriter(const ImageFileWriter &); //purposely not implemented
......
......@@ -881,6 +881,19 @@ ImageFileWriter<TInputImage>
return this->m_FilenameHelper->GetSimpleFileName();
}
template <class TInputImage>
void
ImageFileWriter<TInputImage>
::GenerateOutputRequestedRegion(itk::DataObject *output)
{
Superclass::GenerateOutputRequestedRegion(output);
// Here we set the output requested region to the largest possible region
// This is a default behaviour that should work with most upstream filters
// This requested region will be modified anyway and repropagated during UpdateOutputData.
OutputImageType* imgOutput = dynamic_cast<OutputImageType*>(output);
imgOutput->SetRequestedRegionToLargestPossibleRegion();
}
} // end namespace otb
......
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