Carna Registration API Version 1.16.0
D:/Documents/mediTEC Projects/CRA/master/include/CRA/Registration.h
00001 /*
00002  *  Copyright (C) 2010 - 2013 Leonid Kostrykin
00003  *
00004  *  Chair of Medical Engineering (mediTEC)
00005  *  RWTH Aachen University
00006  *  Pauwelsstr. 20
00007  *  52074 Aachen
00008  *  Germany
00009  *
00010  */
00011 
00012 #ifndef REGISTRATION_H_2521354512
00013 #define REGISTRATION_H_2521354512
00014 
00015 #include "cra_global.h"
00016 #include "Transformation.h"
00017 #include <set>
00018 #include <memory>
00019 #include <QObject>
00020 
00021 namespace CRA
00022 {
00023 
00024 class Tool;
00025 class Link;
00026 
00027 
00028 
00029 // ----------------------------------------------------------------------------------
00030 // Registration
00031 // ----------------------------------------------------------------------------------
00032 
00042 class CRA_EXPORT Registration : public QObject
00043 {
00044 
00045     Q_OBJECT
00046 
00047 public:
00048 
00051     Registration( Tool& referenceBase );
00052 
00055     ~Registration();
00056 
00057 
00060     void setReferenceBase( Tool& );
00061 
00064     Tool& getReferenceBase() const;
00065 
00066 
00074     void setTransformation( const Transformation& );
00075 
00078     const Transformation& getTransformation() const;
00079 
00080 
00092     void setCustomTranslation( const Vector& );
00093 
00102     void removeCustomTranslation();
00103 
00111     const Vector& getCustomTranslation() const;
00112 
00117     bool hasCustomTranslation() const;
00118 
00119 
00125     void add( const Link& );
00126 
00129     void remove( const Link& );
00130 
00133     const std::set< Link >& getLinks() const
00134     {
00135         return links;
00136     }
00137 
00138 
00145     void updateVirtualElements();
00146 
00147 
00148 signals:
00149 
00152     void transformationChanged();
00153     
00156     void transformationChanged( const Transformation& );
00157 
00158 
00159 private slots:
00160 
00161     void applyCustomTranslation();
00162 
00163     
00164 private:
00165 
00166     Tool* referenceBase;
00167 
00168     Transformation transformation;
00169 
00170     Vector originalTranslation;
00171 
00172     std::set< Link > links;
00173 
00174     std::unique_ptr< Vector > customTranslation;
00175 
00176 }; // Registration
00177 
00178 
00179 
00180 }  // namespace CRA
00181 
00182 #endif // REGISTRATION_H_2521354512
 All Classes Functions Variables Enumerations Enumerator