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