VTK  9.2.6
vtkCompositeDataPipeline.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCompositeDataPipeline.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 =========================================================================*/
50 #ifndef vtkCompositeDataPipeline_h
51 #define vtkCompositeDataPipeline_h
52 
53 #include "vtkCommonExecutionModelModule.h" // For export macro
55 #include <vtkSmartPointer.h> // smart pointer
56 
57 #include <vector> // for vector in return type
58 
67 
68 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkCompositeDataPipeline
70 {
71 public:
74  void PrintSelf(ostream& os, vtkIndent indent) override;
75 
81 
87 
93 
102 
114 
123 
124 protected:
127 
128  int ForwardUpstream(vtkInformation* request) override;
129  virtual int ForwardUpstream(int i, int j, vtkInformation* request);
130 
131  // Copy information for the given request.
133  vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
134 
137 
139  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
140 
142  vtkInformationVector* outInfoVec) override;
143 
145  vtkInformationVector* outInfoVec) override;
146 
147  // Override this check to account for update extent.
149  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
150 
151  // Check whether the data object in the pipeline information exists
152  // and has a valid type.
153  virtual int CheckCompositeData(
154  vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
155 
156  // True when the pipeline is iterating over the current (simple) filter
157  // to produce composite output. In this case, ExecuteDataStart() should
158  // NOT Initialize() the composite output.
160 
161  virtual void ExecuteSimpleAlgorithm(vtkInformation* request, vtkInformationVector** inInfoVec,
162  vtkInformationVector* outInfoVec, int compositePort);
163 
165  vtkInformationVector* outInfoVec, int compositePort, int connection, vtkInformation* request,
167 
168  std::vector<vtkDataObject*> ExecuteSimpleAlgorithmForBlock(vtkInformationVector** inInfoVec,
169  vtkInformationVector* outInfoVec, vtkInformation* inInfo, vtkInformation* request,
170  vtkDataObject* dobj);
171 
172  bool ShouldIterateOverInput(vtkInformationVector** inInfoVec, int& compositePort);
173 
174  int InputTypeIsValid(int port, int index, vtkInformationVector** inInfoVec) override;
175 
177 
180 
182 
192  std::vector<vtkSmartPointer<vtkDataObject>> CreateOutputCompositeDataSet(
193  vtkCompositeDataSet* input, int compositePort, int numOutputPorts);
194 
195  // Override this to handle UPDATE_COMPOSITE_INDICES().
197  vtkInformationVector* outInfoVec) override;
198 
200 
201  // Because we sometimes have to swap between "simple" data types and composite
202  // data types, we sometimes want to skip resetting the pipeline information.
204 
214 
215 private:
217  void operator=(const vtkCompositeDataPipeline&) = delete;
218 };
219 
220 #endif
superclass for composite data iterators
Executive supporting composite datasets.
static vtkInformationIntegerVectorKey * UPDATE_COMPOSITE_INDICES()
UPDATE_COMPOSITE_INDICES is a key placed in the request to request a set of composite indices from a ...
int ForwardUpstream(vtkInformation *request) override
int NeedToExecuteBasedOnCompositeIndices(vtkInformation *outInfo)
virtual void ExecuteSimpleAlgorithm(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int compositePort)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void CopyDefaultInformation(vtkInformation *request, int direction, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
std::vector< vtkSmartPointer< vtkDataObject > > CreateOutputCompositeDataSet(vtkCompositeDataSet *input, int compositePort, int numOutputPorts)
Tries to create the best possible composite data output for the given input and non-composite algorit...
void ResetPipelineInformation(int port, vtkInformation *) override
int ExecuteData(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
virtual int ForwardUpstream(int i, int j, vtkInformation *request)
virtual void PushInformation(vtkInformation *)
vtkDataObject * GetCompositeOutputData(int port)
Returns the data object stored with the DATA_OBJECT() in the output port.
static vtkInformationIntegerKey * SUPPRESS_RESET_PI()
void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
static vtkInformationIntegerVectorKey * DATA_COMPOSITE_INDICES()
COMPOSITE_INDICES() is put in the output information by the executive if the request has UPDATE_COMPO...
static vtkInformationDoubleKey * BLOCK_AMOUNT_OF_DETAIL()
BLOCK_AMOUNT_OF_DETAIL is a key placed in the information about a multi-block dataset that indicates ...
int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
int ExecuteDataObject(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
bool ShouldIterateOverInput(vtkInformationVector **inInfoVec, int &compositePort)
virtual int CheckCompositeData(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
static vtkInformationIntegerKey * LOAD_REQUESTED_BLOCKS()
An integer key that indicates to the source to load all requested blocks specified in UPDATE_COMPOSIT...
int InputTypeIsValid(int port, int index, vtkInformationVector **inInfoVec) override
std::vector< vtkDataObject * > ExecuteSimpleAlgorithmForBlock(vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, vtkInformation *inInfo, vtkInformation *request, vtkDataObject *dobj)
static vtkInformationObjectBaseKey * COMPOSITE_DATA_META_DATA()
COMPOSITE_DATA_META_DATA is a key placed in the output-port information by readers/sources producing ...
static vtkCompositeDataPipeline * New()
~vtkCompositeDataPipeline() override
vtkDataObject * GetCompositeInputData(int port, int index, vtkInformationVector **inInfoVec)
Returns the data object stored with the DATA_OBJECT() in the input port.
virtual void PopInformation(vtkInformation *)
virtual void ExecuteEach(vtkCompositeDataIterator *iter, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int compositePort, int connection, vtkInformation *request, std::vector< vtkSmartPointer< vtkCompositeDataSet >> &compositeOutput)
abstract superclass for composite (multi-block or AMR) datasets
general representation of visualization data
a simple class to control print indentation
Definition: vtkIndent.h:119
Key for vtkDataObject values.
Key for double values in vtkInformation.
Key for integer values in vtkInformation.
Key for vtkObjectBase values.
Key for string values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Executive supporting partial updates.
@ vector
Definition: vtkX3D.h:243
@ direction
Definition: vtkX3D.h:266
@ port
Definition: vtkX3D.h:453
@ index
Definition: vtkX3D.h:252