13 #ifndef MITKSEMANTICTYPES_H 14 #define MITKSEMANTICTYPES_H 16 #define BOOST_DATE_TIME_NO_LIB 17 #if defined(BOOST_ALL_DYN_LINK) 18 #undef BOOST_ALL_DYN_LINK 22 #include <boost/date_time/gregorian/gregorian.hpp> 31 namespace SemanticTypes
33 using ID = std::string;
43 boost::gregorian::date
date;
47 date = boost::gregorian::date(boost::gregorian::min_date_time);
53 return date < other.
date;
58 std::stringstream controlPointAsString;
59 if (date.is_not_a_date())
64 controlPointAsString << std::to_string(date.year()) <<
"-" 65 << std::setfill(
'0') << std::setw(2) << std::to_string(date.month()) <<
"-" 66 << std::setfill(
'0') << std::setw(2) << std::to_string(date.day());
68 return controlPointAsString.str();
73 date = boost::gregorian::from_undelimited_string(dateAsString);
78 boost::gregorian::date_duration duration = date - other.
date;
79 return std::abs(duration.days());
92 std::string name =
"";
102 std::string classType =
"";
111 std::string name =
"";
125 #endif // MITKSEMANTICTYPES_H
std::vector< ID > IDVector
std::vector< ID > controlPointUIDs
std::vector< LesionClass > LesionClassVector
void SetDateFromString(const std::string &dateAsString)
DataCollection - Class to facilitate loading/accessing structured data.
boost::gregorian::date date
std::vector< Lesion > LesionVector
std::vector< ControlPoint > ControlPointVector
The concept of an examination period. An examination period holds a vector of control point UIDs...
std::string ToString() const
int DistanceInDays(const ControlPoint &other) const
std::string InformationType
std::vector< InformationType > InformationTypeVector
bool operator<(const ControlPoint &other) const
std::vector< ExaminationPeriod > ExaminationPeriodVector