vtkImageMultipleInputFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00036 #ifndef __vtkImageMultipleInputFilter_h
00037 #define __vtkImageMultipleInputFilter_h
00038
00039 #include "vtkImageSource.h"
00040
00041 class vtkMultiThreader;
00042
00043 class VTK_FILTERING_EXPORT vtkImageMultipleInputFilter : public vtkImageSource
00044 {
00045 public:
00046 vtkTypeRevisionMacro(vtkImageMultipleInputFilter,vtkImageSource);
00047 void PrintSelf(ostream& os, vtkIndent indent);
00048
00050 virtual void SetInput(int num, vtkImageData *input);
00051
00053
00055 virtual void AddInput(vtkImageData *input);
00056 virtual void RemoveInput(vtkImageData *input);
00058
00060
00061 vtkImageData *GetInput(int num);
00062 vtkImageData *GetInput();
00064
00066
00069 vtkSetMacro(Bypass,int);
00070 vtkGetMacro(Bypass,int);
00071 vtkBooleanMacro(Bypass,int);
00073
00075
00076 vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
00077 vtkGetMacro( NumberOfThreads, int );
00079
00081
00082 virtual int SplitExtent(int splitExt[6], int startExt[6],
00083 int num, int total);
00085
00087
00090 virtual void ThreadedExecute(vtkImageData **inDatas,
00091 vtkImageData *outData,
00092 int extent[6], int threadId);
00094
00095
00096
00097 protected:
00098 vtkImageMultipleInputFilter();
00099 ~vtkImageMultipleInputFilter();
00100
00101 vtkMultiThreader *Threader;
00102 int Bypass;
00103 int NumberOfThreads;
00104
00105 void ComputeInputUpdateExtents( vtkDataObject *output );
00106
00107 virtual void ComputeInputUpdateExtent( int inExt[6],
00108 int outExt[6],
00109 int whichInput );
00110
00111
00112 void ExecuteData(vtkDataObject *output);
00113 void MultiThread(vtkImageData **indatas, vtkImageData *outdata);
00114
00115
00116 void ExecuteInformation();
00117
00118 virtual void ExecuteInformation(vtkImageData **, vtkImageData *) {};
00119
00120 virtual int FillInputPortInformation(int, vtkInformation*);
00121
00122 private:
00123
00124 void AddInput(vtkDataObject *)
00125 { vtkErrorMacro( << "AddInput() must be called with a vtkImageData not a vtkDataObject."); };
00126 void RemoveInput(vtkDataObject *)
00127 { vtkErrorMacro( << "RemoveInput() must be called with a vtkImageData not a vtkDataObject."); };
00128 private:
00129 vtkImageMultipleInputFilter(const vtkImageMultipleInputFilter&);
00130 void operator=(const vtkImageMultipleInputFilter&);
00131 };
00132
00133 #endif
00134
00135
00136
00137
00138
00139
00140