VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkCirclePackLayout Class Reference

layout a vtkTree as a circle packing. More...

#include <vtkCirclePackLayout.h>

Inherits vtkTreeAlgorithm.

Collaboration diagram for vtkCirclePackLayout:
[legend]

Public Types

typedef vtkTreeAlgorithm Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkCirclePackLayoutNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
vtkIdType FindVertex (double pnt[2], double *cinfo=0)
 
void GetBoundingCircle (vtkIdType id, double *cinfo)
 
virtual unsigned long GetMTime ()
 
virtual char * GetCirclesFieldName ()
 
virtual void SetCirclesFieldName (const char *)
 
virtual void SetSizeArrayName (const char *name)
 
virtual
vtkCirclePackLayoutStrategy
GetLayoutStrategy ()
 
void SetLayoutStrategy (vtkCirclePackLayoutStrategy *strategy)
 

Static Public Member Functions

static vtkCirclePackLayoutNew ()
 
static int IsTypeOf (const char *type)
 
static vtkCirclePackLayoutSafeDownCast (vtkObjectBase *o)
 

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 
 vtkCirclePackLayout ()
 
 ~vtkCirclePackLayout ()
 
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 

Protected Attributes

char * CirclesFieldName
 
vtkCirclePackLayoutStrategyLayoutStrategy
 

Detailed Description

layout a vtkTree as a circle packing.

vtkCirclePackLayout assigns circle shaped regions to each vertex in the tree, creating a circle packing layout. The data is added as a data array with three components per tuple representing the center and radius of the circle using the format (Xcenter, Ycenter, Radius).

This algorithm relies on a helper class to perform the actual layout. This helper class is a subclass of vtkCirclePackLayoutStrategy.

An array by default called "size" can be attached to the input tree that specifies the size of each leaf node in the tree. The filter will calculate the sizes of all interior nodes in the tree based on the sum of the leaf node sizes. If no "size" array is given in the input vtkTree, a size of 1 is used for all leaf nodes to find the size of the interior nodes.

Thanks:
Thanks to Thomas Otahal from Sandia National Laboratories for help developing this class.
Tests:
vtkCirclePackLayout (Tests)

Definition at line 58 of file vtkCirclePackLayout.h.

Member Typedef Documentation

typedef vtkTreeAlgorithm vtkCirclePackLayout::Superclass

Definition at line 63 of file vtkCirclePackLayout.h.

Constructor & Destructor Documentation

vtkCirclePackLayout::vtkCirclePackLayout ( )
protected
vtkCirclePackLayout::~vtkCirclePackLayout ( )
protected

Member Function Documentation

static vtkCirclePackLayout* vtkCirclePackLayout::New ( )
static
static int vtkCirclePackLayout::IsTypeOf ( const char *  type)
static
virtual int vtkCirclePackLayout::IsA ( const char *  type)
virtual
static vtkCirclePackLayout* vtkCirclePackLayout::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkCirclePackLayout::NewInstanceInternal ( ) const
protectedvirtual
vtkCirclePackLayout* vtkCirclePackLayout::NewInstance ( ) const
void vtkCirclePackLayout::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual char* vtkCirclePackLayout::GetCirclesFieldName ( )
virtual

The field name to use for storing the circles for each vertex. The rectangles are stored in a triple float array (Xcenter, Ycenter, Radius). Default name is "circles"

virtual void vtkCirclePackLayout::SetCirclesFieldName ( const char *  )
virtual

The field name to use for storing the circles for each vertex. The rectangles are stored in a triple float array (Xcenter, Ycenter, Radius). Default name is "circles"

virtual void vtkCirclePackLayout::SetSizeArrayName ( const char *  name)
inlinevirtual

The array to use for the size of each vertex. Default name is "size".

Definition at line 77 of file vtkCirclePackLayout.h.

virtual vtkCirclePackLayoutStrategy* vtkCirclePackLayout::GetLayoutStrategy ( )
virtual

The strategy to use when laying out the tree map.

void vtkCirclePackLayout::SetLayoutStrategy ( vtkCirclePackLayoutStrategy strategy)

The strategy to use when laying out the tree map.

vtkIdType vtkCirclePackLayout::FindVertex ( double  pnt[2],
double *  cinfo = 0 
)

Returns the vertex id that contains pnt (or -1 if no one contains it) pnt[0] is x, and pnt[1] is y. If cinfo[3] is provided, then (Xcenter, Ycenter, Radius) of the circle containing pnt[2] will be returned.

void vtkCirclePackLayout::GetBoundingCircle ( vtkIdType  id,
double *  cinfo 
)

Return the Xcenter, Ycenter, and Radius of the vertex's bounding circle

virtual unsigned long vtkCirclePackLayout::GetMTime ( )
virtual

Get the modification time of the layout algorithm.

int vtkCirclePackLayout::RequestData ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
protected

Member Data Documentation

char* vtkCirclePackLayout::CirclesFieldName
protected

Definition at line 104 of file vtkCirclePackLayout.h.

vtkCirclePackLayoutStrategy* vtkCirclePackLayout::LayoutStrategy
protected

Definition at line 105 of file vtkCirclePackLayout.h.


The documentation for this class was generated from the following file: