VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkDirectedGraphAlgorithm.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 -------------------------------------------------------------------------*/ 00045 #ifndef __vtkDirectedGraphAlgorithm_h 00046 #define __vtkDirectedGraphAlgorithm_h 00047 00048 #include "vtkAlgorithm.h" 00049 #include "vtkDirectedGraph.h" // makes things a bit easier 00050 00051 class vtkDataSet; 00052 00053 class VTK_FILTERING_EXPORT vtkDirectedGraphAlgorithm : public vtkAlgorithm 00054 { 00055 public: 00056 static vtkDirectedGraphAlgorithm *New(); 00057 vtkTypeMacro(vtkDirectedGraphAlgorithm,vtkAlgorithm); 00058 void PrintSelf(ostream& os, vtkIndent indent); 00059 00061 00062 virtual int ProcessRequest(vtkInformation*, 00063 vtkInformationVector**, 00064 vtkInformationVector*); 00066 00068 00069 vtkDirectedGraph* GetOutput() { return this->GetOutput(0); } 00070 vtkDirectedGraph* GetOutput(int index); 00072 00074 00081 void SetInput(vtkDataObject * obj) { this->SetInput(0, obj); } 00082 void SetInput(int index, vtkDataObject* obj); 00084 00085 protected: 00086 vtkDirectedGraphAlgorithm(); 00087 ~vtkDirectedGraphAlgorithm(); 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*); 00109 00110 // see algorithm for more info 00111 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00112 virtual int FillInputPortInformation(int port, vtkInformation* info); 00113 00114 private: 00115 vtkDirectedGraphAlgorithm(const vtkDirectedGraphAlgorithm&); // Not implemented. 00116 void operator=(const vtkDirectedGraphAlgorithm&); // Not implemented. 00117 }; 00118 00119 #endif