00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkTreeMapToPolyData.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 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00032 #ifndef __vtkTreeMapToPolyData_h 00033 #define __vtkTreeMapToPolyData_h 00034 00035 #include "vtkPolyDataAlgorithm.h" 00036 00037 class VTK_INFOVIS_EXPORT vtkTreeMapToPolyData : public vtkPolyDataAlgorithm 00038 { 00039 public: 00040 static vtkTreeMapToPolyData *New(); 00041 00042 vtkTypeRevisionMacro(vtkTreeMapToPolyData,vtkPolyDataAlgorithm); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 00045 // The field containing quadruples of the form (min x, max x, min y, max y) 00046 // representing the bounds of the rectangles for each vertex. 00047 // This field may be added to the tree using vtkTreeMapLayout. 00048 // This array must be set. 00049 // TODO: This should be removed, and instead use ArrayToProcess from vtkAlgorithm. 00050 vtkGetStringMacro(RectanglesFieldName); 00051 vtkSetStringMacro(RectanglesFieldName); 00052 00053 // The field containing the levels of each vertex in the tree 00054 // This array may be added to the tree using vtkTreeLevelsFilter. 00055 // The z-coordinate for vertex i is computed by 0.001 * level[i]. 00056 // If this array is not set, the GetLevel() method of vtkTree is used 00057 // to determine the level. 00058 // TODO: This should be removed, and instead use ArrayToProcess from vtkAlgorithm. 00059 // TODO: Since we have access to the tree structure, this requirement could be 00060 // removed altogether. 00061 vtkGetStringMacro(LevelsFieldName); 00062 vtkSetStringMacro(LevelsFieldName); 00063 00065 00066 vtkGetMacro(LevelDeltaZ, double); 00067 vtkSetMacro(LevelDeltaZ, double); 00069 00070 int FillInputPortInformation(int port, vtkInformation* info); 00071 00072 protected: 00073 vtkTreeMapToPolyData(); 00074 ~vtkTreeMapToPolyData(); 00075 00076 char * LevelsFieldName; 00077 char * RectanglesFieldName; 00078 double LevelDeltaZ; 00079 00080 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00081 private: 00082 vtkTreeMapToPolyData(const vtkTreeMapToPolyData&); // Not implemented. 00083 void operator=(const vtkTreeMapToPolyData&); // Not implemented. 00084 }; 00085 00086 #endif