Commit 37f66a68 authored by Cédric Traizet's avatar Cédric Traizet

ENH: Use the functorImageFilter in the localRx application

parent 958c8738
......@@ -112,7 +112,7 @@ private:
// functor. However using functorImageFilter with neighborhood is buggy (see issue #1802). Still,
// the functor has been implemented and localRxDetectionFilter will be deprecated when the
// bug is corrected.
#if 1 // Using localRxDetectionFilter
#if 0 // Using localRxDetectionFilter
auto localRxDetectionFilter = LocalRxDetectorFilterType::New();
localRxDetectionFilter->SetInput(inputImage);
......
......@@ -163,14 +163,14 @@ public:
return m_InternalRadiusY;
};
auto operator()(const itk::Neighborhood<itk::VariableLengthVector<TInput>> & in) const
auto operator()(const itk::ConstNeighborhoodIterator<otb::VectorImage<TInput>> & in) const
{
// Create a list sample with the pixels of the neighborhood located between
// the two radius.
typename ListSampleType::Pointer listSample = ListSampleType::New();
// The pixel on whih we will compute the Rx score, we load it now to get the input vector size.
auto centerPixel = in.GetCenterValue();
auto centerPixel = in.GetCenterPixel();
listSample->SetMeasurementVectorSize(centerPixel.Size());
OffsetType off;
......@@ -188,7 +188,7 @@ public:
off[0] = x;
if ((abs(x) > internalRadiusX) || (abs(y) > internalRadiusY))
{
listSample->PushBack(in[off]);
listSample->PushBack(in.GetPixel(off));
}
}
}
......
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