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

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 =========================================================================*/
00027 #ifndef __vtkImageToImageFilter_h
00028 #define __vtkImageToImageFilter_h
00029 
00030 #include "vtkImageSource.h"
00031 
00032 class vtkMultiThreader;
00033 
00034 class VTK_FILTERING_EXPORT vtkImageToImageFilter : public vtkImageSource
00035 {
00036 public:
00037   vtkTypeRevisionMacro(vtkImageToImageFilter,vtkImageSource);
00038   void PrintSelf(ostream& os, vtkIndent indent);
00039 
00041 
00042   virtual void SetInput(vtkImageData *input);
00043   vtkImageData *GetInput();
00045   
00047 
00048   void SetBypass( int ) {};
00049   void BypassOn() {};
00050   void BypassOff() {};
00051   vtkGetMacro(Bypass,int);
00053 
00055 
00059   virtual void ThreadedExecute(vtkImageData *inData, 
00060                                vtkImageData *outData,
00061                                int extent[6], int threadId);
00063   
00065 
00066   vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
00067   vtkGetMacro( NumberOfThreads, int );
00069 
00070   void SetInputMemoryLimit(int) 
00071     {vtkErrorMacro( << "SetInputMemoryLimit is obsolete: Use a vtkImageDataStreamer instead!" );};
00072   long GetInputMemoryLimit()
00073     {vtkErrorMacro( << "GetInputMemoryLimit is obsolete: Use a vtkImageDataStreamer instead!" ); return 0;};
00074 
00076 
00077   virtual int SplitExtent(int splitExt[6], int startExt[6], 
00078                           int num, int total);
00080 
00081 protected:
00082   vtkImageToImageFilter();
00083   ~vtkImageToImageFilter();
00084 
00085   vtkMultiThreader *Threader;
00086   int Bypass;
00087   int BypassWasOn;
00088   int NumberOfThreads;
00089   
00090   // This is called by the superclass.
00091   void ExecuteInformation();
00092   // This is the method you should override.
00093   virtual void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00094 
00095   // This is called by the superclass.
00096   // This is the method you should override.
00097   void ExecuteData(vtkDataObject *output);
00098 
00099   // This also copies other arrays from point and cell data from input to output.
00100   virtual vtkImageData *AllocateOutputData(vtkDataObject *out);
00101   
00102   // The method that starts the multithreading
00103   void MultiThread(vtkImageData *input, vtkImageData *output);
00104 
00105   void ComputeInputUpdateExtents( vtkDataObject *output );
00106   virtual void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
00107 
00108   char *InputScalarsSelection;
00109   vtkSetStringMacro(InputScalarsSelection);
00110 
00111   virtual int FillInputPortInformation(int, vtkInformation*);
00112 
00113 private:
00114   vtkImageToImageFilter(const vtkImageToImageFilter&);  // Not implemented.
00115   void operator=(const vtkImageToImageFilter&);  // Not implemented.
00116 };
00117 
00118 #endif
00119 
00120 
00121 
00122 
00123 
00124 
00125 

Generated on Mon Jan 21 23:07:19 2008 for VTK by  doxygen 1.4.3-20050530