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

vtkImageAlgorithm.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageAlgorithm.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 =========================================================================*/
00040 #ifndef __vtkImageAlgorithm_h
00041 #define __vtkImageAlgorithm_h
00042 
00043 #include "vtkAlgorithm.h"
00044 
00045 class vtkImageData;
00046 
00047 class VTK_FILTERING_EXPORT vtkImageAlgorithm : public vtkAlgorithm
00048 {
00049 public:
00050   vtkTypeRevisionMacro(vtkImageAlgorithm,vtkAlgorithm);
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00054 
00055   vtkImageData* GetOutput();
00056   vtkImageData* GetOutput(int);
00058 
00060 
00061   virtual int ProcessRequest(vtkInformation*,
00062                              vtkInformationVector*,
00063                              vtkInformationVector*);
00065 
00067 
00068   void SetInput(vtkDataObject *);
00069   void SetInput(int, vtkDataObject*);
00071 
00073 
00074   void AddInput(vtkDataObject *);
00075   void AddInput(int, vtkDataObject*);
00077 
00078 protected:
00079   vtkImageAlgorithm();
00080   ~vtkImageAlgorithm();
00081 
00082   // convinience method
00083   virtual void ExecuteInformation(vtkInformation *request, 
00084                                   vtkInformationVector *inputVector, 
00085                                   vtkInformationVector *outputVector);
00086   virtual void RequestUpdateExtent(vtkInformation *,
00087                                    vtkInformationVector *,
00088                                    vtkInformationVector *);
00089 
00090   // This is called by the superclass.
00091   // This is the method you should override.
00092   virtual void RequestData(vtkInformation *request, 
00093                            vtkInformationVector *inputVector, 
00094                            vtkInformationVector *outputVector);
00095 
00097 
00098   virtual void ExecuteData(vtkDataObject *output);
00099   virtual void Execute();
00101 
00102   // just allocate the output data
00103   virtual void AllocateOutputData(vtkImageData *out, 
00104                                   int *uExtent);
00105   virtual vtkImageData *AllocateOutputData(vtkDataObject *out);
00106 
00107   // copy the other point and cell data
00108   virtual void CopyAttributeData(vtkImageData *in, vtkImageData *out);
00109   
00110   // see algorithm for more info
00111   virtual int FillOutputPortInformation(int port, vtkInformation* info);
00112   virtual int FillInputPortInformation(int port, vtkInformation* info);
00113   
00114   char *InputScalarsSelection;
00115   vtkSetStringMacro(InputScalarsSelection);
00116 
00117 private:
00118   vtkImageAlgorithm(const vtkImageAlgorithm&);  // Not implemented.
00119   void operator=(const vtkImageAlgorithm&);  // Not implemented.
00120 };
00121 
00122 #endif
00123 
00124 
00125 
00126 
00127 
00128 
00129