7 #include "fwGdcmIO/reader/ie/Patient.hpp" 9 #include "fwGdcmIO/helper/DicomDataReader.hxx" 11 #include <fwMedData/DicomSeries.hpp> 12 #include <fwMedData/Patient.hpp> 24 const SPTR(::gdcm::Reader)& reader,
25 const ::fwGdcmIO::container::DicomInstance::sptr& instance,
26 const ::fwMedData::Patient::sptr& patient,
27 const ::fwLog::Logger::sptr& logger,
28 ProgressCallback progress,
29 CancelRequestedCallback cancel) :
43 void Patient::readPatientModule()
46 const ::gdcm::DataSet& dataset = m_reader->GetFile().GetDataSet();
49 const std::string& patientName =
50 ::fwGdcmIO::helper::DicomDataReader::getTagValue< 0x0010, 0x0010 >(dataset);
51 m_object->setName(patientName);
54 const std::string& patientId =
55 ::fwGdcmIO::helper::DicomDataReader::getTagValue< 0x0010, 0x0020 >(dataset);
56 m_object->setPatientId(patientId);
59 const std::string& birthDate =
60 ::fwGdcmIO::helper::DicomDataReader::getTagValue< 0x0010, 0x0030 >(dataset);
61 m_object->setBirthdate(birthDate);
64 const std::string& sex =
65 ::fwGdcmIO::helper::DicomDataReader::getTagValue< 0x0010, 0x0040 >(dataset);
66 m_object->setSex(sex);
This class contains helper to generate Medical Data (SeriesDB, ImageSeries, ...). ...
Namespace containing medical data.
virtual FWMEDDATA_API ~Patient()
Destructor.
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
FWGDCMIO_API Patient(const std::shared_ptr< const ::fwMedData::DicomSeries > &dicomSeries, const std::shared_ptr< ::gdcm::Reader > &reader, const std::shared_ptr< ::fwGdcmIO::container::DicomInstance > &instance, const ::fwMedData::Patient::sptr &patient, const ::fwLog::Logger::sptr &logger=nullptr, ProgressCallback progress=nullptr, CancelRequestedCallback cancel=nullptr)
Constructor.