]> Creatis software - creaMaracasVisu.git/blobdiff - bbtk/src/bbmaracasvisuShowNPoints.h
2392 creaMaracasVisu Feature New Normal InsertPoint in showNPoints 2014-06-13 11:13
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuShowNPoints.h
index 86812890a9410dd36ecda92e69a3ae81bc28a3d1..5879aed318617f9c7d64f80c02d0bddc2c859a11 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef __bbcreaMaracasVisuShowNPoints_h_INCLUDED__
 #define __bbcreaMaracasVisuShowNPoints_h_INCLUDED__
 #include "bbtkWxBlackBox.h"
-
+#include <cmath>
 
 #include "vtkActor.h"
 #include "vtkSphereSource.h"
@@ -47,6 +47,7 @@ namespace bbcreaMaracasVisu
          WidgetShowNPoints( wxWindow *parent,  ShowNPoints *box);
          ~WidgetShowNPoints(); 
          void OnAddPoint(wxCommandEvent &event);   
+               void OnInsertPoint (wxCommandEvent& event);//CFT
          void OnSetPoint(wxCommandEvent& event);
          void OnRenamePoint(wxCommandEvent& event);
          void OnErasePoint(wxCommandEvent& event);
@@ -69,8 +70,10 @@ namespace bbcreaMaracasVisu
          std::vector<int> GetLstPointsZ();
          std::vector<std::string> GetLstLabels();
 
-         void                  AddPoint(int x, int y, int z, std::string label);
-         
+         void AddPoint(int x, int y, int z, std::string label);
+               void InsertPoint(int x, int y, int z, std::string label);//CFT
+               double Distance(double dX0, double dY0, double dZ0, double dX1, double dY1, double dZ1);//CFT
+
   private:
 
          std::string           CleanSpaces(std::string ss);
@@ -102,6 +105,7 @@ namespace bbcreaMaracasVisu
          wxStaticText          *txtNrPoints;
          wxSlider              *sdrOpacity;
          wxSlider              *sdrRadio;
+
   };
 
 class /*BBTK_EXPORT*/ ShowNPoints
@@ -138,8 +142,8 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ShowNPoints,bbtk::WxBlackBox);
   BBTK_INPUT(ShowNPoints,Renderer,"Renderer",vtkRenderer*,"");
   BBTK_INPUT(ShowNPoints,Image,"vktkImageData",vtkImageData*,"");
   BBTK_INPUT(ShowNPoints,Colour,"Colour of the actor",std::vector<double>,"colour");
-  BBTK_INPUT(ShowNPoints,Opacity,"Opacity of the actor",double,"");
-  BBTK_INPUT(ShowNPoints,Radio,"Radio of the spheres",double,"");
+  BBTK_INPUT(ShowNPoints,Opacity,"Opacity of the actor 0..1 (default 1)",double,"");
+  BBTK_INPUT(ShowNPoints,Radio,"Radio of the spheres 1..50 (default 10)",double,"");
   BBTK_INPUT(ShowNPoints,Type,"Type of the widget. 0(default): N-points, 1:Just one point",int,"");
   BBTK_OUTPUT(ShowNPoints , lstPointsX , " list of points X ", std::vector<int> ,"");
   BBTK_OUTPUT(ShowNPoints , lstPointsY , " list of points Y ", std::vector<int> ,"");