Commit bc2a6f8e authored by Cory Quammen's avatar Cory Quammen

Rename vtkSelectionOperator to vtkSelector

Subclasses are named vtk*Selector, so make the superclass vtkSelector
to match.
parent 848fccf0
......@@ -30,7 +30,7 @@ set(Module_SRCS
vtkHierarchicalDataExtractLevel.cxx
vtkLocationSelector.cxx
vtkProbeSelectedLocations.cxx
vtkSelectionOperator.cxx
vtkSelector.cxx
vtkValueSelector.cxx
)
......
......@@ -22,13 +22,13 @@
#ifndef vtkBlockSelector_h
#define vtkBlockSelector_h
#include "vtkSelectionOperator.h"
#include "vtkSelector.h"
class VTKFILTERSEXTRACTION_EXPORT vtkBlockSelector : public vtkSelectionOperator
class VTKFILTERSEXTRACTION_EXPORT vtkBlockSelector : public vtkSelector
{
public:
static vtkBlockSelector* New();
vtkTypeMacro(vtkBlockSelector, vtkSelectionOperator);
vtkTypeMacro(vtkBlockSelector, vtkSelector);
void PrintSelf(ostream& os, vtkIndent indent) override;
void Initialize(vtkSelectionNode* node, const char* insidednessArrayName) override;
......
......@@ -32,7 +32,7 @@
#include "vtkPoints.h"
#include "vtkSelection.h"
#include "vtkSelectionNode.h"
#include "vtkSelectionOperator.h"
#include "vtkSelector.h"
#include "vtkSignedCharArray.h"
#include "vtkTable.h"
#include "vtkUniformGridAMRDataIterator.h"
......@@ -224,7 +224,7 @@ int vtkExtractSelection::RequestData(
}
// Create operators for each of vtkSelectionNode instances and initialize them.
std::map< std::string, vtkSmartPointer< vtkSelectionOperator > > selectors;
std::map< std::string, vtkSmartPointer< vtkSelector > > selectors;
for (unsigned int cc = 0, max = selection->GetNumberOfNodes(); cc < max; ++cc)
{
auto node = selection->GetNode(cc);
......@@ -343,7 +343,7 @@ int vtkExtractSelection::RequestData(
}
//----------------------------------------------------------------------------
vtkSmartPointer<vtkSelectionOperator> vtkExtractSelection::NewSelectionOperator(
vtkSmartPointer<vtkSelector> vtkExtractSelection::NewSelectionOperator(
vtkSelectionNode::SelectionContent contentType)
{
switch (contentType)
......
......@@ -20,10 +20,10 @@
* its input dataset. The dataset is given on its first input port.
* The subset is described by the contents of the vtkSelection on its
* second input port. Depending on the contents of the vtkSelection
* this will create various vtkSelectionOperators to identify the
* this will create various vtkSelectors to identify the
* selected elements.
* @sa
* vtkSelection vtkSelectionOperator vtkSelectionNode
* vtkSelection vtkSelector vtkSelectionNode
*/
#ifndef vtkExtractSelection_h
......@@ -38,7 +38,7 @@
class vtkSignedCharArray;
class vtkSelection;
class vtkSelectionNode;
class vtkSelectionOperator;
class vtkSelector;
class vtkUnstructuredGrid;
class vtkTable;
......@@ -117,10 +117,10 @@ protected:
vtkDataObject::AttributeTypes GetAttributeTypeOfSelection(vtkSelection* sel, bool& sane);
/**
* Creates a new vtkSelectionOperator for the given content type.
* Creates a new vtkSelector for the given content type.
* May return null if not supported.
*/
virtual vtkSmartPointer<vtkSelectionOperator> NewSelectionOperator(
virtual vtkSmartPointer<vtkSelector> NewSelectionOperator(
vtkSelectionNode::SelectionContent type);
/**
......
......@@ -15,7 +15,7 @@
/**
* @class vtkFrustumSelector.h
*
* vtkFrustumSelector is a vtkSelectionOperator that selects elements based
* vtkFrustumSelector is a vtkSelector that selects elements based
* on whether they are inside or intersect a frustum of interest. This handles
* the vtkSelectionNode::FRUSTUM selection type.
*
......@@ -25,7 +25,7 @@
#define vtkFrustumSelector_h
#include "vtkFiltersExtractionModule.h" // For export macro
#include "vtkSelectionOperator.h"
#include "vtkSelector.h"
#include "vtkSmartPointer.h" // for smart pointer
......@@ -33,11 +33,11 @@ class vtkDataSet;
class vtkPlanes;
class vtkSignedCharArray;
class VTKFILTERSEXTRACTION_EXPORT vtkFrustumSelector : public vtkSelectionOperator
class VTKFILTERSEXTRACTION_EXPORT vtkFrustumSelector : public vtkSelector
{
public:
static vtkFrustumSelector *New();
vtkTypeMacro(vtkFrustumSelector, vtkSelectionOperator);
vtkTypeMacro(vtkFrustumSelector, vtkSelector);
void PrintSelf(ostream& os, vtkIndent indent) override;
void Initialize(vtkSelectionNode* node, const char* insidednessArrayName) override;
......
......@@ -16,22 +16,22 @@
* @class vtkLocationSelector
* @brief selects cells containing or points near chosen point locations.
*
* vtkLocationSelector is vtkSelectionOperator that can select elements
* vtkLocationSelector is vtkSelector that can select elements
* containing or near matching elements. It handles vtkSelectionNode::LOCATIONS
*/
#ifndef vtkLocationSelector_h
#define vtkLocationSelector_h
#include "vtkSelectionOperator.h"
#include "vtkSelector.h"
#include <memory> // unique_ptr
class VTKFILTERSEXTRACTION_EXPORT vtkLocationSelector : public vtkSelectionOperator
class VTKFILTERSEXTRACTION_EXPORT vtkLocationSelector : public vtkSelector
{
public:
static vtkLocationSelector* New();
vtkTypeMacro(vtkLocationSelector, vtkSelectionOperator);
vtkTypeMacro(vtkLocationSelector, vtkSelector);
void PrintSelf(ostream& os, vtkIndent indent) override;
void Initialize(vtkSelectionNode* node, const char* insidednessArrayName) override;
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkSelectionOperator.cxx
Module: vtkSelector.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -13,7 +13,7 @@
=========================================================================*/
#include "vtkSelectionOperator.h"
#include "vtkSelector.h"
#include "vtkCompositeDataIterator.h"
#include "vtkCompositeDataSet.h"
......@@ -25,19 +25,19 @@
#include "vtkUniformGridAMRDataIterator.h"
//----------------------------------------------------------------------------
vtkSelectionOperator::vtkSelectionOperator()
vtkSelector::vtkSelector()
{
}
//----------------------------------------------------------------------------
vtkSelectionOperator::~vtkSelectionOperator()
vtkSelector::~vtkSelector()
{
this->Node = nullptr;
delete[] this->InsidednessArrayName;
}
//----------------------------------------------------------------------------
void vtkSelectionOperator::Initialize(vtkSelectionNode* node, const char* insidednessArrayName)
void vtkSelector::Initialize(vtkSelectionNode* node, const char* insidednessArrayName)
{
this->Node = node;
if (insidednessArrayName)
......@@ -54,7 +54,7 @@ void vtkSelectionOperator::Initialize(vtkSelectionNode* node, const char* inside
}
//--------------------------------------------------------------------------
bool vtkSelectionOperator::ComputeSelectedElements(vtkDataObject* input, vtkDataObject* output)
bool vtkSelector::ComputeSelectedElements(vtkDataObject* input, vtkDataObject* output)
{
if (auto inputCD = vtkCompositeDataSet::SafeDownCast(input))
{
......@@ -92,7 +92,7 @@ bool vtkSelectionOperator::ComputeSelectedElements(vtkDataObject* input, vtkData
}
//----------------------------------------------------------------------------
bool vtkSelectionOperator::ComputeSelectedElementsForCompositeDataSet(
bool vtkSelector::ComputeSelectedElementsForCompositeDataSet(
vtkCompositeDataSet* inputCD, vtkCompositeDataSet* outputCD)
{
assert(inputCD != nullptr);
......@@ -147,7 +147,7 @@ bool vtkSelectionOperator::ComputeSelectedElementsForCompositeDataSet(
}
//----------------------------------------------------------------------------
bool vtkSelectionOperator::SkipBlock(unsigned int compositeIndex, unsigned int amrLevel, unsigned int amrIndex)
bool vtkSelector::SkipBlock(unsigned int compositeIndex, unsigned int amrLevel, unsigned int amrIndex)
{
auto properties = this->Node->GetProperties();
if (properties->Has(vtkSelectionNode::COMPOSITE_INDEX()) &&
......@@ -172,7 +172,7 @@ bool vtkSelectionOperator::SkipBlock(unsigned int compositeIndex, unsigned int a
//----------------------------------------------------------------------------
// Creates a new insidedness array with the given number of elements.
vtkSmartPointer<vtkSignedCharArray> vtkSelectionOperator::CreateInsidednessArray(vtkIdType numElems)
vtkSmartPointer<vtkSignedCharArray> vtkSelector::CreateInsidednessArray(vtkIdType numElems)
{
auto darray = vtkSmartPointer<vtkSignedCharArray>::New();
darray->SetName("vtkInsidedness");
......@@ -182,7 +182,7 @@ vtkSmartPointer<vtkSignedCharArray> vtkSelectionOperator::CreateInsidednessArray
}
//----------------------------------------------------------------------------
vtkSmartPointer<vtkSignedCharArray> vtkSelectionOperator::ComputeCellsContainingSelectedPoints(
vtkSmartPointer<vtkSignedCharArray> vtkSelector::ComputeCellsContainingSelectedPoints(
vtkDataObject* data, vtkSignedCharArray* selectedPoints)
{
vtkDataSet* dataset = vtkDataSet::SafeDownCast(data);
......@@ -214,7 +214,7 @@ vtkSmartPointer<vtkSignedCharArray> vtkSelectionOperator::ComputeCellsContaining
}
//----------------------------------------------------------------------------
void vtkSelectionOperator::PrintSelf(ostream& os, vtkIndent indent)
void vtkSelector::PrintSelf(ostream& os, vtkIndent indent)
{
Superclass::PrintSelf(os, indent);
}
/*=========================================================================
Program: Visualization Toolkit
Module: vtkSelectionOperator.h
Module: vtkSelector.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -13,14 +13,14 @@
=========================================================================*/
/**
* @class vtkSelectionOperator.h
* @class vtkSelector.h
* @brief Computes the portion of a dataset which is inside a selection
*
* This is an abstract superclass for types of selection operations.
*/
#ifndef vtkSelectionOperator_h
#define vtkSelectionOperator_h
#ifndef vtkSelector_h
#define vtkSelector_h
#include "vtkFiltersExtractionModule.h" // For export macro
#include "vtkObject.h"
......@@ -32,10 +32,10 @@ class vtkSelectionNode;
class vtkSignedCharArray;
class vtkTable;
class VTKFILTERSEXTRACTION_EXPORT vtkSelectionOperator : public vtkObject
class VTKFILTERSEXTRACTION_EXPORT vtkSelector : public vtkObject
{
public:
vtkTypeMacro(vtkSelectionOperator, vtkObject);
vtkTypeMacro(vtkSelector, vtkObject);
void PrintSelf(ostream& os, vtkIndent indent) override;
/**
......@@ -75,8 +75,8 @@ class VTKFILTERSEXTRACTION_EXPORT vtkSelectionOperator : public vtkObject
virtual bool ComputeSelectedElements(vtkDataObject* input, vtkDataObject* output);
protected:
vtkSelectionOperator();
virtual ~vtkSelectionOperator() override;
vtkSelector();
virtual ~vtkSelector() override;
// Contains the selection criteria.
vtkSelectionNode* Node = nullptr;
......@@ -147,8 +147,8 @@ protected:
vtkDataObject* data, vtkSignedCharArray* selectedPoints);
private:
vtkSelectionOperator(const vtkSelectionOperator&) = delete;
void operator=(const vtkSelectionOperator&) = delete;
vtkSelector(const vtkSelector&) = delete;
void operator=(const vtkSelector&) = delete;
};
#endif
......@@ -16,7 +16,7 @@
* @class vtkValueSelector
* @brief selects elements matching chosen values.
*
* vtkValueSelector is a vtkSelectionOperator that can select elements matching
* vtkValueSelector is a vtkSelector that can select elements matching
* values. This can handle a wide array of vtkSelectionNode::SelectionContent types.
* These include vtkSelectionNode::GLOBALIDS, vtkSelectionNode::PEDIGREEIDS,
* vtkSelectionNode::VALUES, vtkSelectionNode::INDICES, and
......@@ -40,15 +40,15 @@
#ifndef vtkValueSelector_h
#define vtkValueSelector_h
#include "vtkSelectionOperator.h"
#include "vtkSelector.h"
#include <memory> // unique_ptr
class VTKFILTERSEXTRACTION_EXPORT vtkValueSelector : public vtkSelectionOperator
class VTKFILTERSEXTRACTION_EXPORT vtkValueSelector : public vtkSelector
{
public:
static vtkValueSelector* New();
vtkTypeMacro(vtkValueSelector, vtkSelectionOperator);
vtkTypeMacro(vtkValueSelector, vtkSelector);
void PrintSelf(ostream& os, vtkIndent indent) override;
void Initialize(vtkSelectionNode* node, const char* insidednessArrayName) override;
......
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