7 #include "fwGdcmIO/container/sr/DicomSRImageNode.hpp" 9 #include "fwGdcmIO/helper/DicomDataWriter.hxx" 21 const std::string& relationship,
22 const std::string& sopClassUID,
23 const std::string& sopInstanceUID,
26 m_sopClassUID(sopClassUID),
27 m_sopInstanceUID(sopInstanceUID),
28 m_frameNumber(frameNumber)
52 ::gdcm::SmartPointer< ::gdcm::SequenceOfItems > sequence = new ::gdcm::SequenceOfItems();
54 item.SetVLToUndefined();
55 ::gdcm::DataSet& itemDataset = item.GetNestedDataSet();
58 ::fwGdcmIO::helper::DicomDataWriter::setTagValue< 0x0008, 0x1150 >(
m_sopClassUID, itemDataset);
61 ::fwGdcmIO::helper::DicomDataWriter::setTagValue< 0x0008, 0x1155 >(
m_sopInstanceUID, itemDataset);
64 ::fwGdcmIO::helper::DicomDataWriter::setTagValues< int, 0x0008, 0x1160 >(&
m_frameNumber, 1, itemDataset);
66 sequence->AddItem(item);
67 ::fwGdcmIO::helper::DicomDataWriter::setSequenceTagValue< 0x0008, 0x1199 >(sequence, dataset);
virtual void print(std::ostream &os) const
Dump function.
FWGDCMIO_API DicomSRImageNode(const DicomCodedAttribute &codedAttribute, const std::string &relationship, const std::string &sopClassUID, const std::string &sopInstanceUID, int frameNumber)
Constructor.
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
This class defines a node in a SR document.
std::string m_sopClassUID
Referenced SOP Class UID (0008,1150)
This class represents a DICOM basic coded entry. It stores the four mains attributes : Code Value...
int m_frameNumber
Referenced Frame Number (0008,1199)
virtual void print(std::ostream &os) const
Dump function.
std::string m_sopInstanceUID
Referenced SOP Instance UID (0008,1155)
virtual FWGDCMIO_API void write(::gdcm::DataSet &dataset) const
Write the SR node in the dataset.
virtual FWGDCMIO_API ~DicomSRImageNode()
Destructor.
virtual FWGDCMIO_API void write(::gdcm::DataSet &dataset) const
Write the SR node in the dataset.
void writeReferencedSOPSequence(::gdcm::DataSet &dataset) const
Write a referenced SOP sequence.