VTK  9.0.20200923
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 -------------------------------------------------------------------------*/
42 #ifndef vtkGraphAlgorithm_h
43 #define vtkGraphAlgorithm_h
44 
45 #include "vtkAlgorithm.h"
46 #include "vtkCommonExecutionModelModule.h" // For export macro
47 #include "vtkGraph.h" // makes things a bit easier
48 
49 class vtkDataSet;
50 
51 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkGraphAlgorithm : public vtkAlgorithm
52 {
53 public:
54  static vtkGraphAlgorithm* New();
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
63 
67  vtkGraph* GetOutput() { return this->GetOutput(0); }
68  vtkGraph* GetOutput(int index);
69 
75  void SetInputData(vtkDataObject* obj) { this->SetInputData(0, obj); }
76  void SetInputData(int index, vtkDataObject* obj);
77 
78 protected:
80  ~vtkGraphAlgorithm() override;
81 
82  // convenience method
83  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
84  vtkInformationVector* outputVector);
85 
86  virtual int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
87  vtkInformationVector* outputVector);
88 
93  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
94  vtkInformationVector* outputVector);
95 
100  virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
101 
102  // see algorithm for more info
104  int FillInputPortInformation(int port, vtkInformation* info) override;
105 
106 private:
107  vtkGraphAlgorithm(const vtkGraphAlgorithm&) = delete;
108  void operator=(const vtkGraphAlgorithm&) = delete;
109 };
110 
111 #endif
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:51
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:63
vtkAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkAlgorithm.h
vtkX3D::port
Definition: vtkX3D.h:453
vtkGraphAlgorithm::GetOutput
vtkGraph * GetOutput()
Get the output data object for a port on this algorithm.
Definition: vtkGraphAlgorithm.h:67
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkGraph.h
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
Definition: vtkX3D.h:382
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:289
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkX3D::index
Definition: vtkX3D.h:252
vtkAlgorithm::ProcessRequest
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkAlgorithm::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkGraphAlgorithm::SetInputData
void SetInputData(vtkDataObject *obj)
Assign a data object as input.
Definition: vtkGraphAlgorithm.h:75