67 if(hemi == 0 || hemi == 1)
86 if(hemi == 0 || hemi == 1)
104 if(p_LHAnnotation.
hemi() == 0)
105 m_qMapAnnots.insert(0, p_LHAnnotation);
107 qWarning(
"Left hemisphere id is not 0. LH annotation not assigned!");
109 if(p_RHAnnotation.
hemi() == 1)
110 m_qMapAnnots.insert(1, p_RHAnnotation);
112 qWarning(
"Right hemisphere id is not 1. RH annotation not assigned!");
121 *
this = t_AnnotationSet;
128 m_qMapAnnots.
clear();
138 qint32 hemi = p_Annotation.
hemi();
139 m_qMapAnnots.remove(hemi);
141 m_qMapAnnots.insert(hemi, p_Annotation);
148 p_AnnotationSet.
clear();
150 QStringList t_qListFileName;
151 t_qListFileName << p_sLHFileName << p_sRHFileName;
153 for(qint32 i = 0; i < t_qListFileName.size(); ++i)
158 if(t_qListFileName[i].contains(
"lh."))
159 p_AnnotationSet.m_qMapAnnots.insert(0, t_Annotation);
160 else if(t_qListFileName[i].contains(
"rh."))
161 p_AnnotationSet.m_qMapAnnots.insert(1, t_Annotation);
167 if(p_AnnotationSet.m_qMapAnnots.isEmpty())
176 QList<Label> &p_qListLabels,
177 QList<RowVector4i> &p_qListLabelRGBAs,
178 const QStringList& lLabelPicks)
const
180 if(!m_qMapAnnots[0].
toLabels(p_surfSet[0], p_qListLabels, p_qListLabelRGBAs, lLabelPicks))
182 else if(!m_qMapAnnots[1].
toLabels(p_surfSet[1], p_qListLabels, p_qListLabelRGBAs, lLabelPicks))
193 return m_qMapAnnots[idx];
195 return m_qMapAnnots[idx];
198 qWarning(
"Warning: Index is not '0' or '1'! Returning '0'.");
199 return m_qMapAnnots[0];
208 return m_qMapAnnots[idx];
210 return m_qMapAnnots[idx];
213 qWarning(
"Warning: Index is not '0' or '1'! Returning '0'.");
214 return m_qMapAnnots[0];
222 if(idt.compare(
"lh") == 0)
223 return m_qMapAnnots[0];
224 else if(idt.compare(
"rh") == 0)
225 return m_qMapAnnots[1];
228 qWarning(
"Warning: Identifier is not 'lh' or 'rh'! Returning 'lh'.");
229 return m_qMapAnnots[0];
237 if(idt.compare(
"lh") == 0)
238 return m_qMapAnnots[0];
239 else if(idt.compare(
"rh") == 0)
240 return m_qMapAnnots[1];
243 qWarning(
"Warning: Identifier is not 'lh' or 'rh'! Returning 'lh'.");
244 return m_qMapAnnots[0];
AnnotationSet class declaration.
SurfaceSet class declaration.
FreeSurfer surface and annotation I/O.
static bool read(const QString &subject_id, qint32 hemi, const QString &atlas, const QString &subjects_dir, Annotation &p_Annotation)
static bool read(const QString &p_sLHFileName, const QString &p_sRHFileName, AnnotationSet &p_AnnotationSet)
void insert(const Annotation &p_Annotation)
Annotation & operator[](qint32 idx)
bool toLabels(const SurfaceSet &p_surfSet, QList< Label > &p_qListLabels, QList< Eigen::RowVector4i > &p_qListLabelRGBAs, const QStringList &lLabelPicks=QStringList()) const
A hemisphere set of surfaces.