fw4spl
io/fwGdcmIO/src/fwGdcmIO/reader/ie/Equipment.cpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2018.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #include "fwGdcmIO/reader/ie/Equipment.hpp"
8 
9 #include "fwGdcmIO/helper/DicomDataReader.hxx"
10 
11 #include <fwMedData/DicomSeries.hpp>
12 
13 #include <fwRuntime/profile/Profile.hpp>
14 
15 namespace fwGdcmIO
16 {
17 namespace reader
18 {
19 namespace ie
20 {
21 
22 //------------------------------------------------------------------------------
23 
24 Equipment::Equipment(const ::fwMedData::DicomSeries::csptr& dicomSeries,
25  const SPTR(::gdcm::Reader)& reader,
26  const ::fwGdcmIO::container::DicomInstance::sptr& instance,
27  const ::fwMedData::Equipment::sptr& equipment,
28  const ::fwLog::Logger::sptr& logger,
29  ProgressCallback progress,
30  CancelRequestedCallback cancel) :
31  ::fwGdcmIO::reader::ie::InformationEntity< ::fwMedData::Equipment >(dicomSeries, reader, instance, equipment,
32  logger, progress, cancel)
33 {
34 }
35 
36 //------------------------------------------------------------------------------
37 
39 {
40 }
41 
42 //------------------------------------------------------------------------------
43 
44 void Equipment::readGeneralEquipmentModule()
45 {
46  // Retrieve dataset
47  const ::gdcm::DataSet& dataset = m_reader->GetFile().GetDataSet();
48 
49  // Institution Name - Type 3
50  const std::string& institutName =
51  ::fwGdcmIO::helper::DicomDataReader::getTagValue< 0x0008, 0x0080 >(dataset);
52  m_object->setInstitutionName(institutName);
53 
54  // Manufacturer - Type 2
55  // NOTE: Not used in FW4SPL
56 
57  // Manufacturer's Model Name - Type 3 (Type 1 for EnhancedGeneralEquipmentModule)
58  // NOTE: Not used in FW4SPL
59 
60  // Device Serial Number - Type 3 (Type 1 for EnhancedGeneralEquipmentModule)
61  // NOTE: Not used in FW4SPL
62 
63  // Software Versions - Type 3 (Type 1 for EnhancedGeneralEquipmentModule)
64  // NOTE: Not used in FW4SPL
65 }
66 
67 //------------------------------------------------------------------------------
68 
69 } // namespace ie
70 } // namespace reader
71 } // namespace fwGdcmIO
#define SPTR(_cls_)
Namespace containing medical data.
FWGDCMIO_API Equipment(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::Equipment::sptr &equipment, const ::fwLog::Logger::sptr &logger=nullptr, ProgressCallback progress=nullptr, CancelRequestedCallback cancel=nullptr)
Constructor.
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
virtual FWMEDDATA_API ~Equipment()
Destructor.