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

vtkImageIterateFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageIterateFilter.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 =========================================================================*/
00037 #ifndef __vtkImageIterateFilter_h
00038 #define __vtkImageIterateFilter_h
00039 
00040 
00041 #include "vtkImageToImageFilter.h"
00042 
00043 class VTK_IMAGING_EXPORT vtkImageIterateFilter : public vtkImageToImageFilter
00044 {
00045 public:
00046   vtkTypeRevisionMacro(vtkImageIterateFilter,vtkImageToImageFilter);
00047   void PrintSelf(ostream& os, vtkIndent indent);
00048 
00050 
00052   vtkGetMacro(Iteration,int);
00053   vtkGetMacro(NumberOfIterations,int);  
00055 
00056   void ComputeInputUpdateExtents( vtkDataObject *output );
00057   //BTX
00058   void ComputeInputUpdateExtent( int [6], int [6] )
00059     { vtkErrorMacro( << "ComputeInputUpdateExtent should be implemented in subclass" );};
00060   //ETX
00061 
00062 protected:
00063   vtkImageIterateFilter();
00064   ~vtkImageIterateFilter();
00065 
00066   // Superclass API. Sets defaults, then calls 
00067   // ExecuteInformation(vtkImageData *inData, vtkImageData *outData)
00068   // for each iteration
00069   void ExecuteInformation();
00070   // Called for each iteration (differs from superclass in arguments).
00071   // You should override this method if needed.
00072   virtual void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00073   
00074   // Superclass API: Calls Execute(vtkImageData *inData, vtkImageData *outData)
00075   // for each iteration.
00076   void ExecuteData(vtkDataObject *output);
00077   virtual void IterativeExecuteData(vtkImageData *in, vtkImageData *out) = 0;
00078   
00079   // Replaces "EnlargeOutputUpdateExtent"
00080   virtual void AllocateOutputScalars(vtkImageData *outData);
00081   
00082   // Allows subclass to specify the number of iterations  
00083   virtual void SetNumberOfIterations(int num);
00084   
00085   // for filters that execute multiple times.
00086   int NumberOfIterations;
00087   int Iteration;
00088   // A list of intermediate caches that is created when 
00089   // is called SetNumberOfIterations()
00090   vtkImageData **IterationData;
00091   
00092   // returns correct vtkImageDatas based on current iteration.
00093   vtkImageData *GetIterationInput();
00094   vtkImageData *GetIterationOutput();
00095 private:
00096   vtkImageIterateFilter(const vtkImageIterateFilter&);  // Not implemented.
00097   void operator=(const vtkImageIterateFilter&);  // Not implemented.
00098 };
00099 
00100 #endif
00101 
00102 
00103 
00104 
00105 
00106 
00107