VTK
vtkTreeAlgorithm.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTreeAlgorithm.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 -------------------------------------------------------------------------*/
36 #ifndef vtkTreeAlgorithm_h
37 #define vtkTreeAlgorithm_h
38 
39 #include "vtkCommonExecutionModelModule.h" // For export macro
40 #include "vtkAlgorithm.h"
41 #include "vtkTree.h" // makes things a bit easier
42 
43 class vtkDataSet;
44 
45 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkTreeAlgorithm : public vtkAlgorithm
46 {
47 public:
48  static vtkTreeAlgorithm *New();
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
57  vtkInformationVector*) override;
58 
62  vtkTree* GetOutput() { return this->GetOutput(0); }
63  vtkTree* GetOutput(int index);
64 
70  void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); }
71  void SetInputData(int index, vtkDataObject* obj);
72 
73 protected:
75  ~vtkTreeAlgorithm() override;
76 
77  // convenience method
78  virtual int RequestInformation(vtkInformation* request,
79  vtkInformationVector** inputVector,
80  vtkInformationVector* outputVector);
81 
86  virtual int RequestData(vtkInformation* request,
87  vtkInformationVector** inputVector,
88  vtkInformationVector* outputVector);
89 
94  virtual int RequestUpdateExtent(vtkInformation*,
97 
98  // see algorithm for more info
100  int FillInputPortInformation(int port, vtkInformation* info) override;
101 
102 private:
103  vtkTreeAlgorithm(const vtkTreeAlgorithm&) = delete;
104  void operator=(const vtkTreeAlgorithm&) = delete;
105 };
106 
107 #endif
Superclass for algorithms that produce only Tree as output.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
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 all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:53
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:33
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()
A rooted tree data structure.
Definition: vtkTree.h:54
general representation of visualization data
Definition: vtkDataObject.h:58
vtkTree * GetOutput()
Get the output data object for a port on this algorithm.