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 =========================================================================*/
29 #ifndef vtkImageAppend_h
30 #define vtkImageAppend_h
31 
32 #include "vtkFiltersCoreModule.h" // For export macro
34 
35 class VTKFILTERSCORE_EXPORT vtkImageAppend : public vtkThreadedImageAlgorithm
36 {
37 public:
38  static vtkImageAppend *New();
40  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
41 
48  virtual void ReplaceNthInputConnection(int idx, vtkAlgorithmOutput* input);
49 
51 
56  void SetInputData(int num, vtkDataObject *input);
57  void SetInputData(vtkDataObject *input) { this->SetInputData(0, input); };
59 
61 
66  vtkDataObject *GetInput(int num);
67  vtkDataObject *GetInput() { return this->GetInput(0); };
69 
75  int GetNumberOfInputs() { return this->GetNumberOfInputConnections(0); };
76 
78 
84  vtkSetMacro(AppendAxis, int);
85  vtkGetMacro(AppendAxis, int);
87 
89 
97  vtkSetMacro(PreserveExtents, int);
98  vtkGetMacro(PreserveExtents, int);
99  vtkBooleanMacro(PreserveExtents, int);
101 
102 protected:
103  vtkImageAppend();
104  ~vtkImageAppend() VTK_OVERRIDE;
105 
106  int PreserveExtents;
107  int AppendAxis;
108  // Array holds the AppendAxisExtent shift for each input.
109  int *Shifts;
110 
111  int RequestInformation (vtkInformation *,
113  vtkInformationVector *) VTK_OVERRIDE;
114 
115  int RequestUpdateExtent(vtkInformation *,
117  vtkInformationVector *) VTK_OVERRIDE;
118 
119  void ThreadedRequestData (vtkInformation* request,
120  vtkInformationVector** inputVector,
121  vtkInformationVector* outputVector,
122  vtkImageData ***inData, vtkImageData **outData,
123  int ext[6], int id) VTK_OVERRIDE;
124 
125 
126  // see vtkAlgorithm for docs.
127  int FillInputPortInformation(int, vtkInformation*) VTK_OVERRIDE;
128 
129  void InitOutput(int outExt[6], vtkImageData *outData);
130 
131  void InternalComputeInputUpdateExtent(
132  int *inExt, int *outExt, int *inWextent, int whichInput);
133 
134  // overridden to allocate all of the output arrays, not just active scalars
135  void AllocateOutputData(vtkImageData *out,
136  vtkInformation* outInfo,
137  int *uExtent) VTK_OVERRIDE;
138  vtkImageData *AllocateOutputData(vtkDataObject *out,
139  vtkInformation* outInfo) VTK_OVERRIDE;
140 
141  // overridden to prevent shallow copies across, since we have to do it elementwise
142  void CopyAttributeData(vtkImageData *in, vtkImageData *out,
143  vtkInformationVector** inputVector) VTK_OVERRIDE;
144 
145 
146 private:
147  vtkImageAppend(const vtkImageAppend&) VTK_DELETE_FUNCTION;
148  void operator=(const vtkImageAppend&) VTK_DELETE_FUNCTION;
149 };
150 
151 #endif
152 
153 
154 
155 
int GetNumberOfInputConnections(int port)
Get the number of inputs currently connected to a port.
Collects data from multiple inputs into one image.
Store vtkAlgorithm input/output information.
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:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
int GetNumberOfInputs()
Get the number of inputs to this filter.
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.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkDataObject * GetInput()
Get one input to this filter.
general representation of visualization data
Definition: vtkDataObject.h:58
void SetInputData(vtkDataObject *input)
Assign a data object as input.