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