J
JustSomeGuy
I have a class structure like:
class image : public list<class element> {};
class series : public list<class image>
{
public:
bool operator< (const image & img) const
{
return (image_id < img.image_id);
}
};
class study : public list<class series> {};
class patient : public list<class study> {};
class patients : public list<patient> {};
So sorting the series class is quite simple I just:
series s;
s.sort();
An unprocessed series can contain images from different studies and
different patients.
--------->>>> What I want to do is go through the series list and build
up a a sorted patient list.... (patients please!)
Within each image is a image_id, patient_id, series_id and a study_id.
What is the best way to build up the patient list?
I was thinking of modifying the series operator< and add the patient_id,
study_id series_id, and image_id so that at least that
list is completly sorted.... Then traverse the series list and populate
the patient list... (class patients)
Should I add a operator< to each class?
What do you think?
class image : public list<class element> {};
class series : public list<class image>
{
public:
bool operator< (const image & img) const
{
return (image_id < img.image_id);
}
};
class study : public list<class series> {};
class patient : public list<class study> {};
class patients : public list<patient> {};
So sorting the series class is quite simple I just:
series s;
s.sort();
An unprocessed series can contain images from different studies and
different patients.
--------->>>> What I want to do is go through the series list and build
up a a sorted patient list.... (patients please!)
Within each image is a image_id, patient_id, series_id and a study_id.
What is the best way to build up the patient list?
I was thinking of modifying the series operator< and add the patient_id,
study_id series_id, and image_id so that at least that
list is completly sorted.... Then traverse the series list and populate
the patient list... (class patients)
Should I add a operator< to each class?
What do you think?