Commit c872bb79 authored by Jeff Baumes's avatar Jeff Baumes
Browse files

Fixing bug where threshold selections were double-negated

Change-Id: I7a7b7c68b514ed000f7c2df4fee3230f85b68c84
parent 52c9dfdd
...@@ -588,15 +588,10 @@ int vtkConvertSelection::Convert( ...@@ -588,15 +588,10 @@ int vtkConvertSelection::Convert(
vtkErrorMacro("Could not find vtkDataArray for thresholds selection."); vtkErrorMacro("Could not find vtkDataArray for thresholds selection.");
return 0; return 0;
} }
int inverse = 0;
if (inputNode->GetProperties()->Has(vtkSelectionNode::INVERSE()))
{
inverse = inputNode->GetProperties()->Get(vtkSelectionNode::INVERSE());
}
for (vtkIdType id = 0; id < dataArr->GetNumberOfTuples(); id++) for (vtkIdType id = 0; id < dataArr->GetNumberOfTuples(); id++)
{ {
int keepPoint = vtkExtractSelectedThresholds::EvaluateValue(dataArr, id, lims); int keepPoint = vtkExtractSelectedThresholds::EvaluateValue(dataArr, id, lims);
if (keepPoint ^ inverse) if (keepPoint)
{ {
indices->InsertNextValue(id); indices->InsertNextValue(id);
} }
......
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