43 if(hemi == 0 || hemi == 1)
62 if(hemi == 0 || hemi == 1)
80 if(p_LHAnnotation.
hemi() == 0)
81 m_qMapAnnots.insert(0, p_LHAnnotation);
83 qWarning(
"Left hemisphere id is not 0. LH annotation not assigned!");
85 if(p_RHAnnotation.
hemi() == 1)
86 m_qMapAnnots.insert(1, p_RHAnnotation);
88 qWarning(
"Right hemisphere id is not 1. RH annotation not assigned!");
97 *
this = t_AnnotationSet;
104 m_qMapAnnots.
clear();
114 qint32 hemi = p_Annotation.
hemi();
115 m_qMapAnnots.remove(hemi);
117 m_qMapAnnots.insert(hemi, p_Annotation);
124 p_AnnotationSet.
clear();
126 QStringList t_qListFileName;
127 t_qListFileName << p_sLHFileName << p_sRHFileName;
129 for(qint32 i = 0; i < t_qListFileName.size(); ++i)
134 if(t_qListFileName[i].contains(
"lh."))
135 p_AnnotationSet.m_qMapAnnots.insert(0, t_Annotation);
136 else if(t_qListFileName[i].contains(
"rh."))
137 p_AnnotationSet.m_qMapAnnots.insert(1, t_Annotation);
143 if(p_AnnotationSet.m_qMapAnnots.isEmpty())
152 QList<FsLabel> &p_qListLabels,
153 QList<RowVector4i> &p_qListLabelRGBAs,
154 const QStringList& lLabelPicks)
const
156 if(!m_qMapAnnots[0].
toLabels(p_surfSet[0], p_qListLabels, p_qListLabelRGBAs, lLabelPicks))
158 else if(!m_qMapAnnots[1].
toLabels(p_surfSet[1], p_qListLabels, p_qListLabelRGBAs, lLabelPicks))
169 return m_qMapAnnots[idx];
171 return m_qMapAnnots[idx];
174 qWarning(
"Warning: Index is not '0' or '1'! Returning '0'.");
175 return m_qMapAnnots[0];
184 return m_qMapAnnots[idx];
186 return m_qMapAnnots[idx];
189 qWarning(
"Warning: Index is not '0' or '1'! Returning '0'.");
190 return m_qMapAnnots[0];
198 if(idt.compare(
"lh") == 0)
199 return m_qMapAnnots[0];
200 else if(idt.compare(
"rh") == 0)
201 return m_qMapAnnots[1];
204 qWarning(
"Warning: Identifier is not 'lh' or 'rh'! Returning 'lh'.");
205 return m_qMapAnnots[0];
213 if(idt.compare(
"lh") == 0)
214 return m_qMapAnnots[0];
215 else if(idt.compare(
"rh") == 0)
216 return m_qMapAnnots[1];
219 qWarning(
"Warning: Identifier is not 'lh' or 'rh'! Returning 'lh'.");
220 return m_qMapAnnots[0];
Bi-hemispheric grouping of FreeSurfer surfaces (lh + rh) loaded as a single object.
Bi-hemispheric pair of FreeSurfer annotations (lh + rh) for one parcellation atlas.
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.