ParaView
vtkPVExtractSelection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPVExtractSelection.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
43 #ifndef vtkPVExtractSelection_h
44 #define vtkPVExtractSelection_h
45 
46 #include "vtkExtractSelection.h"
47 #include "vtkPVClientServerCoreCoreModule.h" //needed for exports
48 
49 class vtkSelectionNode;
50 
51 class VTKPVCLIENTSERVERCORECORE_EXPORT vtkPVExtractSelection : public vtkExtractSelection
52 {
53 public:
54  vtkTypeMacro(vtkPVExtractSelection, vtkExtractSelection);
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
57  static const int OUTPUT_PORT_EXTRACTED_DATASET = 0;
58  static const int OUTPUT_PORT_SELECTION_IDS = 1;
59  static const int OUTPUT_PORT_SELECTION_ORIGINAL = 2;
60 
64  static vtkPVExtractSelection* New();
65 
69  void RemoveAllSelectionsInputs() { this->SetInputConnection(1, 0); }
70 
71 protected:
74 
75  // sets up empty output dataset
76  virtual int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
77  vtkInformationVector* outputVector);
78 
79  // runs the algorithm and fills the output with results
80  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
81 
82  virtual int FillOutputPortInformation(int port, vtkInformation* info);
83 
84  vtkSelectionNode* LocateSelection(unsigned int level, unsigned int index, vtkSelection* sel);
85  vtkSelectionNode* LocateSelection(unsigned int composite_index, vtkSelection* sel);
86 
87 private:
88  vtkPVExtractSelection(const vtkPVExtractSelection&) VTK_DELETE_FUNCTION;
89  void operator=(const vtkPVExtractSelection&) VTK_DELETE_FUNCTION;
90 
91  class vtkSelectionNodeVector;
92  void RequestDataInternal(
93  vtkSelectionNodeVector& outputs, vtkDataObject* dataObjectOutput, vtkSelectionNode* sel);
94 
95  // Returns the combined content type for the selection.
96  int GetContentType(vtkSelection* sel);
97 };
98 
99 #endif
void RemoveAllSelectionsInputs()
Removes all inputs from input port 1.
Adds a two more output ports to vtkExtractSelection, the second port contains an id selection and the...