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 =========================================================================*/ 00030 #ifndef __vtkUnstructuredGridAlgorithm_h 00031 #define __vtkUnstructuredGridAlgorithm_h 00032 00033 #include "vtkCommonExecutionModelModule.h" // For export macro 00034 #include "vtkAlgorithm.h" 00035 00036 class vtkDataSet; 00037 class vtkUnstructuredGrid; 00038 00039 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkUnstructuredGridAlgorithm : public vtkAlgorithm 00040 { 00041 public: 00042 static vtkUnstructuredGridAlgorithm *New(); 00043 vtkTypeMacro(vtkUnstructuredGridAlgorithm,vtkAlgorithm); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 00048 vtkUnstructuredGrid* GetOutput(); 00049 vtkUnstructuredGrid* GetOutput(int); 00050 virtual void SetOutput(vtkDataObject* d); 00052 00054 00055 virtual int ProcessRequest(vtkInformation*, 00056 vtkInformationVector**, 00057 vtkInformationVector*); 00059 00060 // this method is not recommended for use, but lots of old style filters 00061 // use it 00062 vtkDataObject *GetInput(int port); 00063 vtkDataObject *GetInput() { return this->GetInput(0); }; 00064 vtkUnstructuredGrid *GetUnstructuredGridInput(int port); 00065 00067 00070 void SetInputData(vtkDataObject *); 00071 void SetInputData(int, vtkDataObject*); 00073 00075 00078 void AddInputData(vtkDataObject *); 00079 void AddInputData(int, vtkDataObject*); 00081 00082 protected: 00083 vtkUnstructuredGridAlgorithm(); 00084 ~vtkUnstructuredGridAlgorithm(); 00085 00086 // convenience method 00087 virtual int RequestInformation(vtkInformation* request, 00088 vtkInformationVector** inputVector, 00089 vtkInformationVector* outputVector); 00090 00092 00094 virtual int RequestData(vtkInformation* request, 00095 vtkInformationVector** inputVector, 00096 vtkInformationVector* outputVector); 00098 00100 00102 virtual int RequestUpdateExtent(vtkInformation*, 00103 vtkInformationVector**, 00104 vtkInformationVector*); 00106 00107 // see algorithm for more info 00108 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00109 virtual int FillInputPortInformation(int port, vtkInformation* info); 00110 00111 private: 00112 vtkUnstructuredGridAlgorithm(const vtkUnstructuredGridAlgorithm&); // Not implemented. 00113 void operator=(const vtkUnstructuredGridAlgorithm&); // Not implemented. 00114 }; 00115 00116 #endif