VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkCirclePackLayout Class Reference

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

#include <vtkCirclePackLayout.h>

Inheritance diagram for vtkCirclePackLayout:
Inheritance graph
[legend]
Collaboration diagram for vtkCirclePackLayout:
Collaboration graph
[legend]

List of all members.

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 vtkObjectBaseNewInstanceInternal () 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

Reimplemented from vtkTreeAlgorithm.

Definition at line 63 of file vtkCirclePackLayout.h.


Constructor & Destructor Documentation


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkTreeAlgorithm.

static int vtkCirclePackLayout::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkTreeAlgorithm.

virtual int vtkCirclePackLayout::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkTreeAlgorithm.

Reimplemented from vtkTreeAlgorithm.

virtual vtkObjectBase* vtkCirclePackLayout::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkTreeAlgorithm.

Reimplemented from vtkTreeAlgorithm.

void vtkCirclePackLayout::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkTreeAlgorithm.

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) [inline, virtual]

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

Definition at line 77 of file vtkCirclePackLayout.h.

The strategy to use when laying out the tree map.

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.

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.

Reimplemented from vtkObject.

int vtkCirclePackLayout::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

This is called by the superclass. This is the method you should override.

Reimplemented from vtkTreeAlgorithm.


Member Data Documentation

Definition at line 104 of file vtkCirclePackLayout.h.

Definition at line 105 of file vtkCirclePackLayout.h.


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