VTK
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
38class VTKFILTERSCORE_EXPORT vtkImageAppend : public vtkThreadedImageAlgorithm
39{
40public:
43 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44
51 virtual void ReplaceNthInputConnection(int idx, vtkAlgorithmOutput* input);
52
54
59 void SetInputData(int num, 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, int);
101 vtkGetMacro(PreserveExtents, int);
102 vtkBooleanMacro(PreserveExtents, int);
104
105protected:
107 ~vtkImageAppend() VTK_OVERRIDE;
108
109 int PreserveExtents;
110 int AppendAxis;
111 // Array holds the AppendAxisExtent shift for each input.
112 int *Shifts;
113
114 int RequestInformation (vtkInformation *,
116 vtkInformationVector *) VTK_OVERRIDE;
117
118 int RequestUpdateExtent(vtkInformation *,
120 vtkInformationVector *) VTK_OVERRIDE;
121
122 void ThreadedRequestData (vtkInformation* request,
123 vtkInformationVector** inputVector,
124 vtkInformationVector* outputVector,
125 vtkImageData ***inData, vtkImageData **outData,
126 int ext[6], int id) VTK_OVERRIDE;
127
128
129 // see vtkAlgorithm for docs.
130 int FillInputPortInformation(int, vtkInformation*) VTK_OVERRIDE;
131
132 void InitOutput(int outExt[6], vtkImageData *outData);
133
134 void InternalComputeInputUpdateExtent(
135 int *inExt, int *outExt, int *inWextent, int whichInput);
136
137 // overridden to allocate all of the output arrays, not just active scalars
138 void AllocateOutputData(vtkImageData *out,
139 vtkInformation* outInfo,
140 int *uExtent) VTK_OVERRIDE;
141 vtkImageData *AllocateOutputData(vtkDataObject *out,
142 vtkInformation* outInfo) VTK_OVERRIDE;
143
144 // overridden to prevent shallow copies across, since we have to do it elementwise
145 void CopyAttributeData(vtkImageData *in, vtkImageData *out,
146 vtkInformationVector** inputVector) VTK_OVERRIDE;
147
148
149private:
150 vtkImageAppend(const vtkImageAppend&) VTK_DELETE_FUNCTION;
151 void operator=(const vtkImageAppend&) VTK_DELETE_FUNCTION;
152};
153
154#endif
155
156
157
158
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:65
Collects data from multiple inputs into one image.
vtkDataObject * GetInput()
~vtkImageAppend() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataObject * GetInput(int num)
Get one input to this filter.
int GetNumberOfInputs()
Get the number of inputs to this filter.
virtual void ReplaceNthInputConnection(int idx, vtkAlgorithmOutput *input)
Replace one of the input connections with a new input.
void SetInputData(int num, vtkDataObject *input)
Assign a data object as input.
static vtkImageAppend * New()
void SetInputData(vtkDataObject *input)
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.