v2.0.0
Loading...
Searching...
No Matches
fs_atlas_lookup.h
Go to the documentation of this file.
1//=============================================================================================================
27
28#ifndef FS_ATLAS_LOOKUP_H
29#define FS_ATLAS_LOOKUP_H
30
31//=============================================================================================================
32// INCLUDES
33//=============================================================================================================
34
35#include "fs_global.h"
36
37//=============================================================================================================
38// EIGEN INCLUDES
39//=============================================================================================================
40
41#include <Eigen/Core>
42
43//=============================================================================================================
44// QT INCLUDES
45//=============================================================================================================
46
47#include <QString>
48#include <QStringList>
49#include <QMap>
50#include <QVector>
51
52//=============================================================================================================
53// DEFINE NAMESPACE FSLIB
54//=============================================================================================================
55
56namespace FSLIB
57{
58
59//=============================================================================================================
69{
70public:
71 //=========================================================================================================
76
77 //=========================================================================================================
83 bool load(const QString& sParcellationPath);
84
85 //=========================================================================================================
91 QString labelAtRas(const Eigen::Vector3f& ras) const;
92
93 //=========================================================================================================
99 QStringList labelsForPositions(const QVector<Eigen::Vector3f>& positions) const;
100
101 //=========================================================================================================
106 bool isLoaded() const;
107
108private:
109 QVector<int> m_voxelData;
110 int m_dimX = 0;
111 int m_dimY = 0;
112 int m_dimZ = 0;
113
114 Eigen::Matrix4f m_ras2vox;
115
116 QMap<int, QString> m_lookupTable;
117
118 bool m_loaded = false;
119
120 //=========================================================================================================
124 void initLookupTable();
125
126 //=========================================================================================================
132 Eigen::Vector3i rasToVoxel(const Eigen::Vector3f& ras) const;
133};
134
135} // namespace FSLIB
136
137#endif // FS_ATLAS_LOOKUP_H
Export/import macros and build-info accessors for the FSLIB FreeSurfer I/O library.
#define FSSHARED_EXPORT
Definition fs_global.h:38
FreeSurfer surface, annotation and parcellation I/O for mne-cpp.
QString labelAtRas(const Eigen::Vector3f &ras) const
Look up the anatomical label at a RAS coordinate.
bool isLoaded() const
Check whether a parcellation volume has been loaded.
bool load(const QString &sParcellationPath)
Load a FreeSurfer MGH/MGZ volume parcellation.
QStringList labelsForPositions(const QVector< Eigen::Vector3f > &positions) const
Look up labels for multiple RAS positions.