VTK  9.1.0
vtkTreeMapLayout.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTreeMapLayout.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 -------------------------------------------------------------------------*/
43 #ifndef vtkTreeMapLayout_h
44 #define vtkTreeMapLayout_h
45 
46 #include "vtkInfovisLayoutModule.h" // For export macro
47 #include "vtkTreeAlgorithm.h"
48 
50 
51 class VTKINFOVISLAYOUT_EXPORT vtkTreeMapLayout : public vtkTreeAlgorithm
52 {
53 public:
54  static vtkTreeMapLayout* New();
55 
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
60 
65  vtkGetStringMacro(RectanglesFieldName);
66  vtkSetStringMacro(RectanglesFieldName);
68 
72  virtual void SetSizeArrayName(const char* name)
73  {
75  }
76 
78 
81  vtkGetObjectMacro(LayoutStrategy, vtkTreeMapLayoutStrategy);
84 
88  vtkIdType FindVertex(float pnt[2], float* binfo = nullptr);
89 
94  void GetBoundingBox(vtkIdType id, float* binfo);
95 
99  vtkMTimeType GetMTime() override;
100 
101 protected:
103  ~vtkTreeMapLayout() override;
104 
107 
109 
110 private:
111  vtkTreeMapLayout(const vtkTreeMapLayout&) = delete;
112  void operator=(const vtkTreeMapLayout&) = delete;
113 };
114 
115 #endif
virtual void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, const char *name)
Set the input data arrays that this algorithm will process.
@ FIELD_ASSOCIATION_VERTICES
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only Tree as output.
abstract superclass for all tree map layout strategies
layout a vtkTree into a tree map
~vtkTreeMapLayout() override
void GetBoundingBox(vtkIdType id, float *binfo)
Return the min and max 2D points of the vertex's bounding box.
void SetLayoutStrategy(vtkTreeMapLayoutStrategy *strategy)
The strategy to use when laying out the tree map.
vtkTreeMapLayoutStrategy * LayoutStrategy
vtkIdType FindVertex(float pnt[2], float *binfo=nullptr)
Returns the vertex id that contains pnt (or -1 if no one contains it)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkTreeMapLayout * New()
virtual void SetSizeArrayName(const char *name)
The array to use for the size of each vertex.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkMTimeType GetMTime() override
Get the modification time of the layout algorithm.
@ name
Definition: vtkX3D.h:225
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287