I->SetInputs(cmd.param_map);
bool help_on_script = cmd.help && (cmd.input_file.size() > 0);
- if (help_on_script)
- I->SetNoExecMode(true);
- if (cmd.graphical_dialog)
- I->SetDialogMode(bbtk::VirtualExec::GraphicalDialog);
- if (cmd.text_dialog)
- I->SetDialogMode(bbtk::VirtualExec::TextDialog);
+ if (help_on_script) I->SetNoExecMode(true);
+ if (cmd.graphical_dialog) I->SetDialogMode(bbtk::VirtualExec::GraphicalDialog);
+ if (cmd.text_dialog) I->SetDialogMode(bbtk::VirtualExec::TextDialog);
std::vector<std::string>::const_iterator i;
bool error = false;
bbSetInputRenderer(NULL);
bbSetInputTransform(NULL);
bbSetInputOpacity(1);
- bbSetInputRepresentation(1);
+ bbSetInputRepresentation(2);
bbSetInputLineWidth(1);
polydatamapper = NULL;
BBTK_INPUT(PolyDataToActor,Colour,"r g b",vectorcolour,"colour");
BBTK_INPUT(PolyDataToActor,Renderer,"3D scene in which to insert the surface",vtkRenderer*,"");
BBTK_INPUT(PolyDataToActor,Transform,"Linear Transform (4x4 homogeneous)",vtkLinearTransform*,"");
- BBTK_INPUT(PolyDataToActor,Representation,"0 points, 1(default) surface, 2 wireframe",int,"");
+ BBTK_INPUT(PolyDataToActor,Representation,"0 points,1 wireframe, 2(default) surface",int,"");
BBTK_INPUT(PolyDataToActor,LineWidth,"Width of the wireframe (1 default)",double,"");
BBTK_OUTPUT(PolyDataToActor,Out,"Extracted iso-surface",vtkProp3D *,"");
--- /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 "bbvtkText3D.h"
+#include "bbvtkPackage.h"
+
+#include "vtkTextActor3D.h"
+#include "vtkTextProperty.h"
+
+
+namespace bbvtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,Text3D)
+BBTK_BLACK_BOX_IMPLEMENTATION(Text3D,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 Text3D::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')
+
+ vtkTextActor3D *textActor = vtkTextActor3D::New();
+ vtkTextProperty *textprop = vtkTextProperty::New();
+ textprop->SetColor( bbGetInputColour()[0] , bbGetInputColour()[1], bbGetInputColour()[2] );
+ textprop->SetFontSize( 14 );
+
+ textActor->SetTextProperty( textprop );
+
+ textActor->SetInput( bbGetInputIn().c_str() );
+ textActor->SetPosition( bbGetInputX(), bbGetInputY(),bbGetInputZ() );
+ bbGetInputRenderer()->AddActor( textActor );
+ bbSetOutputOut(textActor);
+
+}
+//=====
+// 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 Text3D::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputIn("<void>");
+ bbSetInputX(0);
+ bbSetInputY(0);
+ bbSetInputZ(0);
+
+ std::vector<double> colour;
+ colour.push_back(1);
+ colour.push_back(0);
+ colour.push_back(0);
+ bbSetInputColour(colour);
+ bbSetInputRenderer(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)
+//=====
+void Text3D::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 Text3D::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbvtk
+
+
--- /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 __bbvtkText3D_h_INCLUDED__
+#define __bbvtkText3D_h_INCLUDED__
+#include "bbvtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkProp3D.h"
+#include "vtkRenderer.h"
+
+namespace bbvtk
+{
+
+class bbvtk_EXPORT Text3D
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(Text3D,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(In,std::string);
+ BBTK_DECLARE_INPUT(X,int);
+ BBTK_DECLARE_INPUT(Y,int);
+ BBTK_DECLARE_INPUT(Z,int);
+ BBTK_DECLARE_INPUT(Colour,std::vector<double>);
+ BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
+ BBTK_DECLARE_OUTPUT(Out,vtkProp3D*);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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(Text3D,bbtk::AtomicBlackBox);
+BBTK_NAME("Text3D");
+BBTK_AUTHOR("Info-Deb");
+BBTK_DESCRIPTION("Text in 3D vtkRender");
+BBTK_CATEGORY("");
+
+ BBTK_INPUT(Text3D,In,"Input Text",std::string,"");
+ BBTK_INPUT(Text3D,X,"position X",int,"");
+ BBTK_INPUT(Text3D,Y,"position Y",int,"");
+ BBTK_INPUT(Text3D,Z,"position Z",int,"");
+ BBTK_INPUT(Text3D,Colour,"Colour vector RGB",std::vector<double>,"");
+ BBTK_INPUT(Text3D,Renderer,"vtk Renderer",vtkRenderer*,"");
+
+ BBTK_OUTPUT(Text3D,Out,"vtk Actor",vtkProp3D*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(Text3D);
+//=====
+// 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 bbvtk
+
+#endif // __bbvtkText3D_h_INCLUDED__
+