NorMIT-nav  22.09
An IGT application
cxElastixParameters.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) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 #ifndef CXELASTIXPARAMETERS_H
12 #define CXELASTIXPARAMETERS_H
13 
14 #include <QObject>
15 #include "cxForwardDeclarations.h"
16 #include "cxXmlOptionItem.h"
17 #include "cxStringProperty.h"
18 #include "org_custusx_registration_method_commandline_Export.h"
19 
20 namespace cx
21 {
22 typedef boost::shared_ptr<class FilePathProperty> FilePathPropertyPtr;
23 
36 class org_custusx_registration_method_commandline_EXPORT ElastixParameters : public QObject
37 {
38  Q_OBJECT
39 public:
41  static QString getConfigUid();
42  StringPropertyBasePtr getCurrentPreset();
43  void removeCurrentPreset();
44  void saveCurrentPreset(QString newName);
45 
46  FilePathPropertyPtr getActiveParameterFile0() const { return mActiveParameterFile0; }
47  FilePathPropertyPtr getActiveParameterFile1() const { return mActiveParameterFile1; }
48  FilePathPropertyPtr getActiveExecutable() const { return mActiveExecutable; }
49 
50  QStringList getActiveParameterFiles() const;
51  QString getPresetNameSuggesion() const;
52 
53 signals:
54  void elastixParametersChanged();
55 
56 private slots:
57  void currentPresetChangedSlot();
58 
59 private:
60  bool validParameterFile(QString file) const;
61  void reloadPresets();
62  QString getFullParameterFilename(QString filename);
63  void addDefaultPreset(QString name, QString executable, QStringList parameterFiles);
64  void addDefaultPresets();
65  FilePathPropertyPtr getExecutable();
66  FilePathPropertyPtr getParameterFile(QString uid);
67 
68  StringPropertyPtr mCurrentPreset;
69  FilePathPropertyPtr mActiveExecutable;
70  FilePathPropertyPtr mActiveParameterFile0;
71  FilePathPropertyPtr mActiveParameterFile1;
72  XmlOptionFile mOptions;
73 };
74 typedef boost::shared_ptr<ElastixParameters> ElastixParametersPtr;
75 
79 } /* namespace cx */
80 
81 #endif // CXELASTIXPARAMETERS_H
cx::XmlOptionFile
Helper class for xml files used to store ssc/cx data.
Definition: cxXmlOptionItem.h:78
cx::ElastixParameters::getActiveParameterFile1
FilePathPropertyPtr getActiveParameterFile1() const
Definition: cxElastixParameters.h:47
cx::ElastixParameters::getActiveExecutable
FilePathPropertyPtr getActiveExecutable() const
Definition: cxElastixParameters.h:48
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxForwardDeclarations.h
cx::ElastixParameters
Parameter and preset handling for the ElastiX registration.
Definition: cxElastixParameters.h:36
cxXmlOptionItem.h
cx::StringPropertyPtr
boost::shared_ptr< class StringProperty > StringPropertyPtr
Definition: cxVideoConnectionWidget.h:42
cx::FilePathPropertyPtr
boost::shared_ptr< class FilePathProperty > FilePathPropertyPtr
Definition: cxPlusConnectWidget.h:28
cx::ElastixParametersPtr
boost::shared_ptr< ElastixParameters > ElastixParametersPtr
Definition: cxElastixParameters.h:74
cx::ElastixParameters::getActiveParameterFile0
FilePathPropertyPtr getActiveParameterFile0() const
Definition: cxElastixParameters.h:46
cx::StringPropertyBasePtr
boost::shared_ptr< class StringPropertyBase > StringPropertyBasePtr
Definition: cxIGTLinkStreamerService.h:20
cxStringProperty.h