#include "bbcreaVtkScalarBarActor.h"
#include "bbcreaVtkPackage.h"
-#include <vtkScalarBarActor.h>
namespace bbcreaVtk
{
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
-printf ("EED ScalarBarActor Start\n");
if (firsttime==true)
{
firsttime=false;
- vtkScalarBarActor* scalarbarActor = vtkScalarBarActor::New();
+ scalarbarActor = vtkScalarBarActor::New();
scalarbarActor->SetLookupTable( bbGetInputLookupTable() );
- scalarbarActor->SetTitle("Value");
- scalarbarActor->SetNumberOfLabels(4);
+ scalarbarActor->SetTitle( bbGetInputTitle().c_str() );
+ scalarbarActor->SetNumberOfLabels(5);
+ if (bbGetInputDisplayPosition().size()==2)
+ {
+ scalarbarActor->SetDisplayPosition( bbGetInputDisplayPosition()[0] , bbGetInputDisplayPosition()[1] );
+ } //if
int fontsize = scalarbarActor->GetLabelTextProperty()->GetFontSize();
scalarbarActor->GetLabelTextProperty()->SetFontSize(fontsize/2);
if (bbGetInputRenderer()!=NULL)
{
bbGetInputRenderer()->AddActor2D( scalarbarActor );
- }
+ } // if
} // firsttime
-printf ("EED ScalarBarActor End\n");
+ if (scalarbarActor!=NULL)
+ {
+ scalarbarActor->SetVisibility( bbGetInputActive() );
+ } // if scalarbarActor NULL
}
// Here we initialize the input 'In' to 0
bbSetInputLookupTable(NULL);
bbSetInputRenderer(NULL);
- firsttime=true;
-
+ bbSetInputTitle("Value");
+ bbSetInputActive(true);
+ firsttime = true;
+ scalarbarActor = NULL;
+
}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)