VTK  9.0.1
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  -------------------------------------------------------------------------*/
45 #ifndef vtkCirclePackLayout_h
46 #define vtkCirclePackLayout_h
47 
48 #include "vtkInfovisLayoutModule.h" // For export macro
49 #include "vtkTreeAlgorithm.h"
50 
52 class vtkDoubleArray;
53 class vtkDataArray;
54 class vtkTree;
55 
56 class VTKINFOVISLAYOUT_EXPORT vtkCirclePackLayout : public vtkTreeAlgorithm
57 {
58 public:
59  static vtkCirclePackLayout* New();
60 
62  void PrintSelf(ostream& os, vtkIndent indent) override;
63 
65 
71  vtkGetStringMacro(CirclesFieldName);
72  vtkSetStringMacro(CirclesFieldName);
74 
79  virtual void SetSizeArrayName(const char* name)
80  {
82  }
83 
85 
88  vtkGetObjectMacro(LayoutStrategy, vtkCirclePackLayoutStrategy);
89  void SetLayoutStrategy(vtkCirclePackLayoutStrategy* strategy);
91 
98  vtkIdType FindVertex(double pnt[2], double* cinfo = nullptr);
99 
104  void GetBoundingCircle(vtkIdType id, double* cinfo);
105 
109  vtkMTimeType GetMTime() override;
110 
111 protected:
113  ~vtkCirclePackLayout() override;
114 
117 
119 
120 private:
121  vtkCirclePackLayout(const vtkCirclePackLayout&) = delete;
122  void operator=(const vtkCirclePackLayout&) = delete;
123  void prepareSizeArray(vtkDoubleArray* mySizeArray, vtkTree* tree);
124 };
125 
126 #endif
vtkCirclePackLayout::SetSizeArrayName
virtual void SetSizeArrayName(const char *name)
The array to use for the size of each vertex.
Definition: vtkCirclePackLayout.h:79
vtkCirclePackLayout::LayoutStrategy
vtkCirclePackLayoutStrategy * LayoutStrategy
Definition: vtkCirclePackLayout.h:116
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkCirclePackLayout
layout a vtkTree as a circle packing.
Definition: vtkCirclePackLayout.h:56
vtkTreeAlgorithm.h
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
vtkCirclePackLayoutStrategy
abstract superclass for all circle packing layout strategies.
Definition: vtkCirclePackLayoutStrategy.h:48
vtkDataObject::FIELD_ASSOCIATION_VERTICES
@ FIELD_ASSOCIATION_VERTICES
Definition: vtkDataObject.h:253
vtkTree
A rooted tree data structure.
Definition: vtkTree.h:54
vtkCirclePackLayout::CirclesFieldName
char * CirclesFieldName
Definition: vtkCirclePackLayout.h:115
vtkTreeAlgorithm::New
static vtkTreeAlgorithm * New()
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkTreeAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTreeAlgorithm
Superclass for algorithms that produce only Tree as output.
Definition: vtkTreeAlgorithm.h:45
vtkX3D::name
@ name
Definition: vtkX3D.h:225
vtkTreeAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:35
vtkAlgorithm::SetInputArrayToProcess
virtual void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, const char *name)
Set the input data arrays that this algorithm will process.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293