fw4spl
DicomSRUIDRefNode.cpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
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/container/sr/DicomSRUIDRefNode.hpp"
8 
9 #include "fwGdcmIO/helper/DicomDataWriter.hxx"
10 
11 namespace fwGdcmIO
12 {
13 namespace container
14 {
15 namespace sr
16 {
17 
18 //------------------------------------------------------------------------------
19 
21  const std::string& relationship,
22  const std::string uidValue) :
23  ::fwGdcmIO::container::sr::DicomSRNode(codedAttribute, "UIDREF", relationship),
24  m_uidValue(uidValue)
25 {
26 }
27 
28 //------------------------------------------------------------------------------
29 
31 {
32 }
33 
34 //------------------------------------------------------------------------------
35 
36 void DicomSRUIDRefNode::write(::gdcm::DataSet& dataset) const
37 {
39 
40  // UID Value - Type 1C
41  ::fwGdcmIO::helper::DicomDataWriter::setTagValue< 0x0040, 0xa124 >(m_uidValue, dataset);
42 }
43 
44 //------------------------------------------------------------------------------
45 
46 void DicomSRUIDRefNode::print(std::ostream& os) const
47 {
49  os << "\\nUID value : [" << m_uidValue << "]";
50 }
51 
52 //------------------------------------------------------------------------------
53 
54 } //namespace sr
55 } //namespace container
56 } //namespace fwGdcmIO
std::string m_uidValue
Text Value (0040, a124)
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
This class defines a node in a SR document.
Definition: DicomSRNode.hpp:27
virtual FWGDCMIO_API ~DicomSRUIDRefNode()
Destructor.
virtual void print(std::ostream &os) const
Dump function.
This class represents a DICOM basic coded entry. It stores the four mains attributes : Code Value...
virtual void print(std::ostream &os) const
Dump function.
FWGDCMIO_API DicomSRUIDRefNode(const DicomCodedAttribute &codedAttribute, const std::string &relationship, const std::string uidValue)
Constructor.
virtual FWGDCMIO_API void write(::gdcm::DataSet &dataset) const
Write the SR node in the dataset.
Definition: DicomSRNode.cpp:44
virtual FWGDCMIO_API void write(::gdcm::DataSet &dataset) const
Write the SR node in the dataset.