00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00059 #ifndef __vtkImageToImageFilter_h
00060 #define __vtkImageToImageFilter_h
00061
00062
00063 #include "vtkImageSource.h"
00064 #include "vtkMultiThreader.h"
00065
00066 class VTK_FILTERING_EXPORT vtkImageToImageFilter : public vtkImageSource
00067 {
00068 public:
00069 static vtkImageToImageFilter *New();
00070 vtkTypeMacro(vtkImageToImageFilter,vtkImageSource);
00071 void PrintSelf(ostream& os, vtkIndent indent);
00072
00074
00075 virtual void SetInput(vtkImageData *input);
00076 vtkImageData *GetInput();
00078
00080
00081 void SetBypass( int ) {};
00082 void BypassOn() {};
00083 void BypassOff() {};
00084 vtkGetMacro(Bypass,int);
00086
00088
00092 virtual void ThreadedExecute(vtkImageData *inData,
00093 vtkImageData *outData,
00094 int extent[6], int threadId);
00096
00098
00099 vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
00100 vtkGetMacro( NumberOfThreads, int );
00102
00103 void SetInputMemoryLimit(int)
00104 {vtkErrorMacro( << "SetInputMemoryLimit is obsolete: Use a vtkImageDataStreamer instead!" );};
00105 long GetInputMemoryLimit()
00106 {vtkErrorMacro( << "GetInputMemoryLimit is obsolete: Use a vtkImageDataStreamer instead!" ); return 0;};
00107
00109
00110 virtual int SplitExtent(int splitExt[6], int startExt[6],
00111 int num, int total);
00113
00114 protected:
00115 vtkImageToImageFilter();
00116 ~vtkImageToImageFilter();
00117
00118 vtkMultiThreader *Threader;
00119 int Bypass;
00120 int BypassWasOn;
00121 int NumberOfThreads;
00122
00123
00124 void ExecuteInformation();
00125
00126 virtual void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00127
00128
00129
00130 void ExecuteData(vtkDataObject *output);
00131
00132
00133 void MultiThread(vtkImageData *input, vtkImageData *output);
00134
00135 void ComputeInputUpdateExtents( vtkDataObject *output );
00136 virtual void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
00137 private:
00138 vtkImageToImageFilter(const vtkImageToImageFilter&);
00139 void operator=(const vtkImageToImageFilter&);
00140 };
00141
00142 #endif
00143
00144
00145
00146
00147
00148
00149