1 /*=========================================================================
4 Module: $RCSfile: bbwxvtkMIPViewer.h,v $
6 Date: $Date: 2008/03/03 13:14:27 $
7 Version: $Revision: 1.1 $
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
25 * \brief Pattern for the definition of a new type of Node (header)
28 * \class bbtk::NodePatern
29 * \brief Pattern for the definition of a new type of Node
33 #ifdef _USE_WXWIDGETS_
37 #ifndef __bbwxvtkMIPViewer_h_INCLUDED__
38 #define __bbwxvtkMIPViewer_h_INCLUDED__
40 #include "vtkImageData.h"
41 #include "vtkImageViewer2.h"
43 #include "bbtkWxBlackBox.h"
44 #include "wxVTKRenderWindowInteractor.h"
46 #include <vtkImageShiftScale.h>
47 #include <vtkVolumeRayCastMIPFunction.h>
48 #include <vtkVolumeRayCastMapper.h>
49 #include <vtkVolume.h>
51 #include <vtkCamera.h>
58 //--------------------------------------------------------------------------
59 class MIPViewerWidget : public wxPanel
62 MIPViewerWidget(MIPViewer* box, wxWindow *parent);
65 vtkRenderWindowInteractor* GetInteractor() { return mRenderWindowInteractor; }
68 vtkImageData *mImageData;
70 wxVTKRenderWindowInteractor *mRenderWindowInteractor;
73 vtkContourFilter* mContourFilter;
74 vtkSmoothPolyDataFilter* mSmoothPolyDataFilter;
75 vtkPolyDataNormals* mPolyDataNormals;
76 vtkPolyDataMapper* mPolyDataMapper;
78 vtkImageShiftScale* mCast;
79 vtkVolumeRayCastMIPFunction* mMIP;
80 vtkVolumeRayCastMapper* mMapper;
84 vtkRenderer* mRenderer;
85 vtkRenderWindow* mRenderWindow;
88 //------------------------------------------------------------------------
89 //------------------------------------------------------------------------
90 //------------------------------------------------------------------------
92 class /*BBTK_EXPORT*/ MIPViewer : public bbtk::WxBlackBox
94 BBTK_USER_BLACK_BOX_INTERFACE(MIPViewer,bbtk::WxBlackBox);
95 // BBTK_DECLARE_INPUT(Contour,int);
96 BBTK_DECLARE_INPUT(In,vtkImageData *);
97 BBTK_DECLARE_INPUT(Shift,int);
98 BBTK_DECLARE_INPUT(Scale,float);
99 BBTK_DECLARE_OUTPUT(Interactor,vtkRenderWindowInteractor*);
100 BBTK_PROCESS(Process);
102 BBTK_CREATE_WIDGET(CreateWidget);
106 //=================================================================
107 // UserBlackBox description
108 BBTK_BEGIN_DESCRIBE_BLACK_BOX(MIPViewer,bbtk::WxBlackBox);
109 BBTK_NAME("MIPViewer");
110 BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
111 BBTK_DESCRIPTION("Maximum Intensity Projection (MIP) view of a 3D image");
112 BBTK_CATEGORY("viewer");
113 BBTK_INPUT(MIPViewer,Shift,"Gray scale shift",int);
114 BBTK_INPUT(MIPViewer,Scale,"Gray scale scaling",float);
115 BBTK_INPUT(MIPViewer,In,"Input Image",vtkImageData *);
116 BBTK_OUTPUT(MIPViewer,Interactor,"Interactor",vtkRenderWindowInteractor *);
117 BBTK_END_DESCRIBE_BLACK_BOX(MIPViewer);
118 //=================================================================
123 #endif //__bbtwxvtkMIPViewer_h__
126 #endif //_USE_WXWIDGETS_