VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkAppendSelection.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 =========================================================================*/ 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 vtkTypeMacro(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 00064 //BTX 00066 00067 vtkSelection *GetInput(int idx); 00068 vtkSelection *GetInput() { return this->GetInput( 0 ); }; 00069 //ETX 00071 00074 void SetNumberOfInputs(int num); 00075 00076 // Set Nth input, should only be used when UserManagedInputs is true. 00077 void SetInputByNumber(int num, vtkSelection *input); 00078 00080 00085 vtkSetMacro(AppendByUnion, int); 00086 vtkGetMacro(AppendByUnion, int); 00087 vtkBooleanMacro(AppendByUnion, int); 00089 00090 protected: 00091 vtkAppendSelection(); 00092 ~vtkAppendSelection(); 00093 00094 // Usual data generation method 00095 virtual int RequestData(vtkInformation *, 00096 vtkInformationVector **, vtkInformationVector *); 00097 virtual int FillInputPortInformation(int, vtkInformation *); 00098 00099 private: 00100 // hide the superclass' AddInput() from the user and the compiler 00101 void AddInput(vtkDataObject *) 00102 { vtkErrorMacro( << "AddInput() must be called with a vtkSelection not a vtkDataObject."); }; 00103 00104 int UserManagedInputs; 00105 int AppendByUnion; 00106 private: 00107 vtkAppendSelection(const vtkAppendSelection&); // Not implemented. 00108 void operator=(const vtkAppendSelection&); // Not implemented. 00109 }; 00110 00111 #endif 00112 00113