00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00032 #ifndef __vtkImageToImageFilter_h
00033 #define __vtkImageToImageFilter_h
00034
00035 #include "vtkImageSource.h"
00036
00037 class vtkMultiThreader;
00038
00039 class VTK_FILTERING_EXPORT vtkImageToImageFilter : public vtkImageSource
00040 {
00041 public:
00042 vtkTypeMacro(vtkImageToImageFilter,vtkImageSource);
00043 void PrintSelf(ostream& os, vtkIndent indent);
00044
00046
00047 virtual void SetInput(vtkImageData *input);
00048 vtkImageData *GetInput();
00050
00052
00053 void SetBypass( int ) {};
00054 void BypassOn() {};
00055 void BypassOff() {};
00056 vtkGetMacro(Bypass,int);
00058
00060
00064 virtual void ThreadedExecute(vtkImageData *inData,
00065 vtkImageData *outData,
00066 int extent[6], int threadId);
00068
00070
00071 vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
00072 vtkGetMacro( NumberOfThreads, int );
00074
00075 void SetInputMemoryLimit(int)
00076 {vtkErrorMacro( << "SetInputMemoryLimit is obsolete: Use a vtkImageDataStreamer instead!" );};
00077 long GetInputMemoryLimit()
00078 {vtkErrorMacro( << "GetInputMemoryLimit is obsolete: Use a vtkImageDataStreamer instead!" ); return 0;};
00079
00081
00082 virtual int SplitExtent(int splitExt[6], int startExt[6],
00083 int num, int total);
00085
00086 protected:
00087 vtkImageToImageFilter();
00088 ~vtkImageToImageFilter();
00089
00090 vtkMultiThreader *Threader;
00091 int Bypass;
00092 int BypassWasOn;
00093 int NumberOfThreads;
00094
00095
00096 void ExecuteInformation();
00097
00098 virtual void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00099
00100
00101
00102 void ExecuteData(vtkDataObject *output);
00103
00104
00105 virtual vtkImageData *AllocateOutputData(vtkDataObject *out);
00106
00107
00108 void MultiThread(vtkImageData *input, vtkImageData *output);
00109
00110 void ComputeInputUpdateExtents( vtkDataObject *output );
00111 virtual void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
00112
00113 char *InputScalarsSelection;
00114 vtkSetStringMacro(InputScalarsSelection);
00115
00116 virtual int FillInputPortInformation(int, vtkInformation*);
00117
00118 private:
00119 vtkImageToImageFilter(const vtkImageToImageFilter&);
00120 void operator=(const vtkImageToImageFilter&);
00121 };
00122
00123 #endif
00124
00125
00126
00127
00128
00129
00130