--- /dev/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 "bbstdVectorFilterString.h"
+#include "bbstdPackage.h"
+namespace bbstd
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,VectorFilterString)
+BBTK_BLACK_BOX_IMPLEMENTATION(VectorFilterString,bbtk::AtomicBlackBox);
+//=====
+// 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)
+//=====
+
+void VectorFilterString::ConnectionRepetitions( std::vector<std::string> vIn,std::vector<std::string> *vOut )
+{
+ int i,size=vIn.size();
+ int itmp=0, acum=0;
+ std::string stmp;
+ for( i=0;i<size;i++)
+ {
+ if (vIn[i].compare( vIn[itmp])==0)
+ {
+ acum++;
+ } else {
+ itmp=i;
+ vOut->push_back(std::to_string(acum));
+ acum=1;
+ }
+ } // for
+ vOut->push_back(std::to_string(acum));
+}
+
+void VectorFilterString::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if (bbGetInputType()==0)
+ {
+ std::vector<std::string> vOut0;
+ std::vector<std::string> vOut1;
+ std::vector<std::string> vOut2;
+ std::vector<std::string> vOut3;
+ std::vector<std::string> vOut4;
+ std::vector<std::string> vOut5;
+ std::vector<std::string> vOut6;
+ std::vector<std::string> vOut7;
+ std::vector<std::string> vOut8;
+ std::vector<std::string> vOut9;
+ ConnectionRepetitions( bbGetInputIn0() , &vOut0 );
+ ConnectionRepetitions( bbGetInputIn1() , &vOut1 );
+ ConnectionRepetitions( bbGetInputIn2() , &vOut2 );
+ ConnectionRepetitions( bbGetInputIn3() , &vOut3 );
+ ConnectionRepetitions( bbGetInputIn4() , &vOut4 );
+ ConnectionRepetitions( bbGetInputIn5() , &vOut5 );
+ ConnectionRepetitions( bbGetInputIn6() , &vOut6 );
+ ConnectionRepetitions( bbGetInputIn7() , &vOut7 );
+ ConnectionRepetitions( bbGetInputIn8() , &vOut8 );
+ ConnectionRepetitions( bbGetInputIn9() , &vOut9 );
+ bbSetOutputOut0( vOut0 );
+ bbSetOutputOut1( vOut1 );
+ bbSetOutputOut2( vOut2 );
+ bbSetOutputOut3( vOut3 );
+ bbSetOutputOut4( vOut4 );
+ bbSetOutputOut5( vOut5 );
+ bbSetOutputOut6( vOut6 );
+ bbSetOutputOut7( vOut7 );
+ bbSetOutputOut8( vOut8 );
+ bbSetOutputOut9( vOut9 );
+ }
+
+
+
+}
+//=====
+// 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)
+//=====
+void VectorFilterString::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputType(0);
+
+}
+//=====
+// 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)
+//=====
+void VectorFilterString::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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)
+//=====
+void VectorFilterString::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbstd
+
+
--- /dev/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)
+//=====
+#ifndef __bbstdVectorFilterString_h_INCLUDED__
+#define __bbstdVectorFilterString_h_INCLUDED__
+
+#include "bbstd_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+namespace bbstd
+{
+
+class bbstd_EXPORT VectorFilterString
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(VectorFilterString,bbtk::AtomicBlackBox);
+//=====
+// 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_DECLARE_INPUT(In0,std::vector<std::string>);
+ BBTK_DECLARE_INPUT(In1,std::vector<std::string>);
+ BBTK_DECLARE_INPUT(In2,std::vector<std::string>);
+ BBTK_DECLARE_INPUT(In3,std::vector<std::string>);
+ BBTK_DECLARE_INPUT(In4,std::vector<std::string>);
+ BBTK_DECLARE_INPUT(In5,std::vector<std::string>);
+ BBTK_DECLARE_INPUT(In6,std::vector<std::string>);
+ BBTK_DECLARE_INPUT(In7,std::vector<std::string>);
+ BBTK_DECLARE_INPUT(In8,std::vector<std::string>);
+ BBTK_DECLARE_INPUT(In9,std::vector<std::string>);
+ BBTK_DECLARE_INPUT(Type,int);
+
+ BBTK_DECLARE_OUTPUT(Out0,std::vector<std::string>);
+ BBTK_DECLARE_OUTPUT(Out1,std::vector<std::string>);
+ BBTK_DECLARE_OUTPUT(Out2,std::vector<std::string>);
+ BBTK_DECLARE_OUTPUT(Out3,std::vector<std::string>);
+ BBTK_DECLARE_OUTPUT(Out4,std::vector<std::string>);
+ BBTK_DECLARE_OUTPUT(Out5,std::vector<std::string>);
+ BBTK_DECLARE_OUTPUT(Out6,std::vector<std::string>);
+ BBTK_DECLARE_OUTPUT(Out7,std::vector<std::string>);
+ BBTK_DECLARE_OUTPUT(Out8,std::vector<std::string>);
+ BBTK_DECLARE_OUTPUT(Out9,std::vector<std::string>);
+ BBTK_PROCESS(Process);
+ void Process();
+
+void ConnectionRepetitions( std::vector<std::string> vIn,std::vector<std::string> *vOut );
+
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(VectorFilterString,bbtk::AtomicBlackBox);
+ BBTK_NAME("VectorFilterString");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(VectorFilterString,In0,"Input vector",std::vector<std::string>,"");
+ BBTK_INPUT(VectorFilterString,In1,"Input vector",std::vector<std::string>,"");
+ BBTK_INPUT(VectorFilterString,In2,"Input vector",std::vector<std::string>,"");
+ BBTK_INPUT(VectorFilterString,In3,"Input vector",std::vector<std::string>,"");
+ BBTK_INPUT(VectorFilterString,In4,"Input vector",std::vector<std::string>,"");
+ BBTK_INPUT(VectorFilterString,In5,"Input vector",std::vector<std::string>,"");
+ BBTK_INPUT(VectorFilterString,In6,"Input vector",std::vector<std::string>,"");
+ BBTK_INPUT(VectorFilterString,In7,"Input vector",std::vector<std::string>,"");
+ BBTK_INPUT(VectorFilterString,In8,"Input vector",std::vector<std::string>,"");
+ BBTK_INPUT(VectorFilterString,In9,"Input vector",std::vector<std::string>,"");
+ BBTK_INPUT(VectorFilterString,Type,"(Default 0) 0:count connected repetitions",int,"");
+
+ BBTK_OUTPUT(VectorFilterString,Out0,"First output",std::vector<std::string>,"");
+ BBTK_OUTPUT(VectorFilterString,Out1,"First output",std::vector<std::string>,"");
+ BBTK_OUTPUT(VectorFilterString,Out2,"First output",std::vector<std::string>,"");
+ BBTK_OUTPUT(VectorFilterString,Out3,"First output",std::vector<std::string>,"");
+ BBTK_OUTPUT(VectorFilterString,Out4,"First output",std::vector<std::string>,"");
+ BBTK_OUTPUT(VectorFilterString,Out5,"First output",std::vector<std::string>,"");
+ BBTK_OUTPUT(VectorFilterString,Out6,"First output",std::vector<std::string>,"");
+ BBTK_OUTPUT(VectorFilterString,Out7,"First output",std::vector<std::string>,"");
+ BBTK_OUTPUT(VectorFilterString,Out8,"First output",std::vector<std::string>,"");
+ BBTK_OUTPUT(VectorFilterString,Out9,"First output",std::vector<std::string>,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(VectorFilterString);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbstd
+
+#endif // __bbstdVectorFilterString_h_INCLUDED__
+
#include "vtkProperty.h"
#include "vtkLinearTransform.h"
+#include "vtkCleanPolyData.h"
#include "bbvtkPolyDataToActor.h"
#include "bbvtkPackage.h"
+#include "vtkRenderWindow.h"
namespace bbvtk
{
void PolyDataToActor::DoProcess()
{
+printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n");
+printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n");
+printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n");
+printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n");
+printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n");
+printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n");
+printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n");
+printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n");
+//https://stackoverflow.com/questions/47528086/problems-with-rendering-transparent-objects-in-vtk
+//https://itk.org/Wiki/VTK/Depth_Peeling
+bbGetInputRenderer()->SetUseDepthPeeling(1);
+bbGetInputRenderer()->SetOcclusionRatio(0.1);
+bbGetInputRenderer()->SetMaximumNumberOfPeels(100);
+bbGetInputRenderer()->GetRenderWindow()->SetMultiSamples(0);
+bbGetInputRenderer()->GetRenderWindow()->SetAlphaBitPlanes(1);
+
+
if (bbGetInputActive()==true)
{
+
+
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
polydatamapper->SetInput( bbGetInputIn() );
#else
- polydatamapper->SetInputData( bbGetInputIn() );
+ polydatamapper->SetInputData( bbGetInputIn() );
#endif
vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );