otb::DrawLineSpatialObjectFilter and otb::DrawLineSpatialObjectListFilter are inneficient
Mantis Issue 88, reported by jmichel, assigned to ghost, created: 2009-02-06
otb::DrawLineSpatialObjectFilter should take advantage of the itk::LineIterator using the Bresenham algorithm (already used in DrawPathListFilter).
Memory alocation at the beginning of GenerateData() breaks the streaming (allocation of the largest possible region).
in otb::DrawLineSpatialObjectListFilter, the following code snippet is really problematic :
103 while ( itList != list->end() ) 104 { 105 106 m_DrawLineFilter->SetInputImage( this->GetOutput() ); 107 m_DrawLineFilter->SetInputLine( *itList ); 108 m_DrawLineFilter->Update(); 109 110 ++itList; 111 112 }
As the DrawLineSpatialObject copies the input image and draw one single line, this means that if the DrawLineSpatialObjectListFilter has to drawn 10.000 lines, it will copy the whole image 10.000 and draw a single line at each step. Besides, this is breaking streaming.
1304066354 - julienAre these filters deprecated by the new rasterization filters ?
1324032906 - julienI do not think we should deprecate the filters since they handle a different kind of data than the rasterization ones.