void SeriesDB::generateSeriesInformation(::fwMedData::Series::sptr series) { series->setPatient(SeriesDB::createPatient()); series->setStudy(SeriesDB::createStudy()); series->setEquipment(SeriesDB::createEquipement()); static unsigned int count = 1; std::stringstream str; str.width(4); str.fill('0'); str << count++; const std::string UID = "1.2.826.0.1.3680043.2.1125.102906542887009256605006409108689" + str.str(); const std::string MODALITY = "CT"; const std::string DATE = "20130418"; const std::string TIME = "101010.101010 "; const std::string DESCRIPTION = "Description "; ::fwMedData::DicomValuesType performingPhysiciansName; performingPhysiciansName.push_back("Dr^Jekyl"); performingPhysiciansName.push_back("Dr^House"); performingPhysiciansName.push_back("Dr^Einstein "); series->setPerformingPhysiciansName(performingPhysiciansName); series->setInstanceUID(UID); series->setModality(MODALITY); series->setDate(DATE); series->setTime(TIME); series->setDescription(DESCRIPTION); }
void initSeries(::fwMedData::Series::sptr series) { const std::string instanceUID = ::fwTools::UUID::generateUUID(); const std::string unknown = "unknown"; const ::boost::posix_time::ptime now = ::boost::posix_time::second_clock::local_time(); const std::string date = ::fwTools::getDate(now); const std::string time = ::fwTools::getTime(now); series->setModality("OT"); series->setDate(date); series->setTime(time); series->setDescription("Image imported with VTK"); ::fwMedData::DicomValuesType physicians = series->getPerformingPhysiciansName(); if(physicians.empty()) { const std::string username = ::fwTools::os::getEnv("USERNAME", ::fwTools::os::getEnv("LOGNAME", "Unknown")); physicians.push_back(username); } series->setPerformingPhysiciansName(physicians); series->getEquipment()->setInstitutionName(unknown); series->getPatient()->setName(unknown); series->getPatient()->setPatientId(unknown); series->getPatient()->setBirthdate(unknown); series->getPatient()->setSex(unknown); series->getStudy()->setInstanceUID(instanceUID); series->getStudy()->setDate(date); series->getStudy()->setTime(time); series->getStudy()->setReferringPhysicianName(unknown); series->getStudy()->setDescription(unknown); series->getStudy()->setPatientAge(unknown); }