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 -------------------------------------------------------------------------*/
45 #ifndef vtkGraphAlgorithm_h
46 #define vtkGraphAlgorithm_h
47 
48 #include "vtkCommonExecutionModelModule.h" // For export macro
49 #include "vtkAlgorithm.h"
50 #include "vtkGraph.h" // makes things a bit easier
51 
52 class vtkDataSet;
53 
54 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkGraphAlgorithm : public vtkAlgorithm
55 {
56 public:
57  static vtkGraphAlgorithm *New();
59  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
60 
66  vtkInformationVector*) VTK_OVERRIDE;
67 
71  vtkGraph* GetOutput() { return this->GetOutput(0); }
72  vtkGraph* GetOutput(int index);
73 
79  void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); }
80  void SetInputData(int index, vtkDataObject* obj);
81 
82 protected:
84  ~vtkGraphAlgorithm() VTK_OVERRIDE;
85 
86  // convenience method
87  virtual int RequestInformation(vtkInformation* request,
88  vtkInformationVector** inputVector,
89  vtkInformationVector* outputVector);
90 
91  virtual int RequestDataObject(vtkInformation* request,
92  vtkInformationVector** inputVector,
93  vtkInformationVector* outputVector);
94 
95 
100  virtual int RequestData(vtkInformation* request,
101  vtkInformationVector** inputVector,
102  vtkInformationVector* outputVector);
103 
108  virtual int RequestUpdateExtent(vtkInformation*,
111 
112  // see algorithm for more info
113  int FillOutputPortInformation(int port, vtkInformation* info) VTK_OVERRIDE;
114  int FillInputPortInformation(int port, vtkInformation* info) VTK_OVERRIDE;
115 
116 private:
117  vtkGraphAlgorithm(const vtkGraphAlgorithm&) VTK_DELETE_FUNCTION;
118  void operator=(const vtkGraphAlgorithm&) VTK_DELETE_FUNCTION;
119 };
120 
121 #endif
void SetInputData(vtkDataObject *obj)
Assign a data object as input.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Superclass for algorithms that produce only graph as output.
vtkGraph * GetOutput()
Get the output data object for a port on this algorithm.
Base class for graph data types.
Definition: vtkGraph.h:287
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:59
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
general representation of visualization data
Definition: vtkDataObject.h:64