1 /*=========================================================================
4 Module: $RCSfile: bbwxvtkViewer2D.h,v $
6 Date: $Date: 2008/06/17 11:12:03 $
7 Version: $Revision: 1.5 $
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.
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.
17 =========================================================================*//**
18 * \brief Short description in one line
20 * Long description which
21 * can span multiple lines
33 #ifdef _USE_WXWIDGETS_
37 #ifndef __bbwxvtkViewer2D_h__
38 #define __bbwxvtkViewer2D_h__
40 #include "vtkImageData.h"
41 #include "vtkImageViewer2.h"
42 #include "vtkImplicitPlaneWidget.h"
44 #include "bbtkWxBlackBox.h"
45 #include "wxVTKRenderWindowInteractor.h"
54 //--------------------------------------------------------------------------
55 class Viewer2DWidget : public wxPanel
58 Viewer2DWidget(Viewer2D* box, wxWindow *parent);
63 vtkImageViewer2 *imageViewer;
64 vtkImageData *backImageData;
65 vtkImageData *mDefaultImage;
66 wxVTKRenderWindowInteractor *wxvtkrenderwindowinteractor;
68 vtkImplicitPlaneWidget * maPlane1, * maPlane2, * mbPlane1, * mbPlane2;
72 //------------------------------------------------------------------------
73 //------------------------------------------------------------------------
74 //------------------------------------------------------------------------
76 class /*BBTK_EXPORT*/ Viewer2D : public bbtk::WxBlackBox
78 BBTK_BLACK_BOX_INTERFACE(Viewer2D,bbtk::WxBlackBox);
79 BBTK_DECLARE_INPUT(Slice,int);
80 BBTK_DECLARE_INPUT(Orientation,int);
81 BBTK_DECLARE_INPUT(In,vtkImageData *);
82 BBTK_DECLARE_OUTPUT(Out,int);
83 BBTK_PROCESS(Process);
85 BBTK_CREATE_WIDGET(CreateWidget);
88 void bbUserConstructor();
91 //=================================================================
92 // UserBlackBox description
93 BBTK_BEGIN_DESCRIBE_BLACK_BOX(Viewer2D,bbtk::WxBlackBox);
94 BBTK_NAME("Viewer2D");
95 BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
96 BBTK_DESCRIPTION("Viewer2D widget (vtk)");
97 BBTK_CATEGORY("viewer");
98 BBTK_INPUT(Viewer2D,Slice,"Position of the slider",int,"");
99 BBTK_INPUT(Viewer2D,Orientation,"Slicing orientation : 0:yz / 1:xz / 2:xy",int,"");
100 BBTK_INPUT(Viewer2D,In,"Input Image",vtkImageData *,"");
101 BBTK_OUTPUT(Viewer2D,Out,"Position of the slider",int,"");
102 BBTK_END_DESCRIBE_BLACK_BOX(Viewer2D);
103 //=================================================================
108 #endif //__bbwxvtkViewer2D_h__
111 #endif //_USE_WXWIDGETS_