00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkImageSource.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 =========================================================================*/ 00041 #ifndef __vtkImageSource_h 00042 #define __vtkImageSource_h 00043 00044 #include "vtkSource.h" 00045 00046 class vtkImageData; 00047 00048 class VTK_FILTERING_EXPORT vtkImageSource : public vtkSource 00049 { 00050 public: 00051 vtkTypeRevisionMacro(vtkImageSource,vtkSource); 00052 void PrintSelf(ostream& os, vtkIndent indent); 00053 00055 00056 void SetOutput(vtkImageData *output); 00057 vtkImageData *GetOutput(); 00058 vtkImageData *GetOutput(int idx); 00060 00061 protected: 00062 vtkImageSource(); 00063 ~vtkImageSource() {}; 00064 00065 void Execute(); 00066 virtual void Execute(vtkImageData *data); 00067 00068 // a helper method that sets the extent and allocates the output 00069 // passed into it and returns it as an image data 00070 virtual vtkImageData *AllocateOutputData(vtkDataObject *out); 00071 00072 private: 00073 vtkImageSource(const vtkImageSource&); // Not implemented. 00074 void operator=(const vtkImageSource&); // Not implemented. 00075 }; 00076 00077 00078 #endif 00079 00080