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

BUG: VirtualWriter was propagating an empty region (as the ImageFileWriter before)

parent 7ea1d94c
No related branches found
No related tags found
No related merge requests found
...@@ -132,6 +132,10 @@ public: ...@@ -132,6 +132,10 @@ public:
* Setting the availableRAM parameter to 0 means that the available RAM * Setting the availableRAM parameter to 0 means that the available RAM
* is set from the CMake configuration option */ * is set from the CMake configuration option */
void SetAutomaticAdaptativeStreaming(unsigned int availableRAM = 0, double bias = 1.0); void SetAutomaticAdaptativeStreaming(unsigned int availableRAM = 0, double bias = 1.0);
/** Override Update() from ProcessObject
* This filter does not produce an output */
virtual void Update();
protected: protected:
StreamingImageVirtualWriter(); StreamingImageVirtualWriter();
......
...@@ -146,6 +146,16 @@ StreamingImageVirtualWriter<TInputImage> ...@@ -146,6 +146,16 @@ StreamingImageVirtualWriter<TInputImage>
m_StreamingManager = streamingManager; m_StreamingManager = streamingManager;
} }
template <class TInputImage>
void
StreamingImageVirtualWriter<TInputImage>
::Update()
{
InputImagePointer inputPtr = const_cast<InputImageType *>(this->GetInput(0));
inputPtr->UpdateOutputInformation();
this->GenerateData();
}
template <class TInputImage> template <class TInputImage>
void void
...@@ -231,9 +241,12 @@ StreamingImageVirtualWriter<TInputImage> ...@@ -231,9 +241,12 @@ StreamingImageVirtualWriter<TInputImage>
{ {
streamRegion = m_StreamingManager->GetSplit(m_CurrentDivision); streamRegion = m_StreamingManager->GetSplit(m_CurrentDivision);
otbMsgDevMacro(<< "Processing region : " << streamRegion ) otbMsgDevMacro(<< "Processing region : " << streamRegion )
inputPtr->ReleaseData(); //inputPtr->ReleaseData();
//inputPtr->SetRequestedRegion(streamRegion);
//inputPtr->Update();
inputPtr->SetRequestedRegion(streamRegion); inputPtr->SetRequestedRegion(streamRegion);
inputPtr->Update(); inputPtr->PropagateRequestedRegion();
inputPtr->UpdateOutputData();
} }
/** /**
......
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