Commit cf784c41 authored by Jeff Baumes's avatar Jeff Baumes
Browse files

BUG: Made more fixes to the TCL wrapper for infovis.

BUG: Made infovis PrintSelf methods handle NULLs more nicely.
parent 4c78b040
......@@ -31,7 +31,7 @@
#include "vtkGraphLayoutStrategy.h"
vtkCxxRevisionMacro(vtkGraphLayout, "1.1");
vtkCxxRevisionMacro(vtkGraphLayout, "1.2");
vtkStandardNewMacro(vtkGraphLayout);
vtkGraphLayout::vtkGraphLayout()
......@@ -170,8 +170,14 @@ int vtkGraphLayout::RequestData(
void vtkGraphLayout::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent << "LayoutStrategy:" << endl;
this->LayoutStrategy->PrintSelf(os, indent.GetNextIndent());
os << indent << "InternalGraph:" << endl;
this->InternalGraph->PrintSelf(os, indent.GetNextIndent());
os << indent << "LayoutStrategy: " << (this->LayoutStrategy ? "" : "(none)") << endl;
if (this->LayoutStrategy)
{
this->LayoutStrategy->PrintSelf(os, indent.GetNextIndent());
}
os << indent << "InternalGraph: " << (this->InternalGraph ? "" : "(none)") << endl;
if (this->InternalGraph)
{
this->InternalGraph->PrintSelf(os, indent.GetNextIndent());
}
}
......@@ -20,7 +20,7 @@
#include "vtkAbstractGraph.h"
vtkCxxRevisionMacro(vtkGraphLayoutStrategy, "1.1");
vtkCxxRevisionMacro(vtkGraphLayoutStrategy, "1.2");
void vtkGraphLayoutStrategy::SetGraph(vtkAbstractGraph *graph)
{
......@@ -57,4 +57,9 @@ vtkGraphLayoutStrategy::~vtkGraphLayoutStrategy()
void vtkGraphLayoutStrategy::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
os << indent << "Graph: " << (this->Graph ? "" : "(none)") << endl;
if (this->Graph)
{
this->Graph->PrintSelf(os, indent.GetNextIndent());
}
}
......@@ -50,7 +50,7 @@
#include <vtkInformation.h>
#include <vtkCellData.h>
vtkCxxRevisionMacro(vtkGraphLayoutViewer, "1.1");
vtkCxxRevisionMacro(vtkGraphLayoutViewer, "1.2");
vtkStandardNewMacro(vtkGraphLayoutViewer);
......@@ -336,36 +336,41 @@ void vtkGraphLayoutViewer::PrintSelf(ostream& os, vtkIndent indent)
this->Superclass::PrintSelf(os, indent);
os << indent << "Input Graph:\n";
os << indent << "Input Graph: " << (this->Input ? "" : "(none)") << endl;
if (this->Input)
{
this->Input->PrintSelf(os,indent.GetNextIndent());
}
else
{
os << "No Input Graph Set!";
}
os << indent << "RenderWindow:\n";
os << indent << "RenderWindow: " << (this->RenderWindow ? "" : "(none)") << endl;
if (this->RenderWindow)
{
this->RenderWindow->PrintSelf(os,indent.GetNextIndent());
}
else
os << indent << "PolyDataMapper: " << (this->PolyDataMapper ? "" : "(none)") << endl;
if (this->PolyDataMapper)
{
os << "No Render Window Set!";
this->PolyDataMapper->PrintSelf(os,indent.GetNextIndent());
}
os << indent << "PolyDataMapper:\n";
this->PolyDataMapper->PrintSelf(os,indent.GetNextIndent());
os << indent << "Renderer:\n";
this->Renderer->PrintSelf(os,indent.GetNextIndent());
os << indent << "Renderer: " << (this->Renderer ? "" : "(none)") << endl;
if (this->Renderer)
{
this->Renderer->PrintSelf(os,indent.GetNextIndent());
}
os << indent << "Actor:\n";
this->Actor->PrintSelf(os,indent.GetNextIndent());
os << indent << "Actor: " << (this->Actor ? "" : "(none)") << endl;
if (this->Actor)
{
this->Actor->PrintSelf(os,indent.GetNextIndent());
}
os << indent << "InteractorStyle:\n";
this->InteractorStyle->PrintSelf(os,indent.GetNextIndent());
os << indent << "InteractorStyle: " << (this->InteractorStyle ? "" : "(none)") << endl;
if (this->InteractorStyle)
{
this->InteractorStyle->PrintSelf(os,indent.GetNextIndent());
}
}
......
......@@ -34,7 +34,7 @@
#include "vtkTreeMapToPolyData.h"
#include "vtkWorldPointPicker.h"
vtkCxxRevisionMacro(vtkInteractorStyleTreeMapHover, "1.3");
vtkCxxRevisionMacro(vtkInteractorStyleTreeMapHover, "1.4");
vtkStandardNewMacro(vtkInteractorStyleTreeMapHover);
//----------------------------------------------------------------------------
......@@ -155,27 +155,19 @@ void vtkInteractorStyleTreeMapHover::SetInteractor(vtkRenderWindowInteractor
void vtkInteractorStyleTreeMapHover::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent << "Layout: ";
if (this->Layout == NULL)
os << indent << "Layout: " << (this->Layout ? "" : "(none)") << endl;
if (this->Layout)
{
os << "\n";
this->Layout->PrintSelf(os, indent.GetNextIndent());
}
else
{
os << "NULL\n";
}
os << indent << "TreeMapToPolyData: ";
if (this->TreeMapToPolyData == NULL)
os << indent << "TreeMapToPolyData: " << (this->TreeMapToPolyData ? "" : "(none)") << endl;
if (this->TreeMapToPolyData)
{
os << "\n";
this->TreeMapToPolyData->PrintSelf(os, indent.GetNextIndent());
}
else
{
os << "NULL\n";
}
os << indent << "LabelField: " << this->LabelField << endl;
os << indent << "LabelField: " << (this->LabelField ? this->LabelField : "(none)") << endl;
}
vtkIdType vtkInteractorStyleTreeMapHover::GetTreeMapIdAtPos(int x, int y)
......
......@@ -32,7 +32,7 @@
#include <vtkViewport.h>
#include <vtkWindow.h>
vtkCxxRevisionMacro(vtkLabeledTreeMapDataMapper, "1.1");
vtkCxxRevisionMacro(vtkLabeledTreeMapDataMapper, "1.2");
vtkStandardNewMacro(vtkLabeledTreeMapDataMapper);
vtkLabeledTreeMapDataMapper::vtkLabeledTreeMapDataMapper()
......@@ -169,23 +169,19 @@ void vtkLabeledTreeMapDataMapper::UpdateFontSizes()
void vtkLabeledTreeMapDataMapper::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent << "RectanglesFieldName = "
<< this->RectanglesFieldName << endl;
os << indent << "ClipTextMode = "
<< this->ClipTextMode << endl;
os << indent << "ChildMotion = "
<< this->ChildMotion << endl;
os << indent << "DynamicLevel = "
<< this->DynamicLevel << endl;
os << indent << "RectanglesFieldName: " << (this->RectanglesFieldName ? this->RectanglesFieldName : "(none)") << endl;
os << indent << "ClipTextMode: " << this->ClipTextMode << endl;
os << indent << "ChildMotion: " << this->ChildMotion << endl;
os << indent << "DynamicLevel: " << this->DynamicLevel << endl;
int i;
os << "Font Sizes = ";
os << "Font Sizes: ";
for (i = 0; i <= this->MaxFontLevel; i++)
{
os << this->HLabelProperties[i]->GetFontSize() << " ";
}
os << endl;
os << indent << "Level Range = [" << this->StartLevel
os << indent << "Level Range: [" << this->StartLevel
<< ", " << this->EndLevel << "]" << endl;
}
......
......@@ -28,7 +28,7 @@
#include "vtkTree.h"
vtkCxxRevisionMacro(vtkSliceAndDiceLayoutStrategy, "1.1");
vtkCxxRevisionMacro(vtkSliceAndDiceLayoutStrategy, "1.2");
vtkStandardNewMacro(vtkSliceAndDiceLayoutStrategy);
vtkSliceAndDiceLayoutStrategy::vtkSliceAndDiceLayoutStrategy()
......@@ -45,7 +45,7 @@ vtkSliceAndDiceLayoutStrategy::~vtkSliceAndDiceLayoutStrategy()
void vtkSliceAndDiceLayoutStrategy::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
os << indent << "SizeFieldName: " << this->SizeFieldName << endl;
os << indent << "SizeFieldName: " << (this->SizeFieldName ? this->SizeFieldName : "(none)") << endl;
}
// Alternating tree layout method
......
......@@ -26,7 +26,7 @@
#include "vtkTree.h"
vtkCxxRevisionMacro(vtkSquarifyLayoutStrategy, "1.1");
vtkCxxRevisionMacro(vtkSquarifyLayoutStrategy, "1.2");
vtkStandardNewMacro(vtkSquarifyLayoutStrategy);
vtkSquarifyLayoutStrategy::vtkSquarifyLayoutStrategy()
......@@ -43,7 +43,7 @@ vtkSquarifyLayoutStrategy::~vtkSquarifyLayoutStrategy()
void vtkSquarifyLayoutStrategy::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
os << indent << "SizeFieldName: " << this->SizeFieldName << endl;
os << indent << "SizeFieldName: " << (this->SizeFieldName ? this->SizeFieldName : "(none)") << endl;
}
void vtkSquarifyLayoutStrategy::Layout(vtkTree *inputTree,
......
......@@ -31,7 +31,7 @@
#include "vtkGraph.h"
#include "vtkVariantArray.h"
vtkCxxRevisionMacro(vtkTreeFieldAggregator, "1.1");
vtkCxxRevisionMacro(vtkTreeFieldAggregator, "1.2");
vtkStandardNewMacro(vtkTreeFieldAggregator);
vtkTreeFieldAggregator::vtkTreeFieldAggregator():MinValue(0.0)
......@@ -160,9 +160,9 @@ void vtkTreeFieldAggregator::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
os << indent << "Field: " << this->Field << endl;
os << indent << "LeafNodeUnitSize: " << (this->LeafNodeUnitSize ? "on" : "off") << endl;
os << indent << "LeafNodeUnitSize: " << (this->LeafNodeUnitSize ? "On" : "Off") << endl;
os << indent << "MinValue: " << this->MinValue << endl;
os << indent << "LogScale: " << (this->LogScale? "on" : "off") << endl;
os << indent << "LogScale: " << (this->LogScale? "On" : "Off") << endl;
}
double vtkTreeFieldAggregator::GetDoubleValue(vtkAbstractArray* arr, vtkIdType id)
......
......@@ -27,7 +27,7 @@
#include "vtkTree.h"
#include "vtkTreeMapLayoutStrategy.h"
vtkCxxRevisionMacro(vtkTreeMapLayout, "1.3");
vtkCxxRevisionMacro(vtkTreeMapLayout, "1.4");
vtkStandardNewMacro(vtkTreeMapLayout);
vtkTreeMapLayout::vtkTreeMapLayout()
......@@ -94,9 +94,12 @@ int vtkTreeMapLayout::RequestData(
void vtkTreeMapLayout::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent << "RectanglesFieldName: " << this->RectanglesFieldName << endl;
os << indent << "LayoutStrategy:" << endl;
this->LayoutStrategy->PrintSelf(os, indent.GetNextIndent());
os << indent << "RectanglesFieldName: " << (this->RectanglesFieldName ? this->RectanglesFieldName : "(none)") << endl;
os << indent << "LayoutStrategy: " << (this->LayoutStrategy ? "" : "(none)") << endl;
if (this->LayoutStrategy)
{
this->LayoutStrategy->PrintSelf(os, indent.GetNextIndent());
}
}
vtkIdType vtkTreeMapLayout::FindNode(float pnt[2], float *binfo)
......
......@@ -15,7 +15,7 @@
#include "vtkTreeMapLayoutStrategy.h"
vtkCxxRevisionMacro(vtkTreeMapLayoutStrategy, "1.1");
vtkCxxRevisionMacro(vtkTreeMapLayoutStrategy, "1.2");
vtkTreeMapLayoutStrategy::vtkTreeMapLayoutStrategy():BorderPercentage(0.0)
{
......@@ -28,7 +28,7 @@ vtkTreeMapLayoutStrategy::~vtkTreeMapLayoutStrategy()
void vtkTreeMapLayoutStrategy::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
os << "BorderPercentage = " << this->BorderPercentage << endl;
os << "BorderPercentage: " << this->BorderPercentage << endl;
}
void vtkTreeMapLayoutStrategy::AddBorder(float *boxInfo)
......
......@@ -27,7 +27,7 @@
#include "vtkAbstractGraph.h"
#include "vtkTree.h"
vtkCxxRevisionMacro(vtkTreeMapToPolyData, "1.1");
vtkCxxRevisionMacro(vtkTreeMapToPolyData, "1.2");
vtkStandardNewMacro(vtkTreeMapToPolyData);
vtkTreeMapToPolyData::vtkTreeMapToPolyData()
......@@ -154,7 +154,7 @@ int vtkTreeMapToPolyData::RequestData(
void vtkTreeMapToPolyData::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
os << indent << "LevelsFieldName: " << this->LevelsFieldName << endl;
os << indent << "RectanglesFieldName: " << this->RectanglesFieldName << endl;
os << indent << "LevelsFieldName: " << (this->LevelsFieldName ? this->LevelsFieldName : "(none)") << endl;
os << indent << "RectanglesFieldName: " << (this->RectanglesFieldName ? this->RectanglesFieldName : "(none)") << endl;
os << indent << "LevelDeltaZ: " << this->LevelDeltaZ << endl;
}
......@@ -54,7 +54,7 @@
#include <vtkInformation.h>
#include <vtkCellData.h>
vtkCxxRevisionMacro(vtkTreeMapViewer, "1.1");
vtkCxxRevisionMacro(vtkTreeMapViewer, "1.2");
vtkStandardNewMacro(vtkTreeMapViewer);
......@@ -373,50 +373,65 @@ void vtkTreeMapViewer::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent << "Input Tree:\n";
os << indent << "Input Tree: " << (this->Input ? "" : "(none)") << endl;
if (this->Input)
{
this->Input->PrintSelf(os,indent.GetNextIndent());
}
else
{
os << "No Input Tree Set!";
}
os << indent << "RenderWindow:\n";
os << indent << "RenderWindow: " << (this->RenderWindow ? "" : "(none)") << endl;
if (this->RenderWindow)
{
this->RenderWindow->PrintSelf(os,indent.GetNextIndent());
}
else
os << indent << "TreeLevelsFilter: " << (this->TreeLevelsFilter ? "" : "(none)") << endl;
if (this->TreeLevelsFilter)
{
os << "No Render Window Set!";
this->TreeLevelsFilter->PrintSelf(os,indent.GetNextIndent());
}
os << indent << "TreeLevelsFilter:\n";
this->TreeLevelsFilter->PrintSelf(os,indent.GetNextIndent());
os << indent << "TreeFieldAggregator:\n";
this->TreeFieldAggregator->PrintSelf(os,indent.GetNextIndent());
os << indent << "TreeFieldAggregator: " << (this->TreeFieldAggregator ? "" : "(none)") << endl;
if (this->TreeFieldAggregator)
{
this->TreeFieldAggregator->PrintSelf(os,indent.GetNextIndent());
}
os << indent << "TreeMapLayout:\n";
this->TreeMapLayout->PrintSelf(os,indent.GetNextIndent());
os << indent << "TreeMapLayout: " << (this->TreeMapLayout ? "" : "(none)") << endl;
if (this->TreeMapLayout)
{
this->TreeMapLayout->PrintSelf(os,indent.GetNextIndent());
}
os << indent << "TreeMapToPolyData:\n";
this->TreeMapToPolyData->PrintSelf(os,indent.GetNextIndent());
os << indent << "TreeMapToPolyData: " << (this->TreeMapToPolyData ? "" : "(none)") << endl;
if (this->TreeMapToPolyData)
{
this->TreeMapToPolyData->PrintSelf(os,indent.GetNextIndent());
}
os << indent << "PolyDataMapper:\n";
this->PolyDataMapper->PrintSelf(os,indent.GetNextIndent());
os << indent << "PolyDataMapper: " << (this->PolyDataMapper ? "" : "(none)") << endl;
if (this->PolyDataMapper)
{
this->PolyDataMapper->PrintSelf(os,indent.GetNextIndent());
}
os << indent << "Renderer:\n";
this->Renderer->PrintSelf(os,indent.GetNextIndent());
os << indent << "Renderer: " << (this->Renderer ? "" : "(none)") << endl;
if (this->Renderer)
{
this->Renderer->PrintSelf(os,indent.GetNextIndent());
}
os << indent << "Actor:\n";
this->Actor->PrintSelf(os,indent.GetNextIndent());
os << indent << "Actor: " << (this->Actor ? "" : "(none)") << endl;
if (this->Actor)
{
this->Actor->PrintSelf(os,indent.GetNextIndent());
}
os << indent << "InteractorStyle:\n";
this->InteractorStyle->PrintSelf(os,indent.GetNextIndent());
os << indent << "InteractorStyle: " << (this->InteractorStyle ? "" : "(none)") << endl;
if (this->InteractorStyle)
{
this->InteractorStyle->PrintSelf(os,indent.GetNextIndent());
}
}
void vtkTreeMapViewer::SetLabelLevelRange(int start, int end)
......
......@@ -5,7 +5,7 @@ if {[info commands ::vtk::init::require_package] != ""} {
package provide vtkinfovis 5.1
}
} else {
if {[info commands vtkInfovisFactory] != "" ||
if {[info commands vtkGraphLayout] != "" ||
[::vtk::load_component vtkInfovisTCL] == ""} {
package provide vtkinfovis 5.1
}
......
......@@ -20,6 +20,7 @@
/*--------------------------------------------------------------------------*/
/* Selected VTK Toolkits */
#cmakedefine VTK_USE_INFOVIS
#cmakedefine VTK_USE_PARALLEL
#cmakedefine VTK_USE_RENDERING
#cmakedefine VTK_USE_GL2PS
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment