VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkUnstructuredGridAlgorithm.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 __vtkUnstructuredGridAlgorithm_h 00037 #define __vtkUnstructuredGridAlgorithm_h 00038 00039 #include "vtkAlgorithm.h" 00040 00041 class vtkDataSet; 00042 class vtkUnstructuredGrid; 00043 00044 class VTK_FILTERING_EXPORT vtkUnstructuredGridAlgorithm : public vtkAlgorithm 00045 { 00046 public: 00047 static vtkUnstructuredGridAlgorithm *New(); 00048 vtkTypeMacro(vtkUnstructuredGridAlgorithm,vtkAlgorithm); 00049 void PrintSelf(ostream& os, vtkIndent indent); 00050 00052 00053 vtkUnstructuredGrid* GetOutput(); 00054 vtkUnstructuredGrid* GetOutput(int); 00055 virtual void SetOutput(vtkDataObject* d); 00057 00059 00060 virtual int ProcessRequest(vtkInformation*, 00061 vtkInformationVector**, 00062 vtkInformationVector*); 00064 00065 // this method is not recommended for use, but lots of old style filters 00066 // use it 00067 vtkDataObject *GetInput(int port); 00068 vtkDataObject *GetInput() { return this->GetInput(0); }; 00069 vtkUnstructuredGrid *GetUnstructuredGridInput(int port); 00070 00072 00079 void SetInput(vtkDataObject *); 00080 void SetInput(int, vtkDataObject*); 00082 00084 00088 void AddInput(vtkDataObject *); 00089 void AddInput(int, vtkDataObject*); 00091 00092 protected: 00093 vtkUnstructuredGridAlgorithm(); 00094 ~vtkUnstructuredGridAlgorithm(); 00095 00096 // convenience method 00097 virtual int RequestInformation(vtkInformation* request, 00098 vtkInformationVector** inputVector, 00099 vtkInformationVector* outputVector); 00100 00102 00104 virtual int RequestData(vtkInformation* request, 00105 vtkInformationVector** inputVector, 00106 vtkInformationVector* outputVector); 00108 00110 00112 virtual int RequestUpdateExtent(vtkInformation*, 00113 vtkInformationVector**, 00114 vtkInformationVector*); 00116 00118 00119 virtual void ExecuteData(vtkDataObject *output); 00120 virtual void Execute(); 00122 00123 // see algorithm for more info 00124 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00125 virtual int FillInputPortInformation(int port, vtkInformation* info); 00126 00127 private: 00128 vtkUnstructuredGridAlgorithm(const vtkUnstructuredGridAlgorithm&); // Not implemented. 00129 void operator=(const vtkUnstructuredGridAlgorithm&); // Not implemented. 00130 }; 00131 00132 #endif