VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkImageAlgorithm.h 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 =========================================================================*/ 00030 #ifndef __vtkImageAlgorithm_h 00031 #define __vtkImageAlgorithm_h 00032 00033 #include "vtkCommonExecutionModelModule.h" // For export macro 00034 #include "vtkAlgorithm.h" 00035 00036 class vtkDataSet; 00037 class vtkImageData; 00038 00039 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageAlgorithm : public vtkAlgorithm 00040 { 00041 public: 00042 vtkTypeMacro(vtkImageAlgorithm,vtkAlgorithm); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 00046 00047 vtkImageData* GetOutput(); 00048 vtkImageData* GetOutput(int); 00049 virtual void SetOutput(vtkDataObject* d); 00051 00053 00056 virtual int ProcessRequest(vtkInformation*, 00057 vtkInformationVector**, 00058 vtkInformationVector*); 00060 00062 00065 void SetInputData(vtkDataObject *); 00066 void SetInputData(int, vtkDataObject*); 00068 00070 00073 vtkDataObject *GetInput(int port); 00074 vtkDataObject *GetInput() { return this->GetInput(0); }; 00075 vtkImageData *GetImageDataInput(int port); 00077 00079 00082 virtual void AddInputData(vtkDataObject *); 00083 virtual void AddInputData(int, vtkDataObject*); 00085 00086 protected: 00087 vtkImageAlgorithm(); 00088 ~vtkImageAlgorithm(); 00089 00091 00093 virtual int RequestInformation(vtkInformation* request, 00094 vtkInformationVector** inputVector, 00095 vtkInformationVector* outputVector); 00097 00098 00100 00103 virtual int RequestUpdateExtent(vtkInformation*, 00104 vtkInformationVector**, 00105 vtkInformationVector*); 00107 00109 00114 virtual void CopyInputArrayAttributesToOutput(vtkInformation* request, 00115 vtkInformationVector** inputVector, 00116 vtkInformationVector* outputVector); 00118 00119 00121 00126 virtual int RequestData(vtkInformation *request, 00127 vtkInformationVector** inputVector, 00128 vtkInformationVector* outputVector); 00130 00132 00134 virtual void ExecuteDataWithInformation(vtkDataObject *output, 00135 vtkInformation* outInfo); 00137 00139 00141 virtual void ExecuteData(vtkDataObject *output); 00142 virtual void Execute(); 00144 00146 00148 virtual void AllocateOutputData(vtkImageData *out, 00149 vtkInformation* outInfo, 00150 int *uExtent); 00151 virtual vtkImageData *AllocateOutputData(vtkDataObject *out, 00152 vtkInformation *outInfo); 00154 00156 00158 virtual void CopyAttributeData(vtkImageData *in, vtkImageData *out, 00159 vtkInformationVector** inputVector); 00161 00163 00166 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00167 virtual int FillInputPortInformation(int port, vtkInformation* info); 00169 00170 private: 00171 vtkImageAlgorithm(const vtkImageAlgorithm&); // Not implemented. 00172 void operator=(const vtkImageAlgorithm&); // Not implemented. 00173 }; 00174 00175 #endif 00176 00177 00178 00179 00180 00181 00182