Commit 1f519fe4 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot

Merge topic '12517-query-selections' into pv-master

2b18c8b4 Add QUERY type for vtkSelectionNode
parents 93b15a76 2b18c8b4
......@@ -60,6 +60,7 @@ vtkSelectionNode::vtkSelectionNode()
{
this->SelectionData = vtkDataSetAttributes::New();
this->Properties = vtkInformation::New();
this->QueryString = 0;
}
//----------------------------------------------------------------------------
......@@ -70,6 +71,7 @@ vtkSelectionNode::~vtkSelectionNode()
{
this->SelectionData->Delete();
}
this->SetQueryString(0);
}
//----------------------------------------------------------------------------
......@@ -189,6 +191,7 @@ void vtkSelectionNode::ShallowCopy(vtkSelectionNode* input)
this->Initialize();
this->Properties->Copy(input->Properties, 0);
this->SelectionData->ShallowCopy(input->SelectionData);
this->SetQueryString(input->GetQueryString());
this->Modified();
}
......@@ -202,6 +205,7 @@ void vtkSelectionNode::DeepCopy(vtkSelectionNode* input)
this->Initialize();
this->Properties->Copy(input->Properties, 1);
this->SelectionData->DeepCopy(input->SelectionData);
this->SetQueryString(input->GetQueryString());
this->Modified();
}
......
......@@ -123,7 +123,8 @@ public:
FRUSTUM,
LOCATIONS,
THRESHOLDS,
BLOCKS // used to select blocks within a composite dataset.
BLOCKS, // used to select blocks within a composite dataset.
QUERY
};
//ETX
......@@ -157,6 +158,11 @@ public:
virtual void SetFieldType(int type);
virtual int GetFieldType();
// Description:
// Set/Get the query expression string.
vtkSetStringMacro(QueryString);
vtkGetStringMacro(QueryString);
// Description:
// For location selection of points, if distance is greater than this reject.
static vtkInformationDoubleKey* EPSILON();
......@@ -242,6 +248,7 @@ protected:
vtkInformation* Properties;
vtkDataSetAttributes* SelectionData;
char* QueryString;
private:
vtkSelectionNode(const vtkSelectionNode&); // Not implemented.
......
......@@ -69,6 +69,7 @@ vtkSelectionSource::vtkSelectionSource()
this->CompositeIndex = -1;
this->HierarchicalLevel = -1;
this->HierarchicalIndex = -1;
this->QueryString = 0;
}
//----------------------------------------------------------------------------
......@@ -504,6 +505,13 @@ int vtkSelectionSource::RequestData(
selectionList->Delete();
}
if(this->ContentType == vtkSelectionNode::QUERY)
{
oProperties->Set(vtkSelectionNode::CONTENT_TYPE(), this->ContentType);
oProperties->Set(vtkSelectionNode::FIELD_TYPE(), this->FieldType);
output->SetQueryString(this->QueryString);
}
oProperties->Set(vtkSelectionNode::CONTAINING_CELLS(),
this->ContainingCells);
......
......@@ -122,6 +122,12 @@ public:
vtkGetMacro(HierarchicalLevel, int);
vtkSetMacro(HierarchicalIndex, int);
vtkGetMacro(HierarchicalIndex, int);
// Description:
// Set/Get the query expression string.
vtkSetStringMacro(QueryString);
vtkGetStringMacro(QueryString);
protected:
vtkSelectionSource();
~vtkSelectionSource();
......@@ -146,6 +152,7 @@ protected:
int HierarchicalIndex;
char *ArrayName;
int ArrayComponent;
char *QueryString;
private:
vtkSelectionSource(const vtkSelectionSource&); // Not implemented.
......
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