VTK
dox/Filtering/vtkGraphAlgorithm.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkGraphAlgorithm.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 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00048 #ifndef __vtkGraphAlgorithm_h
00049 #define __vtkGraphAlgorithm_h
00050 
00051 #include "vtkAlgorithm.h"
00052 #include "vtkGraph.h" // makes things a bit easier
00053 
00054 class vtkDataSet;
00055 
00056 class VTK_FILTERING_EXPORT vtkGraphAlgorithm : public vtkAlgorithm
00057 {
00058 public:
00059   static vtkGraphAlgorithm *New();
00060   vtkTypeMacro(vtkGraphAlgorithm,vtkAlgorithm);
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062 
00064 
00065   virtual int ProcessRequest(vtkInformation*,
00066                              vtkInformationVector**,
00067                              vtkInformationVector*);
00069 
00071 
00072   vtkGraph* GetOutput() { return this->GetOutput(0); }
00073   vtkGraph* GetOutput(int index);
00075 
00077 
00084   void SetInput(vtkDataObject * obj) { this->SetInput(0, obj); }
00085   void SetInput(int index, vtkDataObject* obj);
00087 
00088 protected:
00089   vtkGraphAlgorithm();
00090   ~vtkGraphAlgorithm();
00091 
00092   // convenience method
00093   virtual int RequestInformation(vtkInformation* request,
00094                                  vtkInformationVector** inputVector,
00095                                  vtkInformationVector* outputVector);
00096 
00098 
00100   virtual int RequestData(vtkInformation* request,
00101                           vtkInformationVector** inputVector,
00102                           vtkInformationVector* outputVector);
00104 
00106 
00108   virtual int RequestUpdateExtent(vtkInformation*,
00109                                   vtkInformationVector**,
00110                                   vtkInformationVector*);
00112 
00114 
00115   virtual int RequestDataObject(vtkInformation*, 
00116                                 vtkInformationVector** inputVector, 
00117                                 vtkInformationVector* outputVector);
00119 
00120   // see algorithm for more info
00121   virtual int FillOutputPortInformation(int port, vtkInformation* info);
00122   virtual int FillInputPortInformation(int port, vtkInformation* info);
00123 
00124 private:
00125   vtkGraphAlgorithm(const vtkGraphAlgorithm&);  // Not implemented.
00126   void operator=(const vtkGraphAlgorithm&);  // Not implemented.
00127 };
00128 
00129 #endif