1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
/*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkTreeMapToPolyData.h,v $
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/*----------------------------------------------------------------------------
Copyright (c) Sandia Corporation
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
----------------------------------------------------------------------------*/
// .NAME vtkTreeMapToPolyData - converts a tree to a polygonal data representing a tree map
//
// .SECTION Description
// This algorithm requires that the vtkTreeMapLayout filter has already applied to the
// data in order to create the quadruple array (min x, max x, min y, max y) of
// bounds for each vertex of the tree.
#ifndef __vtkTreeMapToPolyData_h
#define __vtkTreeMapToPolyData_h
#include "vtkPolyDataAlgorithm.h"
class VTK_INFOVIS_EXPORT vtkTreeMapToPolyData : public vtkPolyDataAlgorithm
{
public:
static vtkTreeMapToPolyData *New();
vtkTypeRevisionMacro(vtkTreeMapToPolyData,vtkPolyDataAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// The field containing quadruples of the form (min x, max x, min y, max y)
// representing the bounds of the rectangles for each vertex.
// This field may be added to the tree using vtkTreeMapLayout.
// This array must be set.
// TODO: This should be removed, and instead use ArrayToProcess from vtkAlgorithm.
vtkGetStringMacro(RectanglesFieldName);
vtkSetStringMacro(RectanglesFieldName);
// The field containing the levels of each vertex in the tree
// This array may be added to the tree using vtkTreeLevelsFilter.
// The z-coordinate for vertex i is computed by 0.001 * level[i].
// If this array is not set, the GetLevel() method of vtkTree is used
// to determine the level.
// TODO: This should be removed, and instead use ArrayToProcess from vtkAlgorithm.
// TODO: Since we have access to the tree structure, this requirement could be
// removed altogether.
vtkGetStringMacro(LevelsFieldName);
vtkSetStringMacro(LevelsFieldName);
// Description:
// The spacing along the z-axis between tree map levels.
vtkGetMacro(LevelDeltaZ, double);
vtkSetMacro(LevelDeltaZ, double);
int FillInputPortInformation(int port, vtkInformation* info);
protected:
vtkTreeMapToPolyData();
~vtkTreeMapToPolyData();
char * LevelsFieldName;
char * RectanglesFieldName;
double LevelDeltaZ;
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
private:
vtkTreeMapToPolyData(const vtkTreeMapToPolyData&); // Not implemented.
void operator=(const vtkTreeMapToPolyData&); // Not implemented.
};
#endif
|