AUTHOR:Author ??
COMPLEXBOX:FALSE
COMPLEXINPUTS:0
-BOXES:33
+BOXES:35
BOX
creaMaracasVisu:ViewerNV:Box02
ISEXEC:FALSE
BOX
vtk:LoadHola:Box03
ISEXEC:FALSE
-216.974054:75.134614:-900.000000
-252.524054:65.134614:-900.000000
+157.002336:46.757753:-900.000000
+192.552336:36.757753:-900.000000
FIN_BOX
BOX
creaVtk:OutputWindow:Box06
BOX
creaVtk:HausdorffDistancePointSetFilter:Box13
ISEXEC:FALSE
--9.508939:-63.462997:-900.000000
-46.366061:-73.462997:-900.000000
+-4.243130:-64.340632:-900.000000
+51.631870:-74.340632:-900.000000
FIN_BOX
BOX
vtk:PolyDataToActor:Box14
BOX
creaVtk:ScalarsToColors:Box19
ISEXEC:FALSE
-102.571781:-16.610848:-900.000000
-144.096781:-26.610848:-900.000000
+92.332707:-30.067916:-900.000000
+133.857707:-40.067916:-900.000000
PORT
Type:"100"
FIN_BOX
BOX
creaVtk:ScalarBarActor:Box23
ISEXEC:FALSE
-99.560071:-63.366569:-900.000000
-140.385071:-73.366569:-900.000000
+-98.492869:-129.189186:-900.000000
+-57.667869:-139.189186:-900.000000
PORT
DisplayPosition:"5 30"
PORT
BOX
wx:Slider:Box29
ISEXEC:FALSE
--151.415727:-7.475713:-900.000000
--100.015727:-17.475713:-900.000000
+-151.123182:7.444080:-900.000000
+-99.723182:-2.555920:-900.000000
PORT
In:"0"
PORT
BOX
std:Div:Box30
ISEXEC:FALSE
--123.396427:-30.569471:-900.000000
--94.071427:-40.569471:-900.000000
+-126.614422:-18.282583:-900.000000
+-97.289422:-28.282583:-900.000000
PORT
In2:"100"
FIN_BOX
BOX
wx:CheckBox:Box32
ISEXEC:FALSE
--102.705134:-51.486540:-900.000000
--66.380134:-61.486540:-900.000000
+-69.062463:-23.402224:-900.000000
+-32.737463:-33.402224:-900.000000
PORT
In:"true"
PORT
BOX
creaVtk:ScalarsToColors:Box36
ISEXEC:FALSE
-166.160980:-15.333726:-900.000000
-207.685980:-25.333726:-900.000000
+154.166636:-25.865345:-900.000000
+195.691636:-35.865345:-900.000000
PORT
Type:"100"
FIN_BOX
-232.606583:-249.953591:-900.000000
-195.831583:-259.953591:-900.000000
FIN_BOX
-CONNECTIONS:51
+BOX
+std:MultipleInputs:Box47
+ISEXEC:FALSE
+-166.604357:-58.947810:-900.000000
+-126.904357:-68.947810:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:Box48
+ISEXEC:FALSE
+-83.122100:-53.867603:-900.000000
+-43.422100:-63.867603:-900.000000
+FIN_BOX
+CONNECTIONS:60
CONNECTION
Box03:Out:Box02:In
NumberOfControlPoints:0
Box19:LookupTable:Box23:LookupTable
NumberOfControlPoints:0
CONNECTION
-Box17:BoxChange:Box23:BoxExecute
-NumberOfControlPoints:0
-CONNECTION
Box17:BoxChange:Box14:BoxExecute
NumberOfControlPoints:0
CONNECTION
Box02:Renderer1:Box37:Renderer
NumberOfControlPoints:0
CONNECTION
-Box29:BoxChange:Box37:BoxExecute
-NumberOfControlPoints:0
-CONNECTION
Box03:Out:Box38:In
NumberOfControlPoints:0
CONNECTION
CONNECTION
Box46:Widget:Box40:Widget1
NumberOfControlPoints:0
+CONNECTION
+Box27:Out:Box23:Active
+NumberOfControlPoints:0
+CONNECTION
+Box47:BoxChange:Box23:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box17:BoxChange:Box47:In2
+NumberOfControlPoints:0
+CONNECTION
+Box27:BoxChange:Box47:In4
+NumberOfControlPoints:0
+CONNECTION
+Box32:BoxChange:Box48:In2
+NumberOfControlPoints:0
+CONNECTION
+Box29:BoxChange:Box48:In4
+NumberOfControlPoints:0
+CONNECTION
+Box48:BoxChange:Box37:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box32:Out:Box37:Active
+NumberOfControlPoints:0
+CONNECTION
+Box27:BoxChange:Box15:In2
+NumberOfControlPoints:0
+CONNECTION
+Box37:BoxChange:Box15:In3
+NumberOfControlPoints:0
+CONNECTION
+Box23:BoxChange:Box15:In1
+NumberOfControlPoints:0
APP_END
new wx:OutputText Box46
+new std:MultipleInputs Box47
+
+new std:MultipleInputs Box48
+
connect Box03.Out Box02.In
connect Box19.LookupTable Box23.LookupTable
-connect Box17.BoxChange Box23.BoxExecute
-
connect Box17.BoxChange Box14.BoxExecute
connect Box14.BoxChange Box15.In5
connect Box02.Renderer1 Box37.Renderer
-connect Box29.BoxChange Box37.BoxExecute
-
connect Box03.Out Box38.In
connect Box03.Out Box39.In
connect Box46.Widget Box40.Widget1
+connect Box27.Out Box23.Active
+
+connect Box47.BoxChange Box23.BoxExecute
+
+connect Box17.BoxChange Box47.In2
+
+connect Box27.BoxChange Box47.In4
+
+connect Box32.BoxChange Box48.In2
+
+connect Box29.BoxChange Box48.In4
+
+connect Box48.BoxChange Box37.BoxExecute
+
+connect Box32.Out Box37.Active
+
+connect Box27.BoxChange Box15.In2
+
+connect Box37.BoxChange Box15.In3
+
+connect Box23.BoxChange Box15.In1
+
# Complex input ports
#include "bbcreaVtkScalarBarActor.h"
#include "bbcreaVtkPackage.h"
-#include <vtkScalarBarActor.h>
namespace bbcreaVtk
{
if (firsttime==true)
{
firsttime=false;
- vtkScalarBarActor* scalarbarActor = vtkScalarBarActor::New();
+ scalarbarActor = vtkScalarBarActor::New();
scalarbarActor->SetLookupTable( bbGetInputLookupTable() );
scalarbarActor->SetTitle( bbGetInputTitle().c_str() );
- scalarbarActor->SetNumberOfLabels(4);
+ 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
+ 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)
#include <vtkRenderer.h>
#include <vtkScalarsToColors.h>
#include <vtkTextProperty.h>
+#include <vtkScalarBarActor.h>
namespace bbcreaVtk
{
BBTK_DECLARE_INPUT(DisplayPosition,std::vector<double>);
BBTK_DECLARE_INPUT(Title,std::string);
BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
+ BBTK_DECLARE_INPUT(Active,bool);
// BBTK_DECLARE_OUTPUT(Out,double);
BBTK_PROCESS(Process);
void Process();
bool firsttime;
+ vtkScalarBarActor *scalarbarActor;
//=====
// 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)
BBTK_CATEGORY("empty");
BBTK_INPUT(ScalarBarActor,LookupTable,"LookupTable",vtkScalarsToColors*,"");
BBTK_INPUT(ScalarBarActor,DisplayPosition,"(default EMPTY) [x,y] ",std::vector<double>,"");
- BBTK_INPUT(ScalarBarActor,Title,"Title ",std::string,"");
+ BBTK_INPUT(ScalarBarActor,Title,"('Value' default) Title",std::string,"");
BBTK_INPUT(ScalarBarActor,Renderer,"Renderer",vtkRenderer*,"");
+ BBTK_INPUT(ScalarBarActor,Active,"(true default) Active true/false",bool,"");
// BBTK_OUTPUT(ScalarBarActor,Out,"First output",double,"");
BBTK_END_DESCRIBE_BLACK_BOX(ScalarBarActor);
//=====
int iLookTable;
for (iLookTable = 0; iLookTable<NumberOfColorsHalf; iLookTable++)
{
- colorLookupTable->GetTableValue( iLookTable, rgba1);
- colorLookupTable->GetTableValue(NumberOfColors-1-iLookTable, rgba2);
- colorLookupTable->SetTableValue(NumberOfColors-1-iLookTable , rgba1[0],rgba1[1],rgba1[2],rgba1[3]);
- colorLookupTable->SetTableValue( iLookTable , rgba2[0],rgba2[1],rgba2[2],rgba2[3]);
+ colorLookupTable->GetTableValue( iLookTable, rgba1 );
+ colorLookupTable->GetTableValue(NumberOfColors-1-iLookTable, rgba2 );
+ colorLookupTable->SetTableValue(NumberOfColors-1-iLookTable, rgba1[0],rgba1[1],rgba1[2],rgba1[3] );
+ colorLookupTable->SetTableValue( iLookTable, rgba2[0],rgba2[1],rgba2[2],rgba2[3] );
} // for iLookTable
- double rgba[4];
- colorLookupTable->GetTableValue(0,rgba);
- rgba[3]=0;
- colorLookupTable->SetTableValue(0,rgba);
// Transparency
if (bbGetInputType()==0)
{
+ // First Element
+ double rgba[4];
+ colorLookupTable->GetTableValue(0,rgba);
+ rgba[3]=0;
+ colorLookupTable->SetTableValue(0,rgba);
+
+ // Middle range
int i,iMax=(NumberOfColors/16)*4;
for (i=0;i<iMax;i++)
{
// Transparency
if (bbGetInputType()==1)
{
+ // First Element
double rgba[4];
colorLookupTable->GetTableValue(0,rgba);
rgba[3]=0;
BBTK_AUTHOR("Info-Dev");
BBTK_DESCRIPTION("No Description.");
BBTK_CATEGORY("empty");
- BBTK_INPUT(ScalarsToColors,Type,"(0 default) 0=JET; 100=As 0 without transparace; 1=RangeTable; 101=As 1 without transparace; 2=DirectionColorRGB; 3=ComponentColorRGB[0-255]",int,"");
+ BBTK_INPUT(ScalarsToColors,Type,"(0 default) 0=JET(transparent for first element and middle range); 100=As 0 without transparace; 1=RangeTable (transparent for first element); 101=As 1 without transparace; 2=DirectionColorRGB; 3=ComponentColorRGB[0-255]",int,"");
BBTK_INPUT(ScalarsToColors,ScalarValue,"Scalar value -> Color OUT",double,"");
BBTK_INPUT(ScalarsToColors,Range,"Min Max range",std::vector<double>,"");
BBTK_OUTPUT(ScalarsToColors,Color,"Color",std::vector<double>,"");