VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkTreeDifferenceFilter.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 00031 #ifndef __vtkTreeDifferenceFilter_h 00032 #define __vtkTreeDifferenceFilter_h 00033 00034 #include "vtkInfovisCoreModule.h" // For export macro 00035 #include "vtkGraphAlgorithm.h" 00036 00037 #include "vtkSmartPointer.h" // For ivars 00038 #include <vector> // For ivars 00039 00040 class vtkDoubleArray; 00041 class vtkTree; 00042 00043 class VTKINFOVISCORE_EXPORT vtkTreeDifferenceFilter : public vtkGraphAlgorithm 00044 { 00045 public: 00046 static vtkTreeDifferenceFilter* New(); 00047 vtkTypeMacro(vtkTreeDifferenceFilter,vtkGraphAlgorithm); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00049 00051 00059 vtkSetStringMacro(IdArrayName); 00060 vtkGetStringMacro(IdArrayName); 00062 00064 00066 vtkSetStringMacro(ComparisonArrayName); 00067 vtkGetStringMacro(ComparisonArrayName); 00069 00071 00076 vtkSetStringMacro(OutputArrayName); 00077 vtkGetStringMacro(OutputArrayName); 00079 00081 00084 vtkSetMacro(ComparisonArrayIsVertexData, bool); 00085 vtkGetMacro(ComparisonArrayIsVertexData, bool); 00087 00088 protected: 00089 vtkTreeDifferenceFilter(); 00090 ~vtkTreeDifferenceFilter(); 00091 00092 virtual int RequestData( 00093 vtkInformation*, 00094 vtkInformationVector**, 00095 vtkInformationVector*); 00096 00097 virtual int FillInputPortInformation(int port, vtkInformation *info); 00098 00102 bool GenerateMapping(vtkTree *tree1, vtkTree *tree2); 00103 00105 00107 vtkSmartPointer<vtkDoubleArray> ComputeDifference(vtkTree *tree1, 00108 vtkTree *tree2); 00110 00111 char* IdArrayName; 00112 char* ComparisonArrayName; 00113 char* OutputArrayName; 00114 bool ComparisonArrayIsVertexData; 00115 00116 std::vector< vtkIdType > VertexMap; 00117 std::vector< vtkIdType > EdgeMap; 00118 00119 private: 00120 vtkTreeDifferenceFilter(const vtkTreeDifferenceFilter&); // Not implemented 00121 void operator=(const vtkTreeDifferenceFilter&); // Not implemented 00122 }; 00123 00124 #endif