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 -------------------------------------------------------------------------*/
48 #ifndef __vtkGraphAlgorithm_h
49 #define __vtkGraphAlgorithm_h
50 
51 #include "vtkAlgorithm.h"
52 #include "vtkGraph.h" // makes things a bit easier
53 
54 class vtkDataSet;
55 
57 {
58 public:
59  static vtkGraphAlgorithm *New();
61  void PrintSelf(ostream& os, vtkIndent indent);
62 
64 
65  virtual int ProcessRequest(vtkInformation*,
69 
71 
72  vtkGraph* GetOutput() { return this->GetOutput(0); }
73  vtkGraph* GetOutput(int index);
75 
77 
84  void SetInput(vtkDataObject * obj) { this->SetInput(0, obj); }
85  void SetInput(int index, vtkDataObject* obj);
87 
88 protected:
91 
92  // convenience method
93  virtual int RequestInformation(vtkInformation* request,
94  vtkInformationVector** inputVector,
95  vtkInformationVector* outputVector);
96 
98 
100  virtual int RequestData(vtkInformation* request,
101  vtkInformationVector** inputVector,
102  vtkInformationVector* outputVector);
104 
106 
108  virtual int RequestUpdateExtent(vtkInformation*,
112 
114 
115  virtual int RequestDataObject(vtkInformation*,
116  vtkInformationVector** inputVector,
117  vtkInformationVector* outputVector);
119 
120  // see algorithm for more info
121  virtual int FillOutputPortInformation(int port, vtkInformation* info);
122  virtual int FillInputPortInformation(int port, vtkInformation* info);
123 
124 private:
125  vtkGraphAlgorithm(const vtkGraphAlgorithm&); // Not implemented.
126  void operator=(const vtkGraphAlgorithm&); // Not implemented.
127 };
128 
129 #endif
Store vtkAlgorithm input/output information.
#define VTK_FILTERING_EXPORT
abstract class to specify dataset behavior
Definition: vtkDataSet.h:58
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Superclass for algorithms that produce only graph as output.
vtkGraph * GetOutput()
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:59
virtual int FillOutputPortInformation(int port, vtkInformation *info)
void SetInput(vtkDataObject *obj)
a simple class to control print indentation
Definition: vtkIndent.h:37
virtual int FillInputPortInformation(int port, vtkInformation *info)
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
helper class to get VTK data object types as string and instantiate them
void PrintSelf(ostream &os, vtkIndent indent)