VTK  9.3.0
vtkImageAppend.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
20 #ifndef vtkImageAppend_h
21 #define vtkImageAppend_h
22 
23 #include "vtkFiltersCoreModule.h" // For export macro
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class VTKFILTERSCORE_EXPORT vtkImageAppend : public vtkThreadedImageAlgorithm
28 {
29 public:
30  static vtkImageAppend* New();
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
40  virtual void ReplaceNthInputConnection(int idx, vtkAlgorithmOutput* input);
41 
43 
48  void SetInputData(int idx, vtkDataObject* input);
49  void SetInputData(vtkDataObject* input) { this->SetInputData(0, input); }
51 
53 
59  vtkDataObject* GetInput() { return this->GetInput(0); }
61 
68 
70 
76  vtkSetMacro(AppendAxis, int);
77  vtkGetMacro(AppendAxis, int);
79 
81 
89  vtkSetMacro(PreserveExtents, vtkTypeBool);
90  vtkGetMacro(PreserveExtents, vtkTypeBool);
91  vtkBooleanMacro(PreserveExtents, vtkTypeBool);
93 
94 protected:
96  ~vtkImageAppend() override;
97 
100  // Array holds the AppendAxisExtent shift for each input.
101  int* Shifts;
102 
104 
106 
108  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
109  int id) override;
110 
111  // see vtkAlgorithm for docs.
113 
114  void InitOutput(int outExt[6], vtkImageData* outData);
115 
116  void InternalComputeInputUpdateExtent(int* inExt, int* outExt, int* inWextent, int whichInput);
117 
118  // overridden to allocate all of the output arrays, not just active scalars
119  void AllocateOutputData(vtkImageData* out, vtkInformation* outInfo, int* uExtent) override;
121 
122  // overridden to prevent shallow copies across, since we have to do it elementwise
124  vtkImageData* in, vtkImageData* out, vtkInformationVector** inputVector) override;
125 
126 private:
127  vtkImageAppend(const vtkImageAppend&) = delete;
128  void operator=(const vtkImageAppend&) = delete;
129 };
130 
131 VTK_ABI_NAMESPACE_END
132 #endif
Proxy object to connect input/output ports.
int GetNumberOfInputConnections(int port)
Get the number of inputs currently connected to a port.
general representation of visualization data
Definition: vtkDataObject.h:64
Collects data from multiple inputs into one image.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
void AllocateOutputData(vtkImageData *out, vtkInformation *outInfo, int *uExtent) override
Allocate the output data.
~vtkImageAppend() override
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int ext[6], int id) override
If the subclass does not define an Execute method, then the task will be broken up,...
void InternalComputeInputUpdateExtent(int *inExt, int *outExt, int *inWextent, int whichInput)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataObject * GetInput(int idx)
Get one input to this filter.
int GetNumberOfInputs()
Get the number of inputs to this filter.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
virtual void ReplaceNthInputConnection(int idx, vtkAlgorithmOutput *input)
Replace one of the input connections with a new input.
void SetInputData(int idx, vtkDataObject *input)
Assign a data object as input.
vtkImageData * AllocateOutputData(vtkDataObject *out, vtkInformation *outInfo) override
Allocate the output data.
void CopyAttributeData(vtkImageData *in, vtkImageData *out, vtkInformationVector **inputVector) override
Copy the other point and cell data.
vtkDataObject * GetInput()
Get one input to this filter.
int FillInputPortInformation(int, vtkInformation *) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
static vtkImageAppend * New()
vtkTypeBool PreserveExtents
void InitOutput(int outExt[6], vtkImageData *outData)
void SetInputData(vtkDataObject *input)
Assign a data object as input.
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
int vtkTypeBool
Definition: vtkABI.h:64