7 #include "fwGdcmIO/reader/ie/Series.hpp" 9 #include "fwGdcmIO/helper/DicomDataReader.hxx" 11 #include <fwMedData/DicomSeries.hpp> 12 #include <fwMedData/Series.hpp> 13 #include <fwMedData/types.hpp> 15 #include <boost/algorithm/string/classification.hpp> 16 #include <boost/algorithm/string/split.hpp> 30 const SPTR(::gdcm::Reader)& reader,
31 const ::fwGdcmIO::container::DicomInstance::sptr& instance,
32 const ::fwMedData::Series::sptr& series,
33 const ::fwLog::Logger::sptr& logger,
34 ProgressCallback progress,
35 CancelRequestedCallback cancel) :
36 ::
fwGdcmIO::reader::ie::InformationEntity< ::
fwMedData::Series >(dicomSeries, reader, instance, series,
37 logger, progress, cancel)
49 void Series::readGeneralSeriesModule()
52 ::gdcm::DataSet& dataset = m_reader->GetFile().GetDataSet();
55 const std::string& instanceUID = ::fwGdcmIO::helper::DicomDataReader::getTagValue< 0x0020, 0x000e >(dataset);
56 m_object->setInstanceUID(instanceUID);
59 const std::string& modality = ::fwGdcmIO::helper::DicomDataReader::getTagValue< 0x0008, 0x0060 >(dataset);
60 m_object->setModality(modality);
63 const std::string& date = ::fwGdcmIO::helper::DicomDataReader::getTagValue< 0x0008, 0x0021 >(dataset);
64 m_object->setDate(date);
67 const std::string& time = ::fwGdcmIO::helper::DicomDataReader::getTagValue< 0x0008, 0x0031 >(dataset);
68 m_object->setTime(time);
71 const std::string& description = ::fwGdcmIO::helper::DicomDataReader::getTagValue< 0x0008, 0x103e >(dataset);
72 m_object->setDescription(description);
78 const std::string& performingPhysicianNamesStr =
79 ::fwGdcmIO::helper::DicomDataReader::getTagValue< 0x0008, 0x1050 >(dataset);
81 if(!performingPhysicianNamesStr.empty())
83 ::fwMedData::DicomValuesType performingPhysicianNames;
84 ::boost::split( performingPhysicianNames, performingPhysicianNamesStr, ::boost::is_any_of(
"\\"));
85 m_object->setPerformingPhysiciansName(performingPhysicianNames);
Namespace containing medical data.
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
FWGDCMIO_API Series(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::Series::sptr &series, const ::fwLog::Logger::sptr &logger=nullptr, ProgressCallback progress=nullptr, CancelRequestedCallback cancel=nullptr)
Constructor.
virtual FWMEDDATA_API ~Series()
Destructor.