#ifndef __bbUtilitiesSpline_h_INCLUDED__ #define __bbUtilitiesSpline_h_INCLUDED__ //----------------- // INCLUDES //----------------- #include "bbtkAtomicBlackBox.h" #include "iostream" #include "vtkKochanekSpline.h" //----------------- // CLASS CODE //----------------- namespace bbUtilities { class /*BBTK_EXPORT*/ Spline : public bbtk::AtomicBlackBox { BBTK_BLACK_BOX_INTERFACE(Spline,bbtk::AtomicBlackBox); //================================================================== //================================================================== //CONTROL POINTS BBTK_DECLARE_INPUT(XControlPoints,std::vector); BBTK_DECLARE_INPUT(YControlPoints,std::vector); BBTK_DECLARE_INPUT(ZControlPoints,std::vector); //SPLINE POINTS BBTK_DECLARE_OUTPUT(XSplinePoints,std::vector); BBTK_DECLARE_OUTPUT(YSplinePoints,std::vector); BBTK_DECLARE_OUTPUT(ZSplinePoints,std::vector); BBTK_PROCESS(Process); void Process(); private: /* Vectors where the spline is stored */ std::vector xControlPoints; std::vector yControlPoints; std::vector zControlPoints; /* Vectors where the spline is stored */ std::vector xSpline; std::vector ySpline; std::vector zSpline; /* Kochanek splines */ vtkKochanekSpline* xKSpline; vtkKochanekSpline* yKSpline; vtkKochanekSpline* zKSpline; }; BBTK_BEGIN_DESCRIBE_BLACK_BOX(Spline,bbtk::AtomicBlackBox); BBTK_NAME("Spline"); BBTK_AUTHOR("Monica Lozano"); BBTK_DESCRIPTION("Calculates the spline line from a set of consecutives points"); BBTK_CATEGORY("__CATEGORY__"); // CONTROL POINTS BBTK_INPUT(Spline,XControlPoints,"X Control points from which the spline is calculated",std::vector,""); BBTK_INPUT(Spline,YControlPoints,"Y Control points from which the spline is calculated",std::vector,""); BBTK_INPUT(Spline,ZControlPoints,"Z Control points from which the spline is calculated",std::vector,""); //SPLINE POINTS BBTK_OUTPUT(Spline,XSplinePoints,"The X spline line among the control points",std::vector,""); BBTK_OUTPUT(Spline,YSplinePoints,"The Y spline line among the control points",std::vector,""); BBTK_OUTPUT(Spline,ZSplinePoints,"The Z spline line among the control points",std::vector,""); BBTK_END_DESCRIBE_BLACK_BOX(Spline); } // EO namespace bbUtilities #endif // __bbUtilitiesSpline_h_INCLUDED__