]> Creatis software - bbtk.git/blob - packages/wxvtk/src/bbwxvtkViewer2D.h
36bc9cba428020f6e4acf686e18c5b8d34656641
[bbtk.git] / packages / wxvtk / src / bbwxvtkViewer2D.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbwxvtkViewer2D.h,v $
5   Language:  C++
6   Date:      $Date: 2009/09/17 11:17:19 $
7   Version:   $Revision: 1.18 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*//**
18  * \brief Short description in one line
19  * 
20  * Long description which 
21  * can span multiple lines
22  */
23 /**
24  * \file 
25  * \brief 
26  */
27 /**
28  * \class Viewer2D
29  * \brief 
30  */
31
32 #ifdef USE_WXWIDGETS
33 #ifdef USE_VTK
34
35 #ifndef __bbwxvtkViewer2D_h__
36 #define __bbwxvtkViewer2D_h__
37
38 #include "vtkImageData.h"
39 #include "wxvtkImageViewer2.h"
40 #include "vtkImplicitPlaneWidget.h"
41
42 #include "bbtkWxBlackBox.h"
43 #include "wxVTKRenderWindowInteractor.h"
44
45 namespace bbwxvtk
46 {
47   //------------------------------------------------------------------------
48   //------------------------------------------------------------------------
49   //------------------------------------------------------------------------
50   
51   class /*BBTK_EXPORT*/ Viewer2D : public bbtk::WxBlackBox
52   {    
53     BBTK_BLACK_BOX_INTERFACE(Viewer2D,bbtk::WxBlackBox);
54     
55     BBTK_DECLARE_INPUT(Slice,       int);
56     BBTK_DECLARE_INPUT(Interpolate, bool);  // JP
57     BBTK_DECLARE_INPUT(Orientation, int);    
58     BBTK_DECLARE_INPUT(In,          vtkImageData *);
59     BBTK_DECLARE_OUTPUT(Out,        int);
60     
61     BBTK_DECLARE_OUTPUT(Renderer,vtkRenderer*);
62     BBTK_PROCESS(Process);
63     BBTK_CREATE_WIDGET(CreateWidget);
64     //   BBTK_ON_SHOW_WIDGET(OnShowWidget);
65     
66     void Process();
67     void CreateWidget(wxWindow*);
68     //    void OnShowWidget();
69
70   };
71    
72   //=================================================================
73   // UserBlackBox description
74   BBTK_BEGIN_DESCRIBE_BLACK_BOX(Viewer2D,bbtk::WxBlackBox);
75   BBTK_NAME("Viewer2D");
76   BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
77   BBTK_DESCRIPTION("2D Viewer widget (vtk)");
78   BBTK_CATEGORY("viewer");
79   BBTK_INPUT(Viewer2D, Slice,       "Initial Slice number",                     int,            "");
80   BBTK_INPUT(Viewer2D, Orientation, "Slicing orientation : 0:yz / 1:xz / 2:xy", int,            "");
81   BBTK_INPUT(Viewer2D, Interpolate, "Pixels interpolation: true/false        ", bool,           ""); // JP
82   BBTK_INPUT(Viewer2D, In,          "Input Image",                              vtkImageData *, "");
83   BBTK_OUTPUT(Viewer2D,Out,         "Current Slice number",                     int,            "");
84   BBTK_OUTPUT(Viewer2D,Renderer,    "vtk Renderer",                             vtkRenderer*,   "");
85   BBTK_END_DESCRIBE_BLACK_BOX(Viewer2D);
86   //=================================================================
87
88 }//namespace bbwxvtk
89
90 #endif  //__bbwxvtkViewer2D_h__
91
92 #endif //USE_VTK
93 #endif //USE_WXWIDGETS