Fraxinus  2023.01.05-dev+develop.0da12
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
FilePathPropertyPtr getActiveParameterFile1() const
Parameter and preset handling for the ElastiX registration.
boost::shared_ptr< ElastixParameters > ElastixParametersPtr
boost::shared_ptr< class StringProperty > StringPropertyPtr
boost::shared_ptr< class StringPropertyBase > StringPropertyBasePtr
FilePathPropertyPtr getActiveExecutable() const
boost::shared_ptr< class FilePathProperty > FilePathPropertyPtr
FilePathPropertyPtr getActiveParameterFile0() const
Helper class for xml files used to store ssc/cx data.
Namespace for all CustusX production code.