7 #ifndef __FWGDCMIO_HELPER_STRUCTUREDREPORT_HPP__ 8 #define __FWGDCMIO_HELPER_STRUCTUREDREPORT_HPP__ 10 #include "fwGdcmIO/container/sr/DicomSRContainerNode.hpp" 11 #include "fwGdcmIO/container/sr/DicomSRNode.hpp" 12 #include "fwGdcmIO/helper/DicomDataReader.hxx" 14 #include <gdcmDataSet.h> 15 #include <gdcmSequenceOfItems.h> 35 readSR(const ::gdcm::DataSet& dataset);
43 std::ostream& out = std::cout);
52 static void readSubNodeContainer(const ::gdcm::DataSet& dataset,
60 static void readSubNode(const ::gdcm::DataSet& dataset,
70 std::ostream& out,
int& index);
79 template <u
int16_t GROUP, u
int16_t ELEMENT>
80 static ::fwGdcmIO::container::DicomCodedAttribute
readCodeSequence(const ::gdcm::DataSet& dataset)
84 if ( !dataset.FindDataElement(::gdcm::Tag(GROUP,ELEMENT)))
87 return codedAttributes;
90 ::gdcm::SmartPointer< ::gdcm::SequenceOfItems > sequence =
91 dataset.GetDataElement(::gdcm::Tag(GROUP,ELEMENT)).GetValueAsSQ();
92 if (sequence->GetNumberOfItems() == 0)
95 return codedAttributes;
98 const ::gdcm::DataSet& itemDataset = sequence->GetItem(1).GetNestedDataSet();
101 auto codeValue = ::fwGdcmIO::helper::DicomDataReader::getTagValue<0x0008,0x0100>(itemDataset);
104 auto codingSchemeDesignator = ::fwGdcmIO::helper::DicomDataReader::getTagValue<0x0008,0x0102>(itemDataset);
107 auto codingSchemeVersion = ::fwGdcmIO::helper::DicomDataReader::getTagValue<0x0008,0x0103>(itemDataset);
110 auto codeMeaning = ::fwGdcmIO::helper::DicomDataReader::getTagValue<0x0008,0x0104>(itemDataset);
112 return ::fwGdcmIO::container::DicomCodedAttribute(codeValue,
113 codingSchemeDesignator,
115 codingSchemeVersion);
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
This class defines a node in a SR document.
This class represents a DICOM basic coded entry. It stores the four mains attributes : Code Value...
::fwGdcmIO::container::DicomCodedAttribute readCodeSequence(const ::gdcm::DataSet &dataset)
Read content of a code sequence (eg : Concept Name Code Sequence, ...)
This class defines a CONTAINER node in a SR document.
This class contains helpers for DICOM Structured Reporting (SR).