[vtkusers] ExtractSelectedThresholds
David E DeMarle
dave.demarle at kitware.com
Tue Apr 27 19:45:02 EDT 2010
Yep, you need to tell the SelectionNode that its contents describe a
set of thresholds, since otherwise they might represent a set of ids,
locations etc.
That flag is used as a sanity check in the Extraction filters and more
to the point by the vtkExtractSelection filter, which uses it to
decide which of the real ExtractionFilters it needs to call into for
any given SelectionNode. That is why you don't see
vtkExtractSelectedThresholds instantiated by name in that test.
David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109
On Tue, Apr 27, 2010 at 7:24 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> On Tue, Apr 27, 2010 at 7:08 PM, David E DeMarle
> <dave.demarle at kitware.com> wrote:
>> It is tested by Graphics/Testing/Cxx/TestExtraction.cxx
>>
>> You specify a set of thresholds by making up a linear array of min max
>> value pairs.
>>
>> You choose the array that you want to threshold within by assigning
>> the name of that thresholds array.
>>
>> So make up a 1 component wide double array, name it "SelectPoints",
>> and InsertValue(0.5), InsertValue(2.0). Then call
>> vtkSelectioNode::SetSelectionList(yourthresholdarray).
>>
>> Then pass the vtkSelectionNode, and the vtkDataSet to
>> vtkExtractSelectedThresholds.
>>
>> David E DeMarle
>
>
> Thanks for the quick reply David. However, I still don't see
> vtkExtractSelectedThresholds at all in
> Graphics/Testing/Cxx/TestExtraction.cxx ?
>
> I may be getting closer?
> http://www.vtk.org/Wiki/VTK/Examples/Broken/ExtractSelectedThresholds
>
> The error now is:
> vtkExtractSelectedThresholds (0x9dcde28): Missing or invalid CONTENT_TYPE.
>
> I'm guessing it has to do with this line:
> extract->SetInputArrayToProcess(0,0,0,
> vtkDataObject::FIELD_ASSOCIATION_POINTS, "SelectedPoints");
>
> Any ideas?
>
> Thanks,
>
> David
>
More information about the vtkusers
mailing list