[vtkusers] Problems with ScalarBar
grtabor
G.R.Tabor at exeter.ac.uk
Thu Jul 17 06:04:32 EDT 2003
Dear All,
I'm trying to add a vtkScalarBar to a contour plot, but it keeps core dumping
every time I run the programme. The code looks like this :
colourBarActor = vtkScalarBarActor::New();
colourBarActor->SetLookupTable(colours);
colourBarActor->SetTitle("Title");
colourBarActor->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewpo
rt();
colourBarActor->GetPositionCoordinate()->SetValue(0.1,0.01);
colourBarActor->SetOrientationToHorizontal();
colourBarActor->SetWidth(0.8);
colourBarActor->SetHeight(0.15);
renderer->AddActor2D(colourBarActor);
renderer->Render();
What am I doing wrong?
Gavin
More information about the vtkusers
mailing list