7 #include "fwGdcmIO/container/sr/DicomSRNode.hpp" 9 #include "fwGdcmIO/helper/DicomDataWriter.hxx" 21 const std::string& type,
22 const std::string& relationship) :
23 m_codedAttribute(codedAttribute),
25 m_relationship(relationship)
47 ::fwGdcmIO::helper::DicomDataWriter::setTagValue< 0x0040, 0xa040 >(
m_type, dataset);
52 ::fwGdcmIO::helper::DicomDataWriter::setTagValue< 0x0040, 0xa010 >(
m_relationship, dataset);
58 ::gdcm::SmartPointer< ::gdcm::SequenceOfItems > codeSequence =
60 ::fwGdcmIO::helper::DicomDataWriter::setAndMergeSequenceTagValue<0x0040, 0xa043>(codeSequence, dataset);
77 ::gdcm::SmartPointer< ::gdcm::SequenceOfItems > codeSequence = new ::gdcm::SequenceOfItems();
78 codeSequence->SetLengthToUndefined();
82 item.SetVLToUndefined();
83 ::gdcm::DataSet& itemDataset = item.GetNestedDataSet();
86 ::fwGdcmIO::helper::DicomDataWriter::setTagValue<0x0008, 0x0100>(codedAttribute.
getCodeValue(), itemDataset);
89 ::fwGdcmIO::helper::DicomDataWriter::setTagValue<0x0008, 0x0102>(
95 ::fwGdcmIO::helper::DicomDataWriter::setTagValue<0x0008, 0x0103>(
100 ::fwGdcmIO::helper::DicomDataWriter::setTagValue<0x0008, 0x0104>(codedAttribute.
getCodeMeaning(), itemDataset);
103 codeSequence->AddItem(item);
113 ::gdcm::SmartPointer< ::gdcm::SequenceOfItems > sequence = new ::gdcm::SequenceOfItems();
119 item.SetVLToUndefined();
120 ::gdcm::DataSet& itemDataset = item.GetNestedDataSet();
121 child->write(itemDataset);
122 sequence->AddItem(item);
125 ::fwGdcmIO::helper::DicomDataWriter::setSequenceTagValue< 0x0040, 0xa730 >(sequence, dataset);
const std::string getCodingSchemeVersion() const
Get coding scheme version.
const std::string getCodeMeaning() const
Get code meaning.
FWGDCMIO_API bool isEmpty() const
Returns true if the attribute is empty.
virtual ~DicomSRNode()
Destructor.
const std::string getCodingSchemeDesignator() const
Get coding scheme designator.
const std::string getCodeValue() const
Get code value.
std::string m_relationship
Node relationship (0040, a010)
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...
virtual void print(std::ostream &os) const
Dump function.
SubNodeContainer m_subNodeContainer
SubNode container.
virtual FWGDCMIO_API void write(::gdcm::DataSet &dataset) const
Write the SR node in the dataset.
std::string m_type
Node type (0040, a040)
DicomSRNode(const DicomCodedAttribute &codedAttribute, const std::string &type, const std::string &relationship="")
Constructor.
FWGDCMIO_API void addSubNode(const std::shared_ptr< DicomSRNode > &node)
Add a sub node.
::gdcm::SmartPointer< ::gdcm::SequenceOfItems > createConceptNameCodeSequence(const DicomCodedAttribute &codedAttribute) const
Create a concept name code sequence.
DicomCodedAttribute m_codedAttribute
Coded entry of the node.
void writeContentSequence(::gdcm::DataSet &dataset) const
Write a content sequence.