X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk%2Fsrc%2FbbmaracasvisuShowNPoints.h;h=c890f13066389ef4fcaf16b8cee25f1da2b6d9cf;hb=454905f2d2422c6a7d128bd2e70ba0dc6b8832a6;hp=46ab8b9f3a58c659e675dbf4c8aaf68554250a7f;hpb=4df00b156385a2dd881c35fd7561ef9eb0885ee0;p=creaMaracasVisu.git diff --git a/bbtk/src/bbmaracasvisuShowNPoints.h b/bbtk/src/bbmaracasvisuShowNPoints.h index 46ab8b9..c890f13 100644 --- a/bbtk/src/bbmaracasvisuShowNPoints.h +++ b/bbtk/src/bbmaracasvisuShowNPoints.h @@ -5,8 +5,10 @@ #include "vtkActor.h" +#include "vtkSphereSource.h" #include "vtkImageData.h" #include "vtkRenderer.h" +#include "vtkTextActor3D.h" namespace bbcreaMaracasVisu { @@ -20,12 +22,15 @@ namespace bbcreaMaracasVisu WidgetShowNPoints( wxWindow *parent, ShowNPoints *box); ~WidgetShowNPoints(); void OnAddPoint(wxCommandEvent &event); - void ErasePoint(int id); + void OnRenamePoint(wxCommandEvent& event); void OnErasePoint(wxCommandEvent& event); void OnEraseLastPoint(wxCommandEvent &event); void OnDeleteAllPoints(wxCommandEvent &event); + void OnSavePoints(wxCommandEvent &event); + void OnLoadPoints(wxCommandEvent &event); + + void UpdatePoints(wxCommandEvent &event); - void SetOutputBox(); void SetPoint(std::vector ppoint); void SetColour(std::vector colour); void SetOpacity(double opacity); @@ -38,24 +43,37 @@ namespace bbcreaMaracasVisu std::vector GetLstLabels(); private: - ShowNPoints *mbbShowNPoints; - vtkRenderer *renderer; - std::vector lstPointsX; - std::vector lstPointsY; - std::vector lstPointsZ; - std::vector lstLabels; - std::vector lstActorsSphere; - std::vector lstActorsText; - - std::vector mpoint; - vtkImageData *mimage; - std::vector mcolour; - double mopacity; - double mradio; - wxTextCtrl *textCtrl; - }; + void AddPoint(int x, int y, int z, std::string label); + std::string CleanSpaces(std::string ss); + int GetNearestPoint(); + void ErasePoint(int id); + void SetOutputBox(); + + ShowNPoints *mbbShowNPoints; + vtkRenderer *renderer; + std::vector lstPointsX; + std::vector lstPointsY; + std::vector lstPointsZ; + std::vector lstLabels; + std::vector lstActorsSphere;//NTU changed from prop3D to Actor + std::vector lstActorsText; + + //NTU: For updating points + std::vector lstSourceSphere; + + std::vector mpoint; + vtkImageData *mimage; + std::vector mcolour; + double mopacity; + double mradio; + wxStaticText *askPointLabel; + wxTextCtrl *textCtrl; + wxStaticText *txtNrPoints; + wxSlider *sdrOpacity; + wxSlider *sdrRadio; + }; class /*BBTK_EXPORT*/ ShowNPoints : @@ -103,4 +121,3 @@ BBTK_END_DESCRIBE_BLACK_BOX(ShowNPoints); #endif // __bbcreaMaracasVisuShowNPoints_h_INCLUDED__ #endif // _USE_WXWIDGETS_ -