VTK
dox/Common/ExecutionModel/vtkRectilinearGridAlgorithm.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkRectilinearGridAlgorithm.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 =========================================================================*/
00032 #ifndef __vtkRectilinearGridAlgorithm_h
00033 #define __vtkRectilinearGridAlgorithm_h
00034 
00035 #include "vtkCommonExecutionModelModule.h" // For export macro
00036 #include "vtkAlgorithm.h"
00037 #include "vtkRectilinearGrid.h" // makes things a bit easier
00038 
00039 class vtkDataSet;
00040 class vtkRectilinearGrid;
00041 
00042 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkRectilinearGridAlgorithm : public vtkAlgorithm
00043 {
00044 public:
00045   static vtkRectilinearGridAlgorithm *New();
00046   vtkTypeMacro(vtkRectilinearGridAlgorithm,vtkAlgorithm);
00047   void PrintSelf(ostream& os, vtkIndent indent);
00048 
00050 
00051   vtkRectilinearGrid* GetOutput();
00052   vtkRectilinearGrid* GetOutput(int);
00053   virtual void SetOutput(vtkDataObject* d);
00055 
00057 
00058   virtual int ProcessRequest(vtkInformation*,
00059                              vtkInformationVector**,
00060                              vtkInformationVector*);
00062 
00063   // this method is not recommended for use, but lots of old style filters
00064   // use it
00065   vtkDataObject* GetInput();
00066   vtkDataObject *GetInput(int port);
00067   vtkRectilinearGrid *GetRectilinearGridInput(int port);
00068 
00070 
00073   void SetInputData(vtkDataObject *);
00074   void SetInputData(int, vtkDataObject*);
00076 
00078 
00081   void AddInputData(vtkDataObject *);
00082   void AddInputData(int, vtkDataObject*);
00084 
00085 protected:
00086   vtkRectilinearGridAlgorithm();
00087   ~vtkRectilinearGridAlgorithm();
00088 
00089   // convenience method
00090   virtual int RequestInformation(vtkInformation* request,
00091                                  vtkInformationVector** inputVector,
00092                                  vtkInformationVector* outputVector);
00093 
00095 
00097   virtual int RequestData(vtkInformation* request,
00098                           vtkInformationVector** inputVector,
00099                           vtkInformationVector* outputVector);
00101 
00103 
00105   virtual int RequestUpdateExtent(vtkInformation*,
00106                                   vtkInformationVector**,
00107                                   vtkInformationVector*)
00108     {
00109       return 1;
00110     };
00112 
00113   // see algorithm for more info
00114   virtual int FillOutputPortInformation(int port, vtkInformation* info);
00115   virtual int FillInputPortInformation(int port, vtkInformation* info);
00116 
00117 private:
00118   vtkRectilinearGridAlgorithm(const vtkRectilinearGridAlgorithm&);  // Not implemented.
00119   void operator=(const vtkRectilinearGridAlgorithm&);  // Not implemented.
00120 };
00121 
00122 #endif