fw4spl
SOrganTransformation.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2018.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #pragma once
8 
9 #include "uiMedDataQt/config.hpp"
10 
11 #include <fwData/Reconstruction.hpp>
12 #include <fwData/TransformationMatrix3D.hpp>
13 
14 #include <fwGui/editor/IEditor.hpp>
15 
16 #include <QObject>
17 #include <QPointer>
18 
19 #include <map>
20 #include <string>
21 
22 class QListWidget;
23 class QPushButton;
24 class QListWidgetItem;
25 class QComboBox;
26 class QCheckBox;
27 
28 namespace uiMedDataQt
29 {
30 namespace editor
31 {
32 
46 class UIMEDDATAQT_CLASS_API SOrganTransformation : public QObject,
48 {
49 Q_OBJECT
50 public:
51 
53 
55  UIMEDDATAQT_API SOrganTransformation() noexcept;
57  UIMEDDATAQT_API virtual ~SOrganTransformation() noexcept;
58 
59 protected:
60 
61  UIMEDDATAQT_API virtual void configuring() override;
62  UIMEDDATAQT_API virtual void starting() override;
63  UIMEDDATAQT_API virtual void stopping() override;
64  UIMEDDATAQT_API virtual void swapping() override;
65  UIMEDDATAQT_API virtual void updating() override;
66  UIMEDDATAQT_API virtual void info( ::std::ostream& stream ) override;
67 
80  UIMEDDATAQT_API virtual KeyConnectionsMap getAutoConnections() const override;
81 
82 private Q_SLOTS:
83  void onReconstructionCheck(QListWidgetItem* currentItem);
84  void onResetClick();
85  void onSaveClick();
86  void onLoadClick();
87 
89  void onSelectAllChanged(int state);
90 
91 private:
92 
93  void refresh();
94  void notitfyTransformationMatrix(::fwData::TransformationMatrix3D::sptr aTransMat);
95 
97  void addMeshTransform();
98 
99  // ReconstructionMapType
100  typedef ::std::map< ::std::string, ::fwData::Reconstruction::sptr > ReconstructionMapType;
101  typedef ::std::map< ::std::string, ::fwData::TransformationMatrix3D::sptr> InnerMatMappingType;
102  typedef ::std::map< ::std::string, InnerMatMappingType> SaveMappingType;
103 
104  ReconstructionMapType m_reconstructionMap;
105  QPointer< QPushButton > m_saveButton;
106  QPointer< QPushButton > m_loadButton;
107  QPointer< QPushButton > m_resetButton;
108  QPointer< QListWidget > m_reconstructionListBox;
109  QPointer< QComboBox > m_saveSelectionComboBox;
110  QPointer< QCheckBox > m_selectAllCheckBox;
111 
112  //variables for the functionalities of saving & loading
113  SaveMappingType m_saveListing;
114  unsigned int m_saveCount;
115 };
116 
117 } // namespace editor
118 } // namespace uiMedDataQt
Display the organs list and allow an interactive selection to set the corresponding meshes in a compo...
The namespace uiMedDataQt contains editors for medical data.
This class is a helper to define the connections of a service and its data.
Definition: IService.hpp:454
Defines the service interface managing the editor service for object.
Definition: IEditor.hpp:25
STL namespace.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
Contains the representation of the data objects used in the framework.