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