VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkImageIterateFilter.h 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 =========================================================================*/ 00026 #ifndef __vtkImageIterateFilter_h 00027 #define __vtkImageIterateFilter_h 00028 00029 #include "vtkThreadedImageAlgorithm.h" 00030 00031 class VTK_IMAGING_EXPORT vtkImageIterateFilter : public vtkThreadedImageAlgorithm 00032 { 00033 public: 00034 vtkTypeMacro(vtkImageIterateFilter,vtkThreadedImageAlgorithm); 00035 void PrintSelf(ostream& os, vtkIndent indent); 00036 00038 00040 vtkGetMacro(Iteration,int); 00041 vtkGetMacro(NumberOfIterations,int); 00043 00044 protected: 00045 vtkImageIterateFilter(); 00046 ~vtkImageIterateFilter(); 00047 00048 // Implement standard requests by calling iterative versions the 00049 // specified number of times. 00050 virtual int RequestUpdateExtent(vtkInformation*, 00051 vtkInformationVector**, 00052 vtkInformationVector*); 00053 virtual int RequestInformation (vtkInformation*, 00054 vtkInformationVector**, 00055 vtkInformationVector*); 00056 virtual int RequestData(vtkInformation* request, 00057 vtkInformationVector** inputVector, 00058 vtkInformationVector* outputVector); 00059 00060 // Iterative versions of standard requests. These are given the 00061 // pipeline information object for the in/out pair at each 00062 // iteration. 00063 virtual int IterativeRequestInformation(vtkInformation* in, 00064 vtkInformation* out); 00065 virtual int IterativeRequestUpdateExtent(vtkInformation* in, 00066 vtkInformation* out); 00067 virtual int IterativeRequestData(vtkInformation*, 00068 vtkInformationVector**, 00069 vtkInformationVector*); 00070 00071 virtual void SetNumberOfIterations(int num); 00072 00073 // for filters that execute multiple times. 00074 int NumberOfIterations; 00075 int Iteration; 00076 // A list of intermediate caches that is created when 00077 // is called SetNumberOfIterations() 00078 vtkImageData **IterationData; 00079 00080 // returns correct vtkImageDatas based on current iteration. 00081 vtkImageData *GetIterationInput(); 00082 vtkImageData *GetIterationOutput(); 00083 00084 vtkInformationVector* InputVector; 00085 vtkInformationVector* OutputVector; 00086 private: 00087 vtkImageIterateFilter(const vtkImageIterateFilter&); // Not implemented. 00088 void operator=(const vtkImageIterateFilter&); // Not implemented. 00089 }; 00090 00091 #endif 00092 00093 00094 00095 00096 00097 00098