I am new to dcm4che3 and I need help writing a vr.sq tag. I searched the documentation and available example but still need help and/or a sample.
I am constructing an XC modality dicom file and it requires an Anatomic Region Sequence.
Tag (0008,2218)
I want to insert a sequence with a Coding Scheme Designator of SRT, code value of R-1021A, code meaning of “Eye”.
How do I apply this into the Attributes list?
Thank you very much for the help.
This is a segment of the code I have tried
……
Attributes dicom = new Attributes();
Attributes Ars = new Attributes();
byte[] ItemStart = {0xF,0xF,0xF,0xE,0xE,0x0,0x0,0x0}; //FFFE,E000
byte[] ItemEnd = {0xF,0xF,0xF,0xE,0xE,0x0,0x0,0xD}; //FFFE,E00D
byte[] SeqEnd = {0xF,0xF,0xF,0xE,0xE,0x0,0xD,0xD}; //FFFE,E0DD
Ars.setBytes(Tag.SequenceDelimitationItem, VR.CS, ItemStart);
Ars.setString(Tag.CodingSchemeDesignator, VR.SH, "SRT");
Ars.setString(Tag.CodeValue, VR.SH, "T-AA000");
Ars.setString(Tag.CodeMeaning, VR.LO, "Eye");
Ars.setBytes(Tag.ItemDelimitationItem, VR.CS, ItemEnd);
Ars.setBytes(Tag.SequenceDelimitationItem, VR.CS, SeqEnd);
Ars.setInt(Tag.FileMetaInformationGroupLength, VR.UL, Ars.size());
dicom.setValue(Tag.AnatomicRegionSequence, VR.SQ, Ars);
……….
I get an java.lang.UnsupportedOperationException error.