Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Filtering/vtkImageToImageFilter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkImageToImageFilter.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00030 #ifndef __vtkImageToImageFilter_h 00031 #define __vtkImageToImageFilter_h 00032 00033 #include "vtkImageSource.h" 00034 00035 class vtkMultiThreader; 00036 00037 class VTK_FILTERING_EXPORT vtkImageToImageFilter : public vtkImageSource 00038 { 00039 public: 00040 vtkTypeRevisionMacro(vtkImageToImageFilter,vtkImageSource); 00041 void PrintSelf(ostream& os, vtkIndent indent); 00042 00044 00045 virtual void SetInput(vtkImageData *input); 00046 vtkImageData *GetInput(); 00048 00050 00051 void SetBypass( int ) {}; 00052 void BypassOn() {}; 00053 void BypassOff() {}; 00054 vtkGetMacro(Bypass,int); 00056 00058 00062 virtual void ThreadedExecute(vtkImageData *inData, 00063 vtkImageData *outData, 00064 int extent[6], int threadId); 00066 00068 00069 vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS ); 00070 vtkGetMacro( NumberOfThreads, int ); 00072 00073 void SetInputMemoryLimit(int) 00074 {vtkErrorMacro( << "SetInputMemoryLimit is obsolete: Use a vtkImageDataStreamer instead!" );}; 00075 long GetInputMemoryLimit() 00076 {vtkErrorMacro( << "GetInputMemoryLimit is obsolete: Use a vtkImageDataStreamer instead!" ); return 0;}; 00077 00079 00080 virtual int SplitExtent(int splitExt[6], int startExt[6], 00081 int num, int total); 00083 00084 protected: 00085 vtkImageToImageFilter(); 00086 ~vtkImageToImageFilter(); 00087 00088 vtkMultiThreader *Threader; 00089 int Bypass; 00090 int BypassWasOn; 00091 int NumberOfThreads; 00092 00093 // This is called by the superclass. 00094 void ExecuteInformation(); 00095 // This is the method you should override. 00096 virtual void ExecuteInformation(vtkImageData *inData, vtkImageData *outData); 00097 00098 // This is called by the superclass. 00099 // This is the method you should override. 00100 void ExecuteData(vtkDataObject *output); 00101 00102 // This also copies other arrays from point and cell data from input to output. 00103 virtual vtkImageData *AllocateOutputData(vtkDataObject *out); 00104 00105 // The method that starts the multithreading 00106 void MultiThread(vtkImageData *input, vtkImageData *output); 00107 00108 void ComputeInputUpdateExtents( vtkDataObject *output ); 00109 virtual void ComputeInputUpdateExtent(int inExt[6], int outExt[6]); 00110 00111 char *InputScalarsSelection; 00112 vtkSetStringMacro(InputScalarsSelection); 00113 00114 private: 00115 vtkImageToImageFilter(const vtkImageToImageFilter&); // Not implemented. 00116 void operator=(const vtkImageToImageFilter&); // Not implemented. 00117 }; 00118 00119 #endif 00120 00121 00122 00123 00124 00125 00126