VTK  9.2.5
vtkImageAppend.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageAppend.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 =========================================================================*/
32 #ifndef vtkImageAppend_h
33 #define vtkImageAppend_h
34 
35 #include "vtkFiltersCoreModule.h" // For export macro
37 
38 class VTKFILTERSCORE_EXPORT vtkImageAppend : public vtkThreadedImageAlgorithm
39 {
40 public:
41  static vtkImageAppend* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
51  virtual void ReplaceNthInputConnection(int idx, vtkAlgorithmOutput* input);
52 
54 
59  void SetInputData(int idx, vtkDataObject* input);
60  void SetInputData(vtkDataObject* input) { this->SetInputData(0, input); }
62 
64 
70  vtkDataObject* GetInput() { return this->GetInput(0); }
72 
79 
81 
87  vtkSetMacro(AppendAxis, int);
88  vtkGetMacro(AppendAxis, int);
90 
92 
100  vtkSetMacro(PreserveExtents, vtkTypeBool);
101  vtkGetMacro(PreserveExtents, vtkTypeBool);
102  vtkBooleanMacro(PreserveExtents, vtkTypeBool);
104 
105 protected:
107  ~vtkImageAppend() override;
108 
111  // Array holds the AppendAxisExtent shift for each input.
112  int* Shifts;
113 
115 
117 
119  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
120  int id) override;
121 
122  // see vtkAlgorithm for docs.
124 
125  void InitOutput(int outExt[6], vtkImageData* outData);
126 
127  void InternalComputeInputUpdateExtent(int* inExt, int* outExt, int* inWextent, int whichInput);
128 
129  // overridden to allocate all of the output arrays, not just active scalars
130  void AllocateOutputData(vtkImageData* out, vtkInformation* outInfo, int* uExtent) override;
132 
133  // overridden to prevent shallow copies across, since we have to do it elementwise
135  vtkImageData* in, vtkImageData* out, vtkInformationVector** inputVector) override;
136 
137 private:
138  vtkImageAppend(const vtkImageAppend&) = delete;
139  void operator=(const vtkImageAppend&) = delete;
140 };
141 
142 #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
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:163
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
int vtkTypeBool
Definition: vtkABI.h:69