VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkDataSetAlgorithm.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 __vtkDataSetAlgorithm_h 00037 #define __vtkDataSetAlgorithm_h 00038 00039 #include "vtkCommonExecutionModelModule.h" // For export macro 00040 #include "vtkAlgorithm.h" 00041 00042 class vtkDataSet; 00043 class vtkImageData; 00044 class vtkPolyData; 00045 class vtkStructuredPoints; 00046 class vtkStructuredGrid; 00047 class vtkUnstructuredGrid; 00048 class vtkRectilinearGrid; 00049 00050 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkDataSetAlgorithm : public vtkAlgorithm 00051 { 00052 public: 00053 static vtkDataSetAlgorithm *New(); 00054 vtkTypeMacro(vtkDataSetAlgorithm,vtkAlgorithm); 00055 void PrintSelf(ostream& os, vtkIndent indent); 00056 00058 00059 vtkDataSet* GetOutput(); 00060 vtkDataSet* GetOutput(int); 00062 00065 vtkDataObject* GetInput(); 00066 00068 vtkPolyData *GetPolyDataOutput(); 00069 00071 vtkStructuredPoints *GetStructuredPointsOutput(); 00072 00074 vtkImageData *GetImageDataOutput(); 00075 00077 vtkStructuredGrid *GetStructuredGridOutput(); 00078 00080 vtkUnstructuredGrid *GetUnstructuredGridOutput(); 00081 00083 vtkRectilinearGrid *GetRectilinearGridOutput(); 00084 00086 00089 void SetInputData(vtkDataObject*); 00090 void SetInputData(int, vtkDataObject*); 00091 void SetInputData(vtkDataSet*); 00092 void SetInputData(int, vtkDataSet*); 00094 00096 00099 void AddInputData(vtkDataObject *); 00100 void AddInputData(vtkDataSet*); 00101 void AddInputData(int, vtkDataSet*); 00102 void AddInputData(int, vtkDataObject*); 00104 00106 00107 virtual int ProcessRequest(vtkInformation* request, 00108 vtkInformationVector** inputVector, 00109 vtkInformationVector* outputVector); 00111 00112 protected: 00113 vtkDataSetAlgorithm(); 00114 ~vtkDataSetAlgorithm() {}; 00115 00117 00122 virtual int RequestInformation(vtkInformation*, 00123 vtkInformationVector**, 00124 vtkInformationVector*) {return 1;}; 00126 00128 00132 virtual int RequestUpdateExtent(vtkInformation*, 00133 vtkInformationVector**, 00134 vtkInformationVector*) 00135 { 00136 return 1; 00137 }; 00139 00140 00142 00149 virtual int RequestDataObject(vtkInformation* request, 00150 vtkInformationVector** inputVector, 00151 vtkInformationVector* outputVector); 00153 00155 00159 virtual int RequestData(vtkInformation*, 00160 vtkInformationVector**, 00161 vtkInformationVector*) {return 1;}; 00163 00164 00165 // see algorithm for more info 00166 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00167 virtual int FillInputPortInformation(int port, vtkInformation* info); 00168 00169 vtkDataObject *GetInput(int port); 00170 00171 private: 00172 vtkDataSetAlgorithm(const vtkDataSetAlgorithm&); // Not implemented. 00173 void operator=(const vtkDataSetAlgorithm&); // Not implemented. 00174 }; 00175 00176 #endif 00177 00178