Fraxinus  18.10
An IGT application
cxAngleCorrectionWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) 2008-2014, SINTEF Department of Medical Technology
5 All rights reserved.
6 
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions are met:
9 
10 1. Redistributions of source code must retain the above copyright notice,
11  this list of conditions and the following disclaimer.
12 
13 2. Redistributions in binary form must reproduce the above copyright notice,
14  this list of conditions and the following disclaimer in the documentation
15  and/or other materials provided with the distribution.
16 
17 3. Neither the name of the copyright holder nor the names of its contributors
18  may be used to endorse or promote products derived from this software
19  without specific prior written permission.
20 
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 =========================================================================*/
32 
33 #ifndef CXANGLECORRECTIONWIDGET_H_
34 #define CXANGLECORRECTIONWIDGET_H_
35 
36 
37 #include "cxBaseWidget.h"
38 #include <QPushButton>
40 #include "cxFileSelectWidget.h"
41 #include "cxDataSelectWidget.h"
42 #include "cxUSAcqusitionWidget.h"
45 #include "cxXmlOptionItem.h"
47 #include "org_custusx_anglecorrection_Export.h"
48 
49 
50 class QVBoxLayout;
51 
52 namespace cx
53 {
54 
66 class org_custusx_anglecorrection_EXPORT AngleCorrectionWidget : public BaseWidget
67 {
68  Q_OBJECT
69 public:
70  AngleCorrectionWidget(VisServicesPtr visServices, QWidget* parent) ;
71  virtual ~AngleCorrectionWidget();
72  void setInput();
73  void setClSmoothing(double value);
74  void setMaxThetaCutoff(double value);
75  void setUncertaintyLimit(double value);
76  void setMinArrowDist(double value);
77  void setVNyq(double value);
78  void setClData(QString value);
79  MeshPtr getOutData() const;
80  bool isRunning();
81 
82 public slots:
83  void runAngleCorection();
84  void patientChangedSlot();
85  void selectVelData(QString filename);
86  void toggleDetailsSlot();
87  void cLDataChangedSlot();
88 
89 private slots:
90  void preprocessExecuter();
91  void executionFinished();
92  void step1ParamChangedSlot();
93  void step2ParamChangedSlot();
94 
95 private:
96 
97  bool execute();
98  XmlOptionFile mSettings;
99 
100  VisServicesPtr mVisServices;
101  FileSelectWidget* mVelFileSelectWidget;
102  StringPropertySelectMeshPtr mClDataSelectWidget;
103 
104  QString defaultWhatsThis() const;
105  QVBoxLayout* mVerticalLayout;
106  QPushButton* mRunAngleCorrButton;
107  QWidget* createOptionsWidget();
108  QWidget* mOptionsWidget;
109 
110 
111  DoublePropertyPtr mClSmoothing;
112  DoublePropertyPtr mMaxThetaCutoff;
113  DoublePropertyPtr mUncertaintyLimit;
114  DoublePropertyPtr mMinArrowDist;
115  double mVNyq;
116  MeshPtr mOutData;
117 
118  StringPropertySelectMeshPtr mOutDataSelectWidget;
119  TimedAlgorithmProgressBar* mTimedAlgorithmProgressBar;
120 
121  AngleCorrectionExecuterPtr mExecuter;
122 
123  QString mUid;
124  QString mName;
125  bool mStep1ParamChanged;
126 };
127 
128 } /* namespace cx */
129 
130 #endif /* CXAngleCorrectionWIDGET_H_ */
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
Show progress for a TimedBaseAlgorithm.
boost::shared_ptr< class AngleCorrectionExecuter > AngleCorrectionExecuterPtr
boost::shared_ptr< class DoubleProperty > DoublePropertyPtr
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:88
boost::shared_ptr< class Mesh > MeshPtr
boost::shared_ptr< class StringPropertySelectMesh > StringPropertySelectMeshPtr
Helper class for xml files used to store ssc/cx data.
Widget for displaying and selecting a single file.
Namespace for all CustusX production code.