bbSetOutputTransformOut( transformOut );
} else {
printf("EED Warnning! BoxWidget::Process vtkRenderer not set.\n");
- }// vtkRenderer != NULL
-
+ }// vtkRenderer != NULL
bbSetOutputBox_BoxWidget( this );
-
- printf("EED BoxWidget::Process A\n");
-
-
}
//=====
// 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(BoxWidget,bbtk::AtomicBlackBox);
BBTK_NAME("BoxWidget");
BBTK_AUTHOR("InfoDev");
- BBTK_DESCRIPTION("No Description.");
+ BBTK_DESCRIPTION("(C++,Python) No Description.");
BBTK_CATEGORY("empty");
BBTK_INPUT(BoxWidget,Active,"(default false) true/false",bool,"");
--- /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 "bbcreaVtkBoxWidget_tool.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,BoxWidget_tool)
+BBTK_BLACK_BOX_IMPLEMENTATION(BoxWidget_tool,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 BoxWidget_tool::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()==1)
+ {
+ if ( (bbGetInputBox_BoxWidget()!=NULL) && (bbGetInputTransform()!=NULL) )
+ {
+ bbGetInputBox_BoxWidget()->SetTransform( bbGetInputTransform() );
+ } // _BoxWidget
+ } // if Type
+}
+
+//=====
+// 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 BoxWidget_tool::bbUserSetDefaultValues()
+{
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputType(0);
+ bbSetInputTransform(NULL);
+ bbSetInputBox_BoxWidget(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 BoxWidget_tool::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 BoxWidget_tool::bbUserFinalizeProcessing()
+{
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+}
+
+}// EO namespace bbcreaVtk
+
+
--- /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 __bbcreaVtkBoxWidget_tool_h_INCLUDED__
+#define __bbcreaVtkBoxWidget_tool_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkLinearTransform.h"
+#include "bbcreaVtkBoxWidget.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT BoxWidget_tool
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(BoxWidget_tool,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(Type,int);
+ BBTK_DECLARE_INPUT(Transform,vtkLinearTransform*);
+ BBTK_DECLARE_INPUT(Param01,std::vector<double>);
+ BBTK_DECLARE_INPUT(Box_BoxWidget,BoxWidget*);
+ 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(BoxWidget_tool,bbtk::AtomicBlackBox);
+ BBTK_NAME("BoxWidget_tool");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("(C++,Python) No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(BoxWidget_tool,Type,"(default 0) 0:Nothing 1:SetTransform",int,"");
+ BBTK_INPUT(BoxWidget_tool,Transform,"vtkTransform",vtkLinearTransform*,"");
+ BBTK_INPUT(BoxWidget_tool,Param01,"",std::vector<double>,"");
+ BBTK_INPUT(BoxWidget_tool,Box_BoxWidget,"bbtk Box BoxWidget",BoxWidget*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(BoxWidget_tool);
+//=====
+// 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 bbcreaVtk
+
+#endif // __bbcreaVtkBoxWidget_tool_h_INCLUDED__
+
// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
- printf("EED ClipPolyData::Process Start\n");
-
if ((bbGetInputIn()!=NULL) && (bbGetInputImplicitFunction()!=NULL) )
{
if (bbGetInputType()==0)
//=====
void ClipPolyData::bbUserSetDefaultValues()
{
-
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
bbSetInputIn( NULL );
bbSetInputType( 0 );
bbSetInputInside( true );
bbSetInputImplicitFunction( 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 ClipPolyData::bbUserInitializeProcessing()
{
-
// THE INITIALIZATION METHOD BODY :
// Here does nothing
// but this is where you should allocate the internal/output pointers
-// if any
-
-
+// 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 ClipPolyData::bbUserFinalizeProcessing()
{
-
// THE FINALIZATION METHOD BODY :
// Here does nothing
// but this is where you should desallocate the internal/output pointers
// if any
-
}
-}
-// EO namespace bbcreaVtk
+
+} // EO namespace bbcreaVtk
BBTK_BEGIN_DESCRIBE_BLACK_BOX(ClipPolyData,bbtk::AtomicBlackBox);
BBTK_NAME("ClipPolyData");
BBTK_AUTHOR("InfoDev");
- BBTK_DESCRIPTION("No Description.");
+ BBTK_DESCRIPTION("(C++,Python) No Description.");
BBTK_CATEGORY("empty");
BBTK_INPUT(ClipPolyData,Type,"(default 0) 0:surface vtkClipPolydata 1:points vtkExtractPoints",int,"");
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
vtkTransform *result = vtkTransform::New();
- result->PostMultiply ();
+ result->PostMultiply();
result->Identity();
if (bbGetInputIn1()!=NULL) { result->Concatenate( bbGetInputIn1()->GetMatrix() ); result->Update(); }
if (bbGetInputIn2()!=NULL) { result->Concatenate( bbGetInputIn2()->GetMatrix() ); result->Update(); }
BBTK_BEGIN_DESCRIBE_BLACK_BOX(ConcatTransform,bbtk::AtomicBlackBox);
BBTK_NAME("ConcatTransform");
BBTK_AUTHOR("InfoDev");
- BBTK_DESCRIPTION("No Description.");
+ BBTK_DESCRIPTION("(C++,Python) No Description.");
BBTK_CATEGORY("empty");
BBTK_INPUT(ConcatTransform,In1,"vtkLinearTransform input",vtkLinearTransform*,"");
BBTK_INPUT(ConcatTransform,In2,"vtkLinearTransform input",vtkLinearTransform*,"");
lstImages.push_back( reader->GetOutput() );
} // for i
} // Type 1
-
} // if
-
if (lstImages.size()>=1) { bbSetOutputOut( lstImages[0] ); } else {bbSetOutputOut( NULL ); }
bbSetOutputOutVector( lstImages );
-
}
-//=====
+
+//=====
// 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 NIFTIImageReader::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 NIFTIImageReader::bbUserInitializeProcessing()
{
-
// THE INITIALIZATION METHOD BODY :
// Here does nothing
// but this is where you should allocate the internal/output pointers
-// if any
-
-
+// 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 NIFTIImageReader::bbUserFinalizeProcessing()
{
-
// THE FINALIZATION METHOD BODY :
// Here does nothing
// but this is where you should desallocate the internal/output pointers
// if any
-
}
-}
-// EO namespace bbcreaVtk
+
+}// EO namespace bbcreaVtk
BBTK_BEGIN_DESCRIBE_BLACK_BOX(NIFTIImageReader,bbtk::AtomicBlackBox);
BBTK_NAME("NIFTIImageReader");
BBTK_AUTHOR("Info-Dev");
- BBTK_DESCRIPTION("No Description.");
+ BBTK_DESCRIPTION("(C++,Python) No Description.");
BBTK_CATEGORY("empty");
BBTK_INPUT(NIFTIImageReader,Type,"(default 0) 0:Use FileNames by slice 1:Use FileNames by volumes",int,"");
BBTK_INPUT(NIFTIImageReader,FileNames,"List of file names",std::vector<std::string>,"");
--- /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 "bbcreaVtkPlanes_ImplicitFunction.h"
+#include "bbcreaVtkPackage.h"
+
+#include <vtkPlane.h>
+
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,Planes_ImplicitFunction)
+BBTK_BLACK_BOX_IMPLEMENTATION(Planes_ImplicitFunction,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 Planes_ImplicitFunction::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( bbGetInputType() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+ printf("EED Planes_ImplicitFunction::Process Start \n");
+
+ if (bbGetInputPlanes()!=NULL)
+ {
+ printf("EED Planes_ImplicitFunction::Process Flag 01 \n");
+ int i,size;
+ vtkPlane* p;
+ double tmpDouble[3];
+ std::vector<double> lstPoints;
+ std::vector<double> lstNormals;
+ size = bbGetInputPlanes()->GetNumberOfPlanes();
+
+
+ if (bbGetInputType()==1)
+ {
+ std::vector<double> points = bbGetInputPointsIn();
+ std::vector<double> normals = bbGetInputNormalsIn();
+ printf("EED Planes_ImplicitFunction::Process size %d size %d \n",points.size() , normals.size() );
+ if ((points.size() % 3==0) && (normals.size() % 3==0))
+ {
+ for (i=0;i<size;i++)
+ {
+ p = bbGetInputPlanes()->GetPlane(i);
+ tmpDouble[0] = points[i*3+0] ;
+ tmpDouble[1] = points[i*3+1] ;
+ tmpDouble[2] = points[i*3+2] ;
+ p->SetOrigin(tmpDouble);
+ tmpDouble[0] = normals[i*3+0] ;
+ tmpDouble[1] = normals[i*3+1] ;
+ tmpDouble[2] = normals[i*3+2] ;
+ p->SetNormal(tmpDouble);
+ p->Modified();
+ printf("EED Planes_ImplicitFunction::Process normals %f %f %f \n", tmpDouble[0], tmpDouble[1], tmpDouble[2]);
+ } // for i
+ }
+ } // Type ==1
+
+ if (bbGetInputType()==2)
+ {
+ for (i=0;i<size;i++)
+ {
+ p = bbGetInputPlanes()->GetPlane(i);
+ lstPoints.push_back( p->GetOrigin()[0] );
+ lstPoints.push_back( p->GetOrigin()[1] );
+ lstPoints.push_back( p->GetOrigin()[2] );
+ lstNormals.push_back( p->GetNormal()[0] );
+ lstNormals.push_back( p->GetNormal()[1] );
+ lstNormals.push_back( p->GetNormal()[2] );
+ } // for i
+ bbSetOutputPointsOut(lstPoints);
+ bbSetOutputNormalsOut(lstNormals);
+ } // Type ==2
+ }// Planes
+ printf("EED Planes_ImplicitFunction::Process End \n");
+
+}
+//=====
+// 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 Planes_ImplicitFunction::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ bbSetInputType(0);
+ bbSetInputPlanes(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 Planes_ImplicitFunction::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 Planes_ImplicitFunction::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /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 __bbcreaVtkPlanes_ImplicitFunction_h_INCLUDED__
+#define __bbcreaVtkPlanes_ImplicitFunction_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include <vtkPlanes.h>
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT Planes_ImplicitFunction
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(Planes_ImplicitFunction,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(PointsIn,std::vector<double>);
+ BBTK_DECLARE_INPUT(NormalsIn,std::vector<double>);
+ BBTK_DECLARE_INPUT(Type,int);
+ BBTK_DECLARE_INPUT(Planes,vtkPlanes*);
+ BBTK_DECLARE_OUTPUT(PointsOut,std::vector<double>);
+ BBTK_DECLARE_OUTPUT(NormalsOut,std::vector<double>);
+ 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(Planes_ImplicitFunction,bbtk::AtomicBlackBox);
+ BBTK_NAME("Planes_ImplicitFunction");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+ BBTK_INPUT(Planes_ImplicitFunction,PointsIn,"[px1,py1,py1 , px2,py2,pz2,....]",std::vector<double>,"");
+ BBTK_INPUT(Planes_ImplicitFunction,NormalsIn,"[nx1,ny1,ny1 , nx2,ny2,nz2,....]",std::vector<double>,"");
+ BBTK_INPUT(Planes_ImplicitFunction,Type,"(default 0) 0:Nothing 1:Set 2:Get]",int,"");
+ BBTK_INPUT(Planes_ImplicitFunction,Planes,"vtkPlanes (Implicit Function)",vtkPlanes*,"");
+ BBTK_OUTPUT(Planes_ImplicitFunction,PointsOut,"[px1,py1,py1 , px2,py2,pz2,....]",std::vector<double>,"");
+ BBTK_OUTPUT(Planes_ImplicitFunction,NormalsOut,"[px1,py1,py1 , px2,py2,pz2,....]",std::vector<double>,"");
+BBTK_END_DESCRIBE_BLACK_BOX(Planes_ImplicitFunction);
+//=====
+// 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 bbcreaVtk
+
+#endif // __bbcreaVtkPlanes_ImplicitFunction_h_INCLUDED__
+
BBTK_BEGIN_DESCRIBE_BLACK_BOX(PolyDataNormals,bbtk::AtomicBlackBox);
BBTK_NAME("PolyDataNormals");
BBTK_AUTHOR("InfoDev");
- BBTK_DESCRIPTION("No Description.");
+ BBTK_DESCRIPTION("(C++,Python) No Description.");
BBTK_CATEGORY("empty");
BBTK_INPUT(PolyDataNormals,In,"Mesh input",vtkPolyData*,"");
BBTK_INPUT(PolyDataNormals,ComputeType,"(0 default) 0:Cells 1:Points",int,"");
//=====
void StlReader::Process()
{
-
// THE MAIN PROCESSING METHOD BODY
// Here we simply set the input 'In' value to the output 'Out'
// And print out the output value
// (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')
-
vtkSTLReader *reader = vtkSTLReader::New();
reader->SetFileName( bbGetInputFileName().c_str() );
reader->Update();
bbSetOutputOut( reader->GetOutput() );
-
}
-//=====
+
+//=====
// 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 StlReader::bbUserSetDefaultValues()
{
-
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
bbSetOutputOut(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 StlReader::bbUserInitializeProcessing()
{
-
// THE INITIALIZATION METHOD BODY :
// Here does nothing
// but this is where you should allocate the internal/output pointers
-// if any
-
-
+// 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 StlReader::bbUserFinalizeProcessing()
{
-
// THE FINALIZATION METHOD BODY :
// Here does nothing
// but this is where you should desallocate the internal/output pointers
// if any
-
}
-}
-// EO namespace bbcreaVtk
+
+}// EO namespace bbcreaVtk
BBTK_BEGIN_DESCRIBE_BLACK_BOX(StlReader,bbtk::AtomicBlackBox);
BBTK_NAME("StlReader");
BBTK_AUTHOR("InfoDev");
- BBTK_DESCRIPTION("No Description.");
+ BBTK_DESCRIPTION("(C++,Python) No Description.");
BBTK_CATEGORY("empty");
BBTK_INPUT(StlReader,FileName,"File Name",std::string,"");
BBTK_OUTPUT(StlReader,Out,"vtkPolyData",vtkPolyData*,"");
//=====
// 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 bbcreaVtk
+
+}// EO namespace bbcreaVtk
#endif // __bbcreaVtkStlReader_h_INCLUDED__