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 =========================================================================*/
31 #ifndef vtkImageAppend_h
32 #define vtkImageAppend_h
33 
34 #include "vtkFiltersCoreModule.h" // For export macro
36 
38 {
39 public:
40  static vtkImageAppend *New();
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
48  virtual void ReplaceNthInputConnection(int idx, vtkAlgorithmOutput* input);
49 
51 
54  void SetInputData(int num, vtkDataObject *input);
55  void SetInputData(vtkDataObject *input) { this->SetInputData(0, input); };
57 
59 
62  vtkDataObject *GetInput(int num);
63  vtkDataObject *GetInput() { return this->GetInput(0); };
65 
69  int GetNumberOfInputs() { return this->GetNumberOfInputConnections(0); };
70 
72 
75  vtkSetMacro(AppendAxis, int);
76  vtkGetMacro(AppendAxis, int);
78 
80 
86  vtkSetMacro(PreserveExtents, int);
87  vtkGetMacro(PreserveExtents, int);
88  vtkBooleanMacro(PreserveExtents, int);
90 
91 protected:
93  ~vtkImageAppend();
94 
97  // Array holds the AppendAxisExtent shift for each input.
98  int *Shifts;
99 
100  virtual int RequestInformation (vtkInformation *,
103 
104  virtual int RequestUpdateExtent(vtkInformation *,
107 
108  void ThreadedRequestData (vtkInformation* request,
109  vtkInformationVector** inputVector,
110  vtkInformationVector* outputVector,
111  vtkImageData ***inData, vtkImageData **outData,
112  int ext[6], int id);
113 
114 
115  // see vtkAlgorithm for docs.
116  virtual int FillInputPortInformation(int, vtkInformation*);
117 
118  void InitOutput(int outExt[6], vtkImageData *outData);
119 
120  void InternalComputeInputUpdateExtent(
121  int *inExt, int *outExt, int *inWextent, int whichInput);
122 
123  // overridden to allocate all of the output arrays, not just active scalars
124  virtual void AllocateOutputData(vtkImageData *out,
125  vtkInformation* outInfo,
126  int *uExtent);
128  vtkInformation* outInfo);
129 
130  // overridden to prevent shallow copies across, since we have to do it elementwise
131  virtual void CopyAttributeData(vtkImageData *in, vtkImageData *out,
132  vtkInformationVector** inputVector);
133 
134 
135 private:
136  vtkImageAppend(const vtkImageAppend&); // Not implemented.
137  void operator=(const vtkImageAppend&); // Not implemented.
138 };
139 
140 #endif
141 
142 
143 
144 
int GetNumberOfInputConnections(int port)
Collects data from multiple inputs into one image.
Store vtkAlgorithm input/output information.
#define VTKFILTERSCORE_EXPORT
vtkDataObject * GetInput()
void SetInputData(vtkDataObject *)
void PrintSelf(ostream &os, vtkIndent indent)
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Proxy object to connect input/output ports.
virtual void AllocateOutputData(vtkImageData *out, vtkInformation *outInfo, int *uExtent)
Generic filter that has one input..
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual int FillInputPortInformation(int port, vtkInformation *info)
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
virtual void CopyAttributeData(vtkImageData *in, vtkImageData *out, vtkInformationVector **inputVector)
int GetNumberOfInputs()
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
vtkDataObject * GetInput()
general representation of visualization data
Definition: vtkDataObject.h:64
void SetInputData(vtkDataObject *input)