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 =========================================================================*/ 00030 #ifndef __vtkImageSource_h 00031 #define __vtkImageSource_h 00032 00033 #include "vtkSource.h" 00034 00035 class vtkImageData; 00036 00037 class VTK_FILTERING_EXPORT vtkImageSource : public vtkSource 00038 { 00039 public: 00040 vtkTypeRevisionMacro(vtkImageSource,vtkSource); 00041 void PrintSelf(ostream& os, vtkIndent indent); 00042 00044 00045 void SetOutput(vtkImageData *output); 00046 vtkImageData *GetOutput(); 00047 vtkImageData *GetOutput(int idx); 00049 00050 protected: 00051 vtkImageSource(); 00052 ~vtkImageSource() {}; 00053 00054 void Execute(); 00055 virtual void Execute(vtkImageData *data); 00056 00057 // a helper method that sets the extent and allocates the output 00058 // passed into it and returns it as an image data 00059 virtual vtkImageData *AllocateOutputData(vtkDataObject *out); 00060 00061 private: 00062 vtkImageSource(const vtkImageSource&); // Not implemented. 00063 void operator=(const vtkImageSource&); // Not implemented. 00064 }; 00065 00066 00067 #endif 00068 00069