VTK  9.3.1
vtkImageAppendComponents.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
17 #ifndef vtkImageAppendComponents_h
18 #define vtkImageAppendComponents_h
19 
20 #include "vtkImagingCoreModule.h" // For export macro
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class VTKIMAGINGCORE_EXPORT vtkImageAppendComponents : public vtkThreadedImageAlgorithm
25 {
26 public:
27  static vtkImageAppendComponents* New();
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
37  virtual void ReplaceNthInputConnection(int idx, vtkAlgorithmOutput* input);
38 
40 
45  void SetInputData(int num, vtkDataObject* input);
46  void SetInputData(vtkDataObject* input) { this->SetInputData(0, input); }
48 
50 
55  vtkDataObject* GetInput(int num);
56  vtkDataObject* GetInput() { return this->GetInput(0); }
58 
65 
66 protected:
67  vtkImageAppendComponents() = default;
68  ~vtkImageAppendComponents() override = default;
69 
71 
72  void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
73  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
74  int id) override;
75 
76  // Implement methods required by vtkAlgorithm.
77  int FillInputPortInformation(int, vtkInformation*) override;
78 
79 private:
81  void operator=(const vtkImageAppendComponents&) = delete;
82 };
83 
84 VTK_ABI_NAMESPACE_END
85 #endif
int GetNumberOfInputConnections(int port)
Get the number of inputs currently connected to a port.
Store vtkAlgorithm input/output information.
Collects components from two inputs into one output.
vtkDataObject * GetInput()
Get a data object for one of the input port connections.
void SetInputData(vtkDataObject *)
Assign a data object as input.
Proxy object to connect input/output ports.
Generic filter that has one input.
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
void SetInputData(vtkDataObject *input)
Assign a data object as input.
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
If the subclass does not define an Execute method, then the task will be broken up, multiple threads will be spawned, and each thread will call this method.
int FillInputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int GetNumberOfInputs()
Get the number of inputs to this filter.
vtkDataObject * GetInput()
Get one input to this filter.
general representation of visualization data
Definition: vtkDataObject.h:54