1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
/*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkExtractSelection.h,v $
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkExtractSelection - extract a subset from a vtkDataSet.
// .SECTION Description
// vtkExtractSelection extracts some subset of cells and points from
// its input dataset. The subset is described by the contents of the
// vtkSelection on its first input port. The dataset is given on its
// second input port. Depending on the content of the vtkSelection,
// this will use either a vtkExtractSelectedIds, vtkExtractSelectedFrustum
// vtkExtractSelectedLocations or a vtkExtractSelectedThreshold to perform
// the extraction.
// .SECTION See Also
// vtkSelection vtkExtractSelectedIds vtkExtractSelectedFrustum
// vtkExtractSelectedLocations vtkExtractSelectedThresholds
#ifndef __vtkExtractSelection_h
#define __vtkExtractSelection_h
#include "vtkDataSetAlgorithm.h"
class vtkExtractSelectedIds;
class vtkExtractSelectedFrustum;
class vtkExtractSelectedLocations;
class vtkExtractSelectedThresholds;
class vtkSelection;
class VTK_GRAPHICS_EXPORT vtkExtractSelection : public vtkDataSetAlgorithm
{
public:
vtkTypeRevisionMacro(vtkExtractSelection,vtkDataSetAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Construct object with NULL extractfilter
static vtkExtractSelection *New();
// Description:
// Convenience method to specify the selection connection (2nd input
// port)
void SetSelectionConnection(vtkAlgorithmOutput* algOutput)
{
this->SetInputConnection(1, algOutput);
}
protected:
vtkExtractSelection();
~vtkExtractSelection();
//sets up empty output dataset
virtual int RequestDataObject(vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector);
//runs the algorithm and fills the output with results
virtual int RequestData(vtkInformation *,
vtkInformationVector **,
vtkInformationVector *);
virtual int FillInputPortInformation(int port, vtkInformation* info);
vtkExtractSelectedIds* IdsFilter;
vtkExtractSelectedFrustum* FrustumFilter;
vtkExtractSelectedLocations* LocationsFilter;
vtkExtractSelectedThresholds* ThresholdsFilter;
private:
vtkExtractSelection(const vtkExtractSelection&); // Not implemented.
void operator=(const vtkExtractSelection&); // Not implemented.
};
#endif
|