VTK: Infovis/Layout/vtkTreeMapLayout.h Source File

| VTK 9.3.1

vtkTreeMapLayout.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
30 #ifndef vtkTreeMapLayout_h
31 #define vtkTreeMapLayout_h
32
33 #include "vtkInfovisLayoutModule.h" // For export macro
34 #include "vtkTreeAlgorithm.h"
35
36 VTK_ABI_NAMESPACE_BEGIN
37 class vtkTreeMapLayoutStrategy;
38
39 class VTKINFOVISLAYOUT_EXPORT vtkTreeMapLayout : public vtkTreeAlgorithm
40 {
41 public:
42 static vtkTreeMapLayout* New();
43
44 vtkTypeMacro(vtkTreeMapLayout, vtkTreeAlgorithm);
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
48
53 vtkGetStringMacro(RectanglesFieldName);
54 vtkSetStringMacro(RectanglesFieldName);
56
60 virtual void SetSizeArrayName(const char* name)
61 {
62 this->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_VERTICES, name);
63 }
64
66
69 vtkGetObjectMacro(LayoutStrategy, vtkTreeMapLayoutStrategy);
70 void SetLayoutStrategy(vtkTreeMapLayoutStrategy* strategy);
72
76 vtkIdType FindVertex(float pnt[2], float* binfo = nullptr);
77
82 void GetBoundingBox(vtkIdType id, float* binfo);
83
87 vtkMTimeType GetMTime() override;
88
89 protected:
90 vtkTreeMapLayout();
91 ~vtkTreeMapLayout() override;
92
93 char* RectanglesFieldName;
94 vtkTreeMapLayoutStrategy* LayoutStrategy;
95
96 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
97
98 private:
99 vtkTreeMapLayout(const vtkTreeMapLayout&) = delete;
100 void operator=(const vtkTreeMapLayout&) = delete;
101 };
102
103 VTK_ABI_NAMESPACE_END
104 #endif
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.
vtkDataObject::FIELD_ASSOCIATION_VERTICES
@ FIELD_ASSOCIATION_VERTICES
Definition: vtkDataObject.h:266
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkTreeAlgorithm
Superclass for algorithms that produce only Tree as output.
Definition: vtkTreeAlgorithm.h:34
vtkTreeMapLayoutStrategy
abstract superclass for all tree map layout strategies
Definition: vtkTreeMapLayoutStrategy.h:36
vtkTreeMapLayout
layout a vtkTree into a tree map
Definition: vtkTreeMapLayout.h:40
vtkTreeMapLayout::~vtkTreeMapLayout
~vtkTreeMapLayout() override
vtkTreeMapLayout::vtkTreeMapLayout
vtkTreeMapLayout()
vtkTreeMapLayout::RectanglesFieldName
char * RectanglesFieldName
Definition: vtkTreeMapLayout.h:93
vtkTreeMapLayout::GetBoundingBox
void GetBoundingBox(vtkIdType id, float *binfo)
Return the min and max 2D points of the vertex's bounding box.
vtkTreeMapLayout::SetLayoutStrategy
void SetLayoutStrategy(vtkTreeMapLayoutStrategy *strategy)
The strategy to use when laying out the tree map.
vtkTreeMapLayout::LayoutStrategy
vtkTreeMapLayoutStrategy * LayoutStrategy
Definition: vtkTreeMapLayout.h:94
vtkTreeMapLayout::FindVertex
vtkIdType FindVertex(float pnt[2], float *binfo=nullptr)
Returns the vertex id that contains pnt (or -1 if no one contains it)
vtkTreeMapLayout::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTreeMapLayout::New
static vtkTreeMapLayout * New()
vtkTreeMapLayout::SetSizeArrayName
virtual void SetSizeArrayName(const char *name)
The array to use for the size of each vertex.
Definition: vtkTreeMapLayout.h:60
vtkTreeMapLayout::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkTreeMapLayout::GetMTime
vtkMTimeType GetMTime() override
Get the modification time of the layout algorithm.
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkTreeAlgorithm.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270