7 #include "fwNetworkIO/helper/Series.hpp" 11 #include <fwMedData/DicomSeries.hpp> 12 #include <fwMedData/Equipment.hpp> 13 #include <fwMedData/ImageSeries.hpp> 14 #include <fwMedData/ModelSeries.hpp> 15 #include <fwMedData/Patient.hpp> 16 #include <fwMedData/Study.hpp> 18 #include <boost/foreach.hpp> 29 DicomSeriesContainer seriesContainer;
32 ::fwMedData::DicomSeries::sptr series = ::fwMedData::DicomSeries::New();
33 ::fwMedData::Patient::sptr patient = ::fwMedData::Patient::New();
34 ::fwMedData::Study::sptr study = ::fwMedData::Study::New();
35 ::fwMedData::Equipment::sptr equipment = ::fwMedData::Equipment::New();
38 series->setPatient(patient);
39 series->setStudy(study);
40 series->setEquipment(equipment);
46 series->setInstanceUID(seriesJson[
"SeriesInstanceUID"].toString().toStdString());
47 series->setModality(seriesJson[
"Modality"].toString().toStdString());
48 series->setDate(seriesJson[
"SeriesDate"].toString().toStdString());
49 series->setTime(seriesJson[
"SeriesTime"].toString().toStdString());
50 series->setDescription(seriesJson[
"SeriesDescription"].toString().toStdString());
55 patient->setName(seriesJson[
"PatientName"].toString().toStdString());
56 patient->setPatientId(seriesJson[
"PatientID"].toString().toStdString());
57 patient->setBirthdate(seriesJson[
"PatientBirthDate"].toString().toStdString());
58 patient->setSex(seriesJson[
"PatientSex"].toString().toStdString());
63 study->setInstanceUID(seriesJson[
"StudyInstanceUID"].toString().toStdString());
64 study->setDate(seriesJson[
"StudyDate"].toString().toStdString());
65 study->setTime(seriesJson[
"StudyTime"].toString().toStdString());
66 study->setDescription(seriesJson[
"StudyDescription"].toString().toStdString());
67 study->setPatientAge(seriesJson[
"PatientAge"].toString().toStdString());
72 equipment->setInstitutionName(seriesJson[
"InstitutionName"].toString().toStdString());
77 series->setNumberOfInstances(seriesJson[
"NumberOfSeriesRelatedInstances"].toInt());
80 seriesContainer.push_back(series);
82 return seriesContainer;
89 InstanceUIDContainer result;
91 for(const ::fwMedData::Series::sptr& s: series )
93 result.push_back(s->getInstanceUID());
static FWNETWORKIO_API InstanceUIDContainer toSeriesInstanceUIDContainer(DicomSeriesContainer series)
Convert std::vector< ::fwMedData::DicomSeries > to series instance uid container. ...
The namespace fwNetworkIO contains the primary methods to access network.
static FWNETWORKIO_API DicomSeriesContainer toFwMedData(const QJsonObject &answer)
Convert HTTP series response to fwMedData::DicomSeries.
This file defines SpyLog macros. These macros are used to log messages to a file or to the console du...