VTK
vtkImageMultipleInputFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageMultipleInputFilter.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 =========================================================================*/
25 #ifndef __vtkImageMultipleInputFilter_h
26 #define __vtkImageMultipleInputFilter_h
27 
28 #include "vtkImageSource.h"
29 
30 class vtkMultiThreader;
31 
33 {
34 public:
35  vtkTypeMacro(vtkImageMultipleInputFilter,vtkImageSource);
36  void PrintSelf(ostream& os, vtkIndent indent);
37 
39  virtual void SetInput(int num, vtkImageData *input);
40 
42 
44  virtual void AddInput(vtkImageData *input);
45  virtual void RemoveInput(vtkImageData *input);
47 
49 
50  vtkImageData *GetInput(int num);
51  vtkImageData *GetInput();
53 
55 
58  vtkSetMacro(Bypass,int);
59  vtkGetMacro(Bypass,int);
60  vtkBooleanMacro(Bypass,int);
62 
64 
65  vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
66  vtkGetMacro( NumberOfThreads, int );
68 
70 
71  virtual int SplitExtent(int splitExt[6], int startExt[6],
72  int num, int total);
74 
76 
79  virtual void ThreadedExecute(vtkImageData **inDatas,
80  vtkImageData *outData,
81  int extent[6], int threadId);
83 
84 
85 
86 protected:
89 
91  int Bypass;
93 
94  void ComputeInputUpdateExtents( vtkDataObject *output );
95 
96  virtual void ComputeInputUpdateExtent( int inExt[6],
97  int outExt[6],
98  int whichInput );
99 
100 
101  void ExecuteData(vtkDataObject *output);
102  void MultiThread(vtkImageData **indatas, vtkImageData *outdata);
103 
104  // This one gets called by the superclass.
105  void ExecuteInformation();
106  // This is the one you should override.
108 
109  virtual int FillInputPortInformation(int, vtkInformation*);
110 
111 private:
112  // hide the superclass' AddInput() from the user and the compiler
113  void AddInput(vtkDataObject *)
114  { vtkErrorMacro( << "AddInput() must be called with a vtkImageData not a vtkDataObject."); };
115  void RemoveInput(vtkDataObject *)
116  { vtkErrorMacro( << "RemoveInput() must be called with a vtkImageData not a vtkDataObject."); };
117 private:
118  vtkImageMultipleInputFilter(const vtkImageMultipleInputFilter&); // Not implemented.
119  void operator=(const vtkImageMultipleInputFilter&); // Not implemented.
120 };
121 
122 #endif
123 
124 
125 
126 
127 
128 
129 
Store vtkAlgorithm input/output information.
#define VTK_FILTERING_EXPORT
A class for performing multithreaded execution.
Generic filter that has N inputs.
a simple class to control print indentation
Definition: vtkIndent.h:37
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
helper class to get VTK data object types as string and instantiate them
virtual void ExecuteInformation(vtkImageData **, vtkImageData *)