connect reslice1.Out slice1.In
set slice1.Z "1"
+new Viewer2D viewer2d
+ connect reslice1.Out viewer2d.In
+ set viewer2d.Slice "1"
-#new ViewerNV viewer3
- #connect reslice1.Out viewer3.In
- #set viewer3.nTypeView "6"
- #set viewer3.WinWidth "600"
-
-new Viewer2D viewer3
+new ViewerNV viewer3
connect reslice1.Out viewer3.In
- set viewer3.Slice "1"
+ set viewer3.nTypeView "6"
+ set viewer3.WinWidth "600"
+
+
#Multiple inputs for managing the interaction
connect viewer1.BoxChange mult.In4
connect viewer2.BoxChange mult.In5
connect mult.BoxChange viewer3.BoxExecute
+ connect mult.BoxChange viewer2d.BoxExecute
#new CommandButton botonfinal
#set botonfinal.Label "Set Information"
new LayoutSplit main
set main.WinWidth "1200"
- set main.Proportion "100"
+ set main.Proportion "50"
set main.Orientation H
connect window1.Widget main.Widget1
connect viewer3.Widget main.Widget2
#include "bbPackRecalageCalculateVectorBox.h"
#include "bbPackRecalagePackage.h"
+
+#include <string>
+
namespace bbPackRecalage
{
BBTK_BLACK_BOX_IMPLEMENTATION(CalculateVectorBox,bbtk::AtomicBlackBox);
void CalculateVectorBox::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(bbGetInputLabels1()[0].compare("") != 0)
+ {
+ std::vector<float> newX1;
+ newX1.push_back((float)bbGetInputPointsX1()[0]);
+ std::vector<float> newX2;
+ newX2.push_back((float)bbGetInputPointsX2()[0]);
+ }
}
void CalculateVectorBox::bbUserSetDefaultValues()
{
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
- //bbSetInputIn(0);
-
+ /*
+ std::vector<std::string> nuevo("","");
+ bbSetInputLabels1(nuevo);*/
}
void CalculateVectorBox::bbUserInitializeProcessing()
{
// THE FINALIZATION METHOD BODY :
// Here does nothing
// but this is where you should desallocate the internal/output pointers
-// if any
-
+// if any
+ image->Delete();
+ slicer->Delete();
+ imageResult->Delete();
}
}
// EO namespace bbPackRecalage
\ No newline at end of file
*/
void Transformer::Run()
{
+ _transform->Identity();
_transform->Translate(_centerPoint[0], _centerPoint[1], _centerPoint[2]);
_transform->Scale(_scaleX, _scaleY,_scaleZ);
_transform->RotateWXYZ(_angle, 0, 0, 1);
VectorMath::VectorMath()
{
+ //_math = vtkMath::new();
+}
-}
\ No newline at end of file
+VectorMath::~VectorMath()
+{
+ if (_math != NULL ) { _math->Delete(); }
+}
+
+void VectorMath::SetData(std::vector<int> pointsX1, std::vector<int> pointsX2, std::vector<int> pointsY1, std::vector<int> pointsY2, std::vector<int> pointsZ1, std::vector<int> pointsZ2)
+{
+ _pointx1a = pointsX1[0];
+ _pointx1b = pointsX1[1];
+
+ _pointx2a = pointsX2[0];
+ _pointx2b = pointsX2[1];
+
+ _pointy1a = pointsY1[0];
+ _pointy1b = pointsY1[1];
+
+ _pointy2a = pointsY2[0];
+ _pointy2b = pointsY2[1];
+
+ _pointz1a = pointsZ1[0];
+ _pointz1b = pointsZ1[1];
+
+ _pointz2a = pointsZ2[0];
+ _pointz2b = pointsZ2[1];
+}
+/*
+
+int[3]* VectorMath::GetPoints()
+{
+
+}
+
+double[3]* VectorMath::GetScales()
+{
+
+}
+
+double VectorMath::GetAngle()
+{
+
+}*/
\ No newline at end of file
public:
VectorMath();
~VectorMath();
- /*void SetTransform(vtkTransform *transform);
- void SetCenterPoint(std::vector<int> point);
- void SetAngle(double angle);
- void SetScaleX(double scaleX);
- void SetScaleY(double scaleY);
- void SetScaleZ(double scaleZ);
+ void SetData(std::vector<int> pointsX1, std::vector<int> pointsX2, std::vector<int> pointsY1, std::vector<int> pointsY2, std::vector<int> pointsZ1, std::vector<int> pointsZ2);
void Run();
- vtkTransform *GetResult();
+ /*
+ int[3]* GetPoints();
+ double[3]* GetScales();
+ double GetAngle();*/
private:
- std::vector<int> _centerPoint;
- double _angle;
- double _scaleX;
- double _scaleY;
- double _scaleZ;
- //vtkImageData *_image;
- vtkTransform *_transform;*/
+ //float[3] _points;
+
+ int _pointx1a;
+ int _pointx1b;
+ int _pointx2a;
+ int _pointx2b;
+
+ int _pointy1a;
+ int _pointy1b;
+ int _pointy2a;
+ int _pointy2b;
+
+ int _pointz1a;
+ int _pointz1b;
+ int _pointz2a;
+ int _pointz2b;
+
+ vtkMath *_math;
};
#endif
\ No newline at end of file