Commit 02218c6b authored by Julien Malik's avatar Julien Malik
Browse files

BUG: fix streaming support (exact same output with or without)

parent 36bb8382
......@@ -261,7 +261,7 @@ PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,T
inputRequestedRegion = inputPtr->GetRequestedRegion();
// pad the input requested region by the operator radius
inputRequestedRegion.PadByRadius( m_NeighborhoodRadius );
inputRequestedRegion.PadByRadius( m_NeighborhoodRadius + 1 );
// crop the input requested region at the input's largest possible region
if ( inputRequestedRegion.Crop(inputPtr->GetLargestPossibleRegion()) )
......@@ -284,6 +284,7 @@ void
PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample>
::BeforeThreadedGenerateData()
{
std::cout << this->GetInput()->GetBufferedRegion() << std::endl;
}
......@@ -307,6 +308,10 @@ PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,T
ContinuousIndexType cidx;
this->GetInput()->TransformPhysicalPointToContinuousIndex(point,cidx);
// OGR convention : vector data are recorded with a 0.5 shift
cidx[0] -= 0.5;
cidx[1] -= 0.5;
RegionType paddedRegion = outputRegionForThread;
paddedRegion.PadByRadius(m_NeighborhoodRadius);
if (this->IsInsideWithNeighborhoodRadius(paddedRegion, cidx))
......
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