Commit 54152008 authored by Jeff Baumes's avatar Jeff Baumes Committed by Kitware Robot
Browse files

Merge topic 'convert-selection-bug'

c872bb79 Fixing bug where threshold selections were double-negated
parents 721fd2e9 c872bb79
......@@ -588,15 +588,10 @@ int vtkConvertSelection::Convert(
vtkErrorMacro("Could not find vtkDataArray for thresholds selection.");
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++)
{
int keepPoint = vtkExtractSelectedThresholds::EvaluateValue(dataArr, id, lims);
if (keepPoint ^ inverse)
if (keepPoint)
{
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