fw4spl
DicomSRNumNode.hpp
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 #ifndef __FWGDCMIO_CONTAINER_SR_DICOMSRNUMNODE_HPP__
8 #define __FWGDCMIO_CONTAINER_SR_DICOMSRNUMNODE_HPP__
9 
10 #include "fwGdcmIO/config.hpp"
11 #include "fwGdcmIO/container/DicomCodedAttribute.hpp"
12 #include "fwGdcmIO/container/sr/DicomSRNode.hpp"
13 
14 #include <gdcmDataSet.h>
15 
16 namespace fwGdcmIO
17 {
18 namespace container
19 {
20 namespace sr
21 {
22 
26 class FWGDCMIO_CLASS_API DicomSRNumNode : public ::fwGdcmIO::container::sr::DicomSRNode
27 {
28 public:
29 
31  FWGDCMIO_API DicomSRNumNode(const DicomCodedAttribute& codedAttribute,
32  const std::string& relationship,
33  const double numValue,
34  const DicomCodedAttribute& measurementUnits);
35 
37  FWGDCMIO_API virtual ~DicomSRNumNode();
38 
43  FWGDCMIO_API virtual void write(::gdcm::DataSet& dataset) const;
44 
46  const double& getNumValue() const
47  {
48  return m_numValue;
49  }
50 
52  void setNumValue(const double& numValue)
53  {
54  m_numValue = numValue;
55  }
56 
59  {
60  return m_measurementUnits;
61  }
62 
64  void setMeasurementUnits(const DicomCodedAttribute& measurementUnits)
65  {
66  m_measurementUnits = measurementUnits;
67  }
68 
69 protected:
70 
72  virtual void print(std::ostream& os) const;
73 
79  void writeMeasuredValueSequence(::gdcm::DataSet& dataset) const;
80 
82  double m_numValue;
83 
86 
87 };
88 
89 } //namespace sr
90 } //namespace container
91 } //namespace fwGdcmIO
92 
93 #endif /* __FWGDCMIO_CONTAINER_SR_DICOMSRNUMNODE_HPP__ */
void setMeasurementUnits(const DicomCodedAttribute &measurementUnits)
Set Measurement units.
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
This class defines a node in a SR document.
Definition: DicomSRNode.hpp:27
This class represents a DICOM basic coded entry. It stores the four mains attributes : Code Value...
DicomCodedAttribute m_measurementUnits
Measurement Units.
This class defines a NUM node in a SR document.
const double & getNumValue() const
Get Numeric value.
const DicomCodedAttribute & getMeasurementUnits() const
Get Measurement units.
void setNumValue(const double &numValue)
Set Numeric value.