Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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 =========================================================================*/
00027 #ifndef __vtkImageAlgorithm_h
00028 #define __vtkImageAlgorithm_h
00029 
00030 #include "vtkAlgorithm.h"
00031 
00032 class vtkDataSet;
00033 class vtkImageData;
00034 
00035 class VTK_FILTERING_EXPORT vtkImageAlgorithm : public vtkAlgorithm
00036 {
00037 public:
00038   vtkTypeRevisionMacro(vtkImageAlgorithm,vtkAlgorithm);
00039   void PrintSelf(ostream& os, vtkIndent indent);
00040 
00042 
00043   vtkImageData* GetOutput();
00044   vtkImageData* GetOutput(int);
00045   virtual void SetOutput(vtkDataObject* d);
00047 
00049 
00050   virtual int ProcessRequest(vtkInformation*,
00051                              vtkInformationVector**,
00052                              vtkInformationVector*);
00054 
00056 
00063   void SetInput(vtkDataObject *);
00064   void SetInput(int, vtkDataObject*);
00066 
00067   // this method is not recommended for use, but lots of old style filters
00068   // use it
00069   vtkDataObject *GetInput(int port);
00070   vtkDataObject *GetInput() { return this->GetInput(0); };
00071   vtkImageData  *GetImageDataInput(int port);
00072 
00074 
00078   virtual void AddInput(vtkDataObject *);
00079   virtual void AddInput(int, vtkDataObject*);
00081 
00082 protected:
00083   vtkImageAlgorithm();
00084   ~vtkImageAlgorithm();
00085 
00086   // convenience method
00087   virtual int RequestInformation(vtkInformation* request,
00088                                  vtkInformationVector** inputVector,
00089                                  vtkInformationVector* outputVector);
00090   virtual int RequestUpdateExtent(vtkInformation*,
00091                                   vtkInformationVector**,
00092                                   vtkInformationVector*);
00093 
00094   // convenience method to copy the selected scalars type and num components
00095   // to the output info. Call this from inside your RequestInformation
00096   virtual void CopyInputArrayAttributesToOutput(vtkInformation* request,
00097                                                 vtkInformationVector** inputVector,
00098                                                 vtkInformationVector* outputVector);
00099   
00100   
00102 
00104   virtual int RequestData(vtkInformation *request,
00105                           vtkInformationVector** inputVector,
00106                           vtkInformationVector* outputVector);
00108 
00110 
00111   virtual void ExecuteData(vtkDataObject *output);
00112   virtual void Execute();
00114 
00115   // just allocate the output data
00116   virtual void AllocateOutputData(vtkImageData *out, 
00117                                   int *uExtent);
00118   virtual vtkImageData *AllocateOutputData(vtkDataObject *out);
00119 
00120   // copy the other point and cell data
00121   virtual void CopyAttributeData(vtkImageData *in, vtkImageData *out,
00122                                  vtkInformationVector** inputVector);
00123   
00124   // see algorithm for more info
00125   virtual int FillOutputPortInformation(int port, vtkInformation* info);
00126   virtual int FillInputPortInformation(int port, vtkInformation* info);
00127   
00128 private:
00129   vtkImageAlgorithm(const vtkImageAlgorithm&);  // Not implemented.
00130   void operator=(const vtkImageAlgorithm&);  // Not implemented.
00131 };
00132 
00133 #endif
00134 
00135 
00136 
00137 
00138 
00139 
00140 

Generated on Mon Jan 21 23:07:19 2008 for VTK by  doxygen 1.4.3-20050530