VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkStructuredGridAlgorithm.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 __vtkStructuredGridAlgorithm_h 00037 #define __vtkStructuredGridAlgorithm_h 00038 00039 #include "vtkAlgorithm.h" 00040 #include "vtkStructuredGrid.h" // makes things a bit easier 00041 00042 class vtkDataSet; 00043 class vtkStructuredGrid; 00044 00045 class VTK_FILTERING_EXPORT vtkStructuredGridAlgorithm : public vtkAlgorithm 00046 { 00047 public: 00048 static vtkStructuredGridAlgorithm *New(); 00049 vtkTypeMacro(vtkStructuredGridAlgorithm,vtkAlgorithm); 00050 void PrintSelf(ostream& os, vtkIndent indent); 00051 00053 00054 vtkStructuredGrid* GetOutput(); 00055 vtkStructuredGrid* GetOutput(int); 00056 virtual void SetOutput(vtkDataObject* d); 00058 00060 00061 virtual int ProcessRequest(vtkInformation*, 00062 vtkInformationVector**, 00063 vtkInformationVector*); 00065 00066 // this method is not recommended for use, but lots of old style filters 00067 // use it 00068 vtkDataObject* GetInput(); 00069 vtkDataObject *GetInput(int port); 00070 vtkStructuredGrid *GetStructuredGridInput(int port); 00071 00073 00080 void SetInput(vtkDataObject *); 00081 void SetInput(int, vtkDataObject*); 00083 00085 00089 void AddInput(vtkDataObject *); 00090 void AddInput(int, vtkDataObject*); 00092 00093 protected: 00094 vtkStructuredGridAlgorithm(); 00095 ~vtkStructuredGridAlgorithm(); 00096 00097 // convenience method 00098 virtual int RequestInformation(vtkInformation* request, 00099 vtkInformationVector** inputVector, 00100 vtkInformationVector* outputVector); 00101 00103 00105 virtual int RequestData(vtkInformation* request, 00106 vtkInformationVector** inputVector, 00107 vtkInformationVector* outputVector); 00109 00111 00113 virtual int RequestUpdateExtent(vtkInformation*, 00114 vtkInformationVector**, 00115 vtkInformationVector*) 00116 { 00117 return 1; 00118 }; 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 vtkStructuredGridAlgorithm(const vtkStructuredGridAlgorithm&); // Not implemented. 00133 void operator=(const vtkStructuredGridAlgorithm&); // Not implemented. 00134 }; 00135 00136 #endif