VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPolyDataAlgorithm.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 =========================================================================*/ 00039 #ifndef __vtkPolyDataAlgorithm_h 00040 #define __vtkPolyDataAlgorithm_h 00041 00042 #include "vtkAlgorithm.h" 00043 #include "vtkPolyData.h" // makes things a bit easier 00044 00045 class vtkDataSet; 00046 class vtkPolyData; 00047 00048 class VTK_FILTERING_EXPORT vtkPolyDataAlgorithm : public vtkAlgorithm 00049 { 00050 public: 00051 static vtkPolyDataAlgorithm *New(); 00052 vtkTypeMacro(vtkPolyDataAlgorithm,vtkAlgorithm); 00053 void PrintSelf(ostream& os, vtkIndent indent); 00054 00056 00057 vtkPolyData* GetOutput(); 00058 vtkPolyData* GetOutput(int); 00059 virtual void SetOutput(vtkDataObject* d); 00061 00063 00064 virtual int ProcessRequest(vtkInformation*, 00065 vtkInformationVector**, 00066 vtkInformationVector*); 00068 00069 // this method is not recommended for use, but lots of old style filters 00070 // use it 00071 vtkDataObject* GetInput(); 00072 vtkDataObject *GetInput(int port); 00073 vtkPolyData *GetPolyDataInput(int port); 00074 00076 00083 void SetInput(vtkDataObject *); 00084 void SetInput(int, vtkDataObject*); 00086 00088 00092 void AddInput(vtkDataObject *); 00093 void AddInput(int, vtkDataObject*); 00095 00096 protected: 00097 vtkPolyDataAlgorithm(); 00098 ~vtkPolyDataAlgorithm(); 00099 00100 // convenience method 00101 virtual int RequestInformation(vtkInformation* request, 00102 vtkInformationVector** inputVector, 00103 vtkInformationVector* outputVector); 00104 00106 00108 virtual int RequestData(vtkInformation* request, 00109 vtkInformationVector** inputVector, 00110 vtkInformationVector* outputVector); 00112 00114 00116 virtual int RequestUpdateExtent(vtkInformation*, 00117 vtkInformationVector**, 00118 vtkInformationVector*); 00120 00122 00123 virtual void ExecuteData(vtkDataObject *output); 00124 virtual void Execute(); 00126 00127 // see algorithm for more info 00128 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00129 virtual int FillInputPortInformation(int port, vtkInformation* info); 00130 00131 private: 00132 vtkPolyDataAlgorithm(const vtkPolyDataAlgorithm&); // Not implemented. 00133 void operator=(const vtkPolyDataAlgorithm&); // Not implemented. 00134 }; 00135 00136 #endif