VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkAppendSelection.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 =========================================================================*/ 00015 /*---------------------------------------------------------------------------- 00016 Copyright (c) Sandia Corporation 00017 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. 00018 ----------------------------------------------------------------------------*/ 00031 #ifndef __vtkAppendSelection_h 00032 #define __vtkAppendSelection_h 00033 00034 #include "vtkSelectionAlgorithm.h" 00035 00036 class vtkSelection; 00037 00038 class VTK_GRAPHICS_EXPORT vtkAppendSelection : public vtkSelectionAlgorithm 00039 { 00040 public: 00041 static vtkAppendSelection *New(); 00042 00043 vtkTypeRevisionMacro(vtkAppendSelection,vtkSelectionAlgorithm); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 00051 vtkSetMacro(UserManagedInputs,int); 00052 vtkGetMacro(UserManagedInputs,int); 00053 vtkBooleanMacro(UserManagedInputs,int); 00055 00058 void AddInput(vtkSelection *); 00059 00062 void RemoveInput(vtkSelection *); 00063 00065 00066 vtkSelection *GetInput(int idx); 00067 vtkSelection *GetInput() { return this->GetInput( 0 ); }; 00069 //ETX 00070 00073 void SetNumberOfInputs(int num); 00074 00075 // Set Nth input, should only be used when UserManagedInputs is true. 00076 void SetInputByNumber(int num, vtkSelection *input); 00077 00079 00084 vtkSetMacro(AppendByUnion, int); 00085 vtkGetMacro(AppendByUnion, int); 00086 vtkBooleanMacro(AppendByUnion, int); 00088 00089 protected: 00090 vtkAppendSelection(); 00091 ~vtkAppendSelection(); 00092 00093 // Usual data generation method 00094 virtual int RequestData(vtkInformation *, 00095 vtkInformationVector **, vtkInformationVector *); 00096 virtual int FillInputPortInformation(int, vtkInformation *); 00097 00098 private: 00099 // hide the superclass' AddInput() from the user and the compiler 00100 void AddInput(vtkDataObject *) 00101 { vtkErrorMacro( << "AddInput() must be called with a vtkSelection not a vtkDataObject."); }; 00102 00103 int UserManagedInputs; 00104 int AppendByUnion; 00105 private: 00106 vtkAppendSelection(const vtkAppendSelection&); // Not implemented. 00107 void operator=(const vtkAppendSelection&); // Not implemented. 00108 }; 00109 00110 #endif 00111 00112