VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkAppendFilter.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 =========================================================================*/ 00032 #ifndef vtkAppendFilter_h 00033 #define vtkAppendFilter_h 00034 00035 #include "vtkFiltersCoreModule.h" // For export macro 00036 #include "vtkUnstructuredGridAlgorithm.h" 00037 00038 class vtkDataSetAttributes; 00039 class vtkDataSetCollection; 00040 00041 class VTKFILTERSCORE_EXPORT vtkAppendFilter : public vtkUnstructuredGridAlgorithm 00042 { 00043 public: 00044 static vtkAppendFilter *New(); 00045 00046 vtkTypeMacro(vtkAppendFilter,vtkUnstructuredGridAlgorithm); 00047 void PrintSelf(ostream& os, vtkIndent indent); 00048 00049 //BTX 00051 00052 vtkDataSet *GetInput(int idx); 00053 vtkDataSet *GetInput() 00054 {return this->GetInput( 0 );} 00055 //ETX 00057 00059 00062 vtkGetMacro(MergePoints,int); 00064 00066 00069 vtkSetMacro(MergePoints,int); 00071 00072 vtkBooleanMacro(MergePoints,int); 00073 00075 void RemoveInputData(vtkDataSet *in); 00076 00079 vtkDataSetCollection *GetInputList(); 00080 00082 00085 vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION); 00086 vtkGetMacro(OutputPointsPrecision, int); 00088 00089 protected: 00090 vtkAppendFilter(); 00091 ~vtkAppendFilter(); 00092 00093 // Usual data generation method 00094 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00095 00096 virtual int FillInputPortInformation(int port, vtkInformation *info); 00097 00098 // list of data sets to append together. 00099 // Here as a convenience. It is a copy of the input array. 00100 vtkDataSetCollection *InputList; 00101 00102 //If true we will attempt to merge points. Must also not have 00103 //ghost cells defined. 00104 int MergePoints; 00105 00106 int OutputPointsPrecision; 00107 00108 private: 00109 vtkAppendFilter(const vtkAppendFilter&); // Not implemented. 00110 void operator=(const vtkAppendFilter&); // Not implemented. 00111 00112 // Get all input data sets that have points, cells, or both. 00113 // Caller must delete the returned vtkDataSetCollection. 00114 vtkDataSetCollection* GetNonEmptyInputs(vtkInformationVector ** inputVector); 00115 00116 void AppendArrays(int attributesType, 00117 vtkInformationVector **inputVector, 00118 vtkIdType* globalIds, 00119 vtkUnstructuredGrid* output); 00120 }; 00121 00122 00123 #endif 00124 00125