1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18 #ifndef VVTOOLPROFILE_H
19 #define VVTOOLPROFILE_H
22 #if QT_VERSION >= 0x050000
23 #include <QtUiPlugin/QDesignerExportWidget>
25 #include <QtDesigner/QDesignerExportWidget>
28 #include "vvToolBase.h"
29 #include "vvToolWidgetBase.h"
30 #include "vvImageContour.h"
31 #include "vvLandmarks.h"
32 #include <vtkVersion.h>
33 #if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9
34 #include "ui_vvToolProfile.h"
36 #include "ui_vvToolProfileVTK7.h"
38 #include "vvBinaryImageOverlayActor.h"
40 #include "clitkProfileImage_ggo.h"
41 #include "clitkProfileImageGenericFilter.h"
43 #include <vtkContextView.h>
44 #include <vtkContextScene.h>
45 #include <vtkTransformPolyDataFilter.h>
47 //------------------------------------------------------------------------------
49 public vvToolWidgetBase,
50 public vvToolBase<vvToolProfile>,
51 private Ui::vvToolProfile
55 vvToolProfile(vvMainWindowBase * parent=0, Qt::WindowFlags f=0);
58 //-----------------------------------------------------
59 static void Initialize();
60 void InitializeLine();
61 void GetArgsInfoFromGUI();
62 virtual void InputIsSelected(vvSlicerManager * m);
64 bool isPointsSelected();
65 void computeProfile();
68 //-----------------------------------------------------
72 virtual void reject();
78 void DisplayLine(int);
82 void RemoveVTKObjects();
83 virtual void closeEvent(QCloseEvent *event);
85 args_info_clitkProfileImage mArgsInfo;
91 vtkSmartPointer<vtkContextView> mView;
92 clitk::ProfileImageGenericFilter::Pointer mFilter;
93 std::string mTextFileName;
94 std::vector<vtkSmartPointer<vtkActor> > mLineActors;
95 vtkSmartPointer<vtkPolyData> mLinesPolyData;
96 vtkSmartPointer<vtkTransformPolyDataFilter> mLineTransform;
99 }; // end class vvToolProfile
100 //------------------------------------------------------------------------------