53 using namespace FSLIB;
72 if(hemi == 0 || hemi == 1)
93 if(hemi == 0 || hemi == 1)
112 if(p_LHAnnotation.
hemi() == 0)
113 m_qMapAnnots.insert(0, p_LHAnnotation);
115 qWarning(
"Left hemisphere id is not 0. LH annotation not assigned!");
117 if(p_RHAnnotation.
hemi() == 1)
118 m_qMapAnnots.insert(1, p_RHAnnotation);
120 qWarning(
"Right hemisphere id is not 1. RH annotation not assigned!");
131 *
this = t_AnnotationSet;
139 m_qMapAnnots.clear();
150 qint32 hemi = p_Annotation.
hemi();
151 m_qMapAnnots.remove(hemi);
153 m_qMapAnnots.insert(hemi, p_Annotation);
161 p_AnnotationSet.
clear();
163 QStringList t_qListFileName;
164 t_qListFileName << p_sLHFileName << p_sRHFileName;
166 for(qint32 i = 0; i < t_qListFileName.size(); ++i)
171 if(t_qListFileName[i].contains(
"lh."))
172 p_AnnotationSet.m_qMapAnnots.insert(0, t_Annotation);
173 else if(t_qListFileName[i].contains(
"rh."))
174 p_AnnotationSet.m_qMapAnnots.insert(1, t_Annotation);
188 if(!m_qMapAnnots[0].
toLabels(p_surfSet[0], p_qListLabels, p_qListLabelRGBAs))
190 else if(!m_qMapAnnots[1].
toLabels(p_surfSet[1], p_qListLabels, p_qListLabelRGBAs))
202 return m_qMapAnnots[idx];
204 return m_qMapAnnots[idx];
207 qWarning(
"Warning: Index is not '0' or '1'! Returning '0'.");
208 return m_qMapAnnots[0];
218 return m_qMapAnnots[idx];
220 return m_qMapAnnots[idx];
223 qWarning(
"Warning: Index is not '0' or '1'! Returning '0'.");
224 return m_qMapAnnots[0];
233 if(idt.compare(
"lh") == 0)
234 return m_qMapAnnots[0];
235 else if(idt.compare(
"rh") == 0)
236 return m_qMapAnnots[1];
239 qWarning(
"Warning: Identifier is not 'lh' or 'rh'! Returning 'lh'.");
240 return m_qMapAnnots[0];
249 if(idt.compare(
"lh") == 0)
250 return m_qMapAnnots[0];
251 else if(idt.compare(
"rh") == 0)
252 return m_qMapAnnots[1];
255 qWarning(
"Warning: Identifier is not 'lh' or 'rh'! Returning 'lh'.");
256 return m_qMapAnnots[0];
SurfaceSet class declaration.
Annotation & operator[](qint32 idx)
bool toLabels(const SurfaceSet &p_surfSet, QList< Label > &p_qListLabels, QList< RowVector4i > &p_qListLabelRGBAs) const
static bool read(const QString &p_sLHFileName, const QString &p_sRHFileName, AnnotationSet &p_AnnotationSet)
AnnotationSet class declaration.
void insert(const Annotation &p_Annotation)
static bool read(const QString &subject_id, qint32 hemi, const QString &atlas, const QString &subjects_dir, Annotation &p_Annotation)
A hemisphere set of surfaces.