VTK
vtkUndirectedGraphAlgorithm.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkUndirectedGraphAlgorithm.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 -------------------------------------------------------------------------*/
40 #ifndef vtkUndirectedGraphAlgorithm_h
41 #define vtkUndirectedGraphAlgorithm_h
42 
43 #include "vtkCommonExecutionModelModule.h" // For export macro
44 #include "vtkAlgorithm.h"
45 #include "vtkUndirectedGraph.h" // makes things a bit easier
46 
47 class vtkDataSet;
48 
49 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkUndirectedGraphAlgorithm : public vtkAlgorithm
50 {
51 public:
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
61  vtkInformationVector*) override;
62 
66  vtkUndirectedGraph* GetOutput() { return this->GetOutput(0); }
67  vtkUndirectedGraph* GetOutput(int index);
68 
74  void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); }
75  void SetInputData(int index, vtkDataObject* obj);
76 
77 protected:
79  ~vtkUndirectedGraphAlgorithm() override;
80 
81  // convenience method
82  virtual int RequestInformation(vtkInformation* request,
83  vtkInformationVector** inputVector,
84  vtkInformationVector* outputVector);
85 
90  virtual int RequestData(vtkInformation* request,
91  vtkInformationVector** inputVector,
92  vtkInformationVector* outputVector);
93 
98  virtual int RequestUpdateExtent(vtkInformation*,
101 
102  // see algorithm for more info
104  int FillInputPortInformation(int port, vtkInformation* info) override;
105 
106 private:
108  void operator=(const vtkUndirectedGraphAlgorithm&) = delete;
109 };
110 
111 #endif
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...
An undirected graph.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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
void SetInputData(vtkDataObject *obj)
Assign a data object as input.
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()
vtkUndirectedGraph * GetOutput()
Get the output data object for a port on this algorithm.
Superclass for algorithms that produce undirected graph as output.
general representation of visualization data
Definition: vtkDataObject.h:64