Skip to content
Snippets Groups Projects
Commit 7f7a560d authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: Mantis-1285: handle images without no-data

parent 97fb08d2
No related branches found
No related tags found
No related merge requests found
......@@ -139,6 +139,14 @@ protected:
std::vector<double> noDataValues;
ReadNoDataFlags(this->GetInput()->GetMetaDataDictionary(),noDataValueAvailable,noDataValues);
// don't pass empty containers to the functor
if (noDataValueAvailable.empty() || noDataValues.empty())
{
const TInputImage* input = this->GetInput();
noDataValueAvailable.assign(input->GetNumberOfComponentsPerPixel(),false);
noDataValues.assign(input->GetNumberOfComponentsPerPixel(),0.0);
}
this->GetFunctor().m_Flags = noDataValueAvailable;
this->GetFunctor().m_Values = noDataValues;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment