VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkSelectionAlgorithm.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00040 #ifndef __vtkSelectionAlgorithm_h 00041 #define __vtkSelectionAlgorithm_h 00042 00043 #include "vtkAlgorithm.h" 00044 #include "vtkSelection.h" // makes things a bit easier 00045 00046 class vtkDataSet; 00047 00048 class VTK_FILTERING_EXPORT vtkSelectionAlgorithm : public vtkAlgorithm 00049 { 00050 public: 00051 static vtkSelectionAlgorithm *New(); 00052 vtkTypeRevisionMacro(vtkSelectionAlgorithm,vtkAlgorithm); 00053 void PrintSelf(ostream& os, vtkIndent indent); 00054 00056 00057 virtual int ProcessRequest(vtkInformation*, 00058 vtkInformationVector**, 00059 vtkInformationVector*); 00061 00063 00064 vtkSelection* GetOutput() { return this->GetOutput(0); } 00065 vtkSelection* GetOutput(int index); 00067 00069 00076 void SetInput(vtkDataObject * obj) { this->SetInput(0, obj); } 00077 void SetInput(int index, vtkDataObject* obj); 00079 00080 protected: 00081 vtkSelectionAlgorithm(); 00082 ~vtkSelectionAlgorithm(); 00083 00084 // convenience method 00085 virtual int RequestInformation(vtkInformation* request, 00086 vtkInformationVector** inputVector, 00087 vtkInformationVector* outputVector); 00088 00090 00092 virtual int RequestData(vtkInformation* request, 00093 vtkInformationVector** inputVector, 00094 vtkInformationVector* outputVector); 00096 00098 00100 virtual int RequestUpdateExtent(vtkInformation*, 00101 vtkInformationVector**, 00102 vtkInformationVector*); 00104 00105 // see algorithm for more info 00106 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00107 virtual int FillInputPortInformation(int port, vtkInformation* info); 00108 00109 private: 00110 vtkSelectionAlgorithm(const vtkSelectionAlgorithm&); // Not implemented. 00111 void operator=(const vtkSelectionAlgorithm&); // Not implemented. 00112 }; 00113 00114 #endif