1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
26 #ifdef _USE_WXWIDGETS_
27 #ifndef __bbcreaMaracasVisuViewerMPR_h_INCLUDED__
28 #define __bbcreaMaracasVisuViewerMPR_h_INCLUDED__
29 #include "bbtkWxBlackBox.h"
31 #include "wxMaracasMPR.h"
32 #include "vtkImageData.h"
33 #include "vtkRenderer.h"
34 #include "wxMPRWidget2.h"
36 namespace bbcreaMaracasVisu
41 //--------------------------------------------------------------------------
43 class wxWidgetMPR : public wxPanel
46 wxWidgetMPR(ViewerMPR* box,wxWindow* parent, marImageData *marimagedata=NULL);
49 //if the MPR had generated the refresh event
50 void OnRefreshView(wxCommandEvent & event);
51 void OnDClickLeft(wxCommandEvent & event);
53 //Get the actual Point
54 std::vector <int> GetPoint();
56 vtkRenderer* GetRenderer();
61 void setImageData(vtkImageData* img);
66 ViewerMPR *mbbViewerMPR;
67 wxMPRWidget2 *wxwidget;
68 std::vector<int> point;
70 DECLARE_EVENT_TABLE( );
74 //------------------------------------------------------------------------
75 //------------------------------------------------------------------------
76 //------------------------------------------------------------------------
80 class /*BBTK_EXPORT*/ ViewerMPR
82 public bbtk::WxBlackBox
84 BBTK_BLACK_BOX_INTERFACE(ViewerMPR,bbtk::WxBlackBox);
85 BBTK_DECLARE_INPUT(Title,std::string);
86 BBTK_DECLARE_INPUT(In, vtkImageData *);
87 BBTK_DECLARE_OUTPUT(Renderer,vtkRenderer *);
88 BBTK_DECLARE_OUTPUT(Point,std::vector<int>);
89 BBTK_PROCESS(Process);
91 BBTK_CREATE_WIDGET(CreateWidget);
92 void CreateWidget(wxWindow* parent);
95 wxWidgetMPR *wxwidget;
99 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ViewerMPR,bbtk::WxBlackBox);
100 BBTK_NAME("ViewerMPR");
101 BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
102 BBTK_DESCRIPTION("Maracas viewer MPR + 3D");
103 BBTK_CATEGORY("viewer");
104 BBTK_INPUT(ViewerMPR,Title,"Viewer MPR + 3D",std::string,"");
105 BBTK_INPUT(ViewerMPR,In,"Input image",vtkImageData*,"");
106 BBTK_OUTPUT(ViewerMPR,Renderer," This object accept actors of vtk type (ex. AddActor). ",vtkRenderer*,"");
107 BBTK_OUTPUT(ViewerMPR,Point," This is the point choose by the user ",std::vector<int>,"");
109 BBTK_END_DESCRIBE_BLACK_BOX(ViewerMPR);
111 // EO namespace bbcreaMaracasVisu
113 #endif // __bbcreaMaracasVisuViewerMPR_h_INCLUDED__
114 #endif // _USE_WXWIDGETS_