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 =========================================================================*/ 00033 #ifndef __vtkPolyDataAlgorithm_h 00034 #define __vtkPolyDataAlgorithm_h 00035 00036 #include "vtkCommonExecutionModelModule.h" // For export macro 00037 #include "vtkAlgorithm.h" 00038 #include "vtkPolyData.h" // makes things a bit easier 00039 00040 class vtkDataSet; 00041 class vtkPolyData; 00042 00043 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkPolyDataAlgorithm : public vtkAlgorithm 00044 { 00045 public: 00046 static vtkPolyDataAlgorithm *New(); 00047 vtkTypeMacro(vtkPolyDataAlgorithm,vtkAlgorithm); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00049 00051 00052 vtkPolyData* GetOutput(); 00053 vtkPolyData* GetOutput(int); 00054 virtual void SetOutput(vtkDataObject* d); 00056 00058 00059 virtual int ProcessRequest(vtkInformation*, 00060 vtkInformationVector**, 00061 vtkInformationVector*); 00063 00064 // this method is not recommended for use, but lots of old style filters 00065 // use it 00066 vtkDataObject* GetInput(); 00067 vtkDataObject *GetInput(int port); 00068 vtkPolyData *GetPolyDataInput(int port); 00069 00071 00074 void SetInputData(vtkDataObject *); 00075 void SetInputData(int, vtkDataObject*); 00077 00079 00082 void AddInputData(vtkDataObject *); 00083 void AddInputData(int, vtkDataObject*); 00085 00086 protected: 00087 vtkPolyDataAlgorithm(); 00088 ~vtkPolyDataAlgorithm(); 00089 00090 // convenience method 00091 virtual int RequestInformation(vtkInformation* request, 00092 vtkInformationVector** inputVector, 00093 vtkInformationVector* outputVector); 00094 00096 00098 virtual int RequestData(vtkInformation* request, 00099 vtkInformationVector** inputVector, 00100 vtkInformationVector* outputVector); 00102 00104 00106 virtual int RequestUpdateExtent(vtkInformation*, 00107 vtkInformationVector**, 00108 vtkInformationVector*); 00110 00111 // see algorithm for more info 00112 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00113 virtual int FillInputPortInformation(int port, vtkInformation* info); 00114 00115 private: 00116 vtkPolyDataAlgorithm(const vtkPolyDataAlgorithm&); // Not implemented. 00117 void operator=(const vtkPolyDataAlgorithm&); // Not implemented. 00118 }; 00119 00120 #endif