This is in continuation with other question. I am trying to obtained a dicom file from a jpg image and some metadata I writte myself in the java program. I have this code for adding metadata but it seems to be incomplete, so I don´t know what else I need to include.
I tried a simple code adding some attributes but I get some errors, so I found that there are some mandatory tags.
Attributes attribs = new Attributes();
attribs.setString(Tag.StudyDate, VR.DA, "20110404");
attribs.setString(Tag.StudyTime, VR.TM, "15");
After that I tried this but I still missing some attributes:
meta.setInt(Tag.FileMetaInformationGroupLength, VR.UL, data.length);
meta.setString(Tag.TransferSyntaxUID, VR.UI, "1.2.840.10008.1.2.1");
Thank you