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//=============================================================================================================
71{
72public:
73 //=========================================================================================================
78
79 //=========================================================================================================
85 bool load(const QString& sParcellationPath);
86
87 //=========================================================================================================
93 QString labelAtRas(const Eigen::Vector3f& ras) const;
94
95 //=========================================================================================================
101 QStringList labelsForPositions(const QVector<Eigen::Vector3f>& positions) const;
102
103 //=========================================================================================================
108 bool isLoaded() const;
109
110private:
111 QVector<int> m_voxelData;
112 int m_dimX = 0;
113 int m_dimY = 0;
114 int m_dimZ = 0;
115
116 Eigen::Matrix4f m_ras2vox;
117
118 QMap<int, QString> m_lookupTable;
119
120 bool m_loaded = false;
121
122 //=========================================================================================================
126 void initLookupTable();
127
128 //=========================================================================================================
134 Eigen::Vector3i rasToVoxel(const Eigen::Vector3f& ras) const;
135};
136
137} // namespace FSLIB
138
139#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.