VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkCirclePackLayout.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCirclePackLayout.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14  =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19  -------------------------------------------------------------------------*/
47 #ifndef __vtkCirclePackLayout_h
48 #define __vtkCirclePackLayout_h
49 
50 #include "vtkInfovisLayoutModule.h" // For export macro
51 #include "vtkTreeAlgorithm.h"
52 
54 class vtkDoubleArray;
55 class vtkDataArray;
56 class vtkTree;
57 
58 class VTKINFOVISLAYOUT_EXPORT vtkCirclePackLayout : public vtkTreeAlgorithm
59 {
60 public:
61  static vtkCirclePackLayout *New();
62 
63  vtkTypeMacro(vtkCirclePackLayout,vtkTreeAlgorithm);
64  void PrintSelf(ostream& os, vtkIndent indent);
65 
67 
70  vtkGetStringMacro(CirclesFieldName);
71  vtkSetStringMacro(CirclesFieldName);
73 
75 
77  virtual void SetSizeArrayName(const char* name)
78  { this->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_VERTICES, name); }
80 
82 
83  vtkGetObjectMacro(LayoutStrategy, vtkCirclePackLayoutStrategy);
84  void SetLayoutStrategy(vtkCirclePackLayoutStrategy * strategy);
86 
91  vtkIdType FindVertex(double pnt[2], double *cinfo=0);
92 
95  void GetBoundingCircle(vtkIdType id, double *cinfo);
96 
98  virtual unsigned long GetMTime();
99 
100 protected:
103 
106 
107  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
108 
109 private:
110 
111  vtkCirclePackLayout(const vtkCirclePackLayout&); // Not implemented.
112  void operator=(const vtkCirclePackLayout&); // Not implemented.
113  void prepareSizeArray(vtkDoubleArray* mySizeArray,
114  vtkTree* tree);
115 };
116 
117 #endif
vtkCirclePackLayoutStrategy * LayoutStrategy
virtual void SetSizeArrayName(const char *name)
abstract superclass for all circle packing layout strategies.
layout a vtkTree as a circle packing.