43 if (hemi == 0 || hemi == 1) {
46 }
else if (hemi == 2) {
59 if (hemi == 0 || hemi == 1) {
62 }
else if (hemi == 2) {
74 if (p_LHAnnotation.
hemi() == 0)
75 m_qMapAnnots.insert(0, p_LHAnnotation);
77 qWarning(
"Left hemisphere id is not 0. LH annotation not assigned!");
79 if (p_RHAnnotation.
hemi() == 1)
80 m_qMapAnnots.insert(1, p_RHAnnotation);
82 qWarning(
"Right hemisphere id is not 1. RH annotation not assigned!");
91 *
this = t_AnnotationSet;
108 qint32 hemi = p_Annotation.
hemi();
109 m_qMapAnnots.remove(hemi);
111 m_qMapAnnots.insert(hemi, p_Annotation);
118 p_AnnotationSet.
clear();
120 QStringList t_qListFileName;
121 t_qListFileName << p_sLHFileName << p_sRHFileName;
123 for (qint32 i = 0; i < t_qListFileName.size(); ++i) {
126 if (t_qListFileName[i].contains(
"lh."))
127 p_AnnotationSet.m_qMapAnnots.insert(0, t_Annotation);
128 else if (t_qListFileName[i].contains(
"rh."))
129 p_AnnotationSet.m_qMapAnnots.insert(1, t_Annotation);
135 if (p_AnnotationSet.m_qMapAnnots.isEmpty())
144 QList<FsLabel>& p_qListLabels,
145 QList<RowVector4i>& p_qListLabelRGBAs,
146 const QStringList& lLabelPicks)
const
148 if (!m_qMapAnnots[0].
toLabels(p_surfSet[0], p_qListLabels, p_qListLabelRGBAs, lLabelPicks))
150 else if (!m_qMapAnnots[1].
toLabels(p_surfSet[1], p_qListLabels, p_qListLabelRGBAs, lLabelPicks))
161 return m_qMapAnnots[idx];
163 return m_qMapAnnots[idx];
165 qWarning(
"Warning: Index is not '0' or '1'! Returning '0'.");
166 return m_qMapAnnots[0];
175 return m_qMapAnnots[idx];
177 return m_qMapAnnots[idx];
179 qWarning(
"Warning: Index is not '0' or '1'! Returning '0'.");
180 return m_qMapAnnots[0];
188 if (idt.compare(
"lh") == 0)
189 return m_qMapAnnots[0];
190 else if (idt.compare(
"rh") == 0)
191 return m_qMapAnnots[1];
193 qWarning(
"Warning: Identifier is not 'lh' or 'rh'! Returning 'lh'.");
194 return m_qMapAnnots[0];
202 if (idt.compare(
"lh") == 0)
203 return m_qMapAnnots[0];
204 else if (idt.compare(
"rh") == 0)
205 return m_qMapAnnots[1];
207 qWarning(
"Warning: Identifier is not 'lh' or 'rh'! Returning 'lh'.");
208 return m_qMapAnnots[0];
Bi-hemispheric pair of FreeSurfer annotations (lh + rh) for one parcellation atlas.
Bi-hemispheric grouping of FreeSurfer surfaces (lh + rh) loaded as a single object.
FreeSurfer surface, annotation and parcellation I/O for mne-cpp.
Single-hemisphere FreeSurfer parcellation: vertex → region label plus embedded colortable.
static bool read(const QString &subject_id, qint32 hemi, const QString &atlas, const QString &subjects_dir, FsAnnotation &p_Annotation)
bool toLabels(const FsSurfaceSet &p_surfSet, QList< FsLabel > &p_qListLabels, QList< Eigen::RowVector4i > &p_qListLabelRGBAs, const QStringList &lLabelPicks=QStringList()) const
FsAnnotation & operator[](qint32 idx)
static bool read(const QString &p_sLHFileName, const QString &p_sRHFileName, FsAnnotationSet &p_AnnotationSet)
void insert(const FsAnnotation &p_Annotation)
Container holding the lh and/or rh FsSurface for one subject and one surface kind.