VTK
dox/Filtering/vtkSelectionAlgorithm.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkSelectionAlgorithm.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 =========================================================================*/
00043 #ifndef __vtkSelectionAlgorithm_h
00044 #define __vtkSelectionAlgorithm_h
00045 
00046 #include "vtkAlgorithm.h"
00047 #include "vtkSelection.h" // makes things a bit easier
00048 
00049 class vtkDataSet;
00050 
00051 class VTK_FILTERING_EXPORT vtkSelectionAlgorithm : public vtkAlgorithm
00052 {
00053 public:
00054   static vtkSelectionAlgorithm *New();
00055   vtkTypeMacro(vtkSelectionAlgorithm,vtkAlgorithm);
00056   void PrintSelf(ostream& os, vtkIndent indent);
00057 
00059 
00060   virtual int ProcessRequest(vtkInformation*,
00061                              vtkInformationVector**,
00062                              vtkInformationVector*);
00064 
00066 
00067   vtkSelection* GetOutput() { return this->GetOutput(0); }
00068   vtkSelection* GetOutput(int index);
00070 
00072 
00079   void SetInput(vtkDataObject * obj) { this->SetInput(0, obj); }
00080   void SetInput(int index, vtkDataObject* obj);
00082 
00083 protected:
00084   vtkSelectionAlgorithm();
00085   ~vtkSelectionAlgorithm();
00086 
00087   // convenience method
00088   virtual int RequestInformation(vtkInformation* request,
00089                                  vtkInformationVector** inputVector,
00090                                  vtkInformationVector* outputVector);
00091 
00093 
00095   virtual int RequestData(vtkInformation* request,
00096                           vtkInformationVector** inputVector,
00097                           vtkInformationVector* outputVector);
00099 
00101 
00103   virtual int RequestUpdateExtent(vtkInformation*,
00104                                   vtkInformationVector**,
00105                                   vtkInformationVector*);
00107 
00108   // see algorithm for more info
00109   virtual int FillOutputPortInformation(int port, vtkInformation* info);
00110   virtual int FillInputPortInformation(int port, vtkInformation* info);
00111 
00112 private:
00113   vtkSelectionAlgorithm(const vtkSelectionAlgorithm&);  // Not implemented.
00114   void operator=(const vtkSelectionAlgorithm&);  // Not implemented.
00115 };
00116 
00117 #endif