VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkSelectionAlgorithm.h 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 =========================================================================*/ 00036 #ifndef __vtkSelectionAlgorithm_h 00037 #define __vtkSelectionAlgorithm_h 00038 00039 #include "vtkCommonExecutionModelModule.h" // For export macro 00040 #include "vtkAlgorithm.h" 00041 #include "vtkSelection.h" // makes things a bit easier 00042 00043 class vtkDataSet; 00044 00045 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkSelectionAlgorithm : public vtkAlgorithm 00046 { 00047 public: 00048 static vtkSelectionAlgorithm *New(); 00049 vtkTypeMacro(vtkSelectionAlgorithm,vtkAlgorithm); 00050 void PrintSelf(ostream& os, vtkIndent indent); 00051 00053 00054 virtual int ProcessRequest(vtkInformation*, 00055 vtkInformationVector**, 00056 vtkInformationVector*); 00058 00060 00061 vtkSelection* GetOutput() { return this->GetOutput(0); } 00062 vtkSelection* GetOutput(int index); 00064 00066 00069 void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); } 00070 void SetInputData(int index, vtkDataObject* obj); 00072 00073 protected: 00074 vtkSelectionAlgorithm(); 00075 ~vtkSelectionAlgorithm(); 00076 00077 // convenience method 00078 virtual int RequestInformation(vtkInformation* request, 00079 vtkInformationVector** inputVector, 00080 vtkInformationVector* outputVector); 00081 00083 00085 virtual int RequestData(vtkInformation* request, 00086 vtkInformationVector** inputVector, 00087 vtkInformationVector* outputVector); 00089 00091 00093 virtual int RequestUpdateExtent(vtkInformation*, 00094 vtkInformationVector**, 00095 vtkInformationVector*); 00097 00098 // see algorithm for more info 00099 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00100 virtual int FillInputPortInformation(int port, vtkInformation* info); 00101 00102 private: 00103 vtkSelectionAlgorithm(const vtkSelectionAlgorithm&); // Not implemented. 00104 void operator=(const vtkSelectionAlgorithm&); // Not implemented. 00105 }; 00106 00107 #endif