diff --git a/Filters/Core/vtkProbeFilter.cxx b/Filters/Core/vtkProbeFilter.cxx index 73661872692af87de8a9d3a1288b67386665de4e..dcde7bf0396124e4573f600c45923408d80a01c8 100644 --- a/Filters/Core/vtkProbeFilter.cxx +++ b/Filters/Core/vtkProbeFilter.cxx @@ -14,6 +14,7 @@ =========================================================================*/ #include "vtkProbeFilter.h" +#include "vtkAbstractCellLocator.h" #include "vtkBoundingBox.h" #include "vtkCell.h" #include "vtkCellData.h" @@ -30,7 +31,6 @@ #include "vtkSmartPointer.h" #include "vtkSMPTools.h" #include "vtkSMPThreadLocal.h" -#include "vtkStaticCellLocator.h" #include "vtkStreamingDemandDrivenPipeline.h" #include @@ -404,13 +404,12 @@ void vtkProbeFilter::ProbeEmptyPoints(vtkDataSet *input, // vtkPointSet based datasets do not have an implicit structure to their // points. A cell locator performs better here than using the dataset's - // FindCell function. + // FindCell function. Using its own FindCell method by default. vtkSmartPointer cellLocator; - if (vtkPointSet::SafeDownCast(source) != nullptr) + if ( (vtkPointSet::SafeDownCast(source) != nullptr) && + (this->CellLocatorPrototype != nullptr) ) { - cellLocator.TakeReference(this->CellLocatorPrototype ? - this->CellLocatorPrototype->NewInstance() : - vtkStaticCellLocator::New()); + cellLocator.TakeReference(this->CellLocatorPrototype->NewInstance()); cellLocator->SetDataSet(source); cellLocator->Update(); } diff --git a/Filters/Core/vtkProbeFilter.h b/Filters/Core/vtkProbeFilter.h index e17328c49f87aafd94e8f9cebd899ec2f85cbbce..e9dc4c94ab40e8e998504ccc6779e625302d27f0 100644 --- a/Filters/Core/vtkProbeFilter.h +++ b/Filters/Core/vtkProbeFilter.h @@ -175,7 +175,7 @@ public: //@{ /** * Set/Get the prototype cell locator to use for probing the source dataset. - * By default, vtkStaticCellLocator will be used. + * By default, vtkDataSet::FindCell is called. */ virtual void SetCellLocatorPrototype(vtkAbstractCellLocator*); vtkGetObjectMacro(CellLocatorPrototype, vtkAbstractCellLocator);