VTK
vtkGraphAlgorithm.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGraphAlgorithm.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
44 #ifndef vtkGraphAlgorithm_h
45 #define vtkGraphAlgorithm_h
46 
47 #include "vtkCommonExecutionModelModule.h" // For export macro
48 #include "vtkAlgorithm.h"
49 #include "vtkGraph.h" // makes things a bit easier
50 
51 class vtkDataSet;
52 
54 {
55 public:
56  static vtkGraphAlgorithm *New();
58  void PrintSelf(ostream& os, vtkIndent indent);
59 
61 
62  virtual int ProcessRequest(vtkInformation*,
66 
68 
69  vtkGraph* GetOutput() { return this->GetOutput(0); }
70  vtkGraph* GetOutput(int index);
72 
74 
77  void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); }
78  void SetInputData(int index, vtkDataObject* obj);
80 
81 protected:
84 
85  // convenience method
86  virtual int RequestInformation(vtkInformation* request,
87  vtkInformationVector** inputVector,
88  vtkInformationVector* outputVector);
89 
90  virtual int RequestDataObject(vtkInformation* request,
91  vtkInformationVector** inputVector,
92  vtkInformationVector* outputVector);
93 
94 
96 
98  virtual int RequestData(vtkInformation* request,
99  vtkInformationVector** inputVector,
100  vtkInformationVector* outputVector);
102 
104 
106  virtual int RequestUpdateExtent(vtkInformation*,
110 
111  // see algorithm for more info
114 
115 private:
116  vtkGraphAlgorithm(const vtkGraphAlgorithm&); // Not implemented.
117  void operator=(const vtkGraphAlgorithm&); // Not implemented.
118 };
119 
120 #endif
#define VTKCOMMONEXECUTIONMODEL_EXPORT
void SetInputData(vtkDataObject *obj)
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Superclass for algorithms that produce only graph as output.
vtkGraph * GetOutput()
Base class for graph data types.
Definition: vtkGraph.h:288
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:61
virtual int FillOutputPortInformation(int port, vtkInformation *info)
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int FillInputPortInformation(int port, vtkInformation *info)
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
general representation of visualization data
Definition: vtkDataObject.h:64
void PrintSelf(ostream &os, vtkIndent indent)