Bug description
The file browser did not recognize the Structured Report (SR) file as valid.
However, the same file opened in MicroDicom viewer (attached screenshot and the dcm file itself)
Steps for reproduction
Created a minimal SR using fo-toolkit. (in code)
Saved to a dicom file (in code)
Tried to open in browser using File Editor (beta)
Here's the code (C#) I used to build the file.
var dataset = new DicomDataset
{
// type 1 attributes
{ DicomTag.SOPClassUID, DicomUID.BasicTextSRStorage},
{ DicomTag.SOPInstanceUID, DicomUID.Generate()},
{ DicomTag.StudyInstanceUID, DicomUID.Generate()},
{ DicomTag.SeriesInstanceUID, DicomUID.Generate()},
{ DicomTag.Modality, "SR" },
};
try
{
// Create the root content item which is the title
DicomCodeItem titleCode = new DicomCodeItem("121144", "DCM", "Document Title");
//DicomContentItem titleValue = new DicomContentItem(titleCode, DicomRelationship.Contains, DicomValueType.Text, "A Very Simple Structured Report");
//titleCode.Add(DicomTag.SequenceDelimitationItem, string.Empty);
// Prepare the one content item
DicomCodeItem textCode = new DicomCodeItem("111412", "DCM", "Narrative Summary");
DicomContentItem textItem = new DicomContentItem(textCode, DicomRelationship.Contains, DicomValueType.Text, "Hello World!!");
// Now we can create a special content item called a 'structured report'
DicomStructuredReport report = new DicomStructuredReport(titleCode, textItem);
// We need to add the dataset with all the patient, study, series stuff to the report (not the other way around)
report.Dataset.Add(dataset);
// Save the dataset to a file
DicomFile file = new DicomFile();
file.Dataset.Add(report.Dataset);
file.FileMetaInfo.TransferSyntax = DicomTransferSyntax.ImplicitVRLittleEndian; //Specify transfer syntax
DicomIOWriter.DicomWriteOptions options = new DicomIOWriter.DicomWriteOptions();
options.ExplicitLengthSequenceItems = true;
options.ExplicitLengthSequences = true;
file.Save(dicom_file, options);
}
catch (DicomStructuredReportException exception)
{
System.Diagnostics.Trace.WriteLine("");
System.Diagnostics.Trace.WriteLine("----------------------------------------------------");
System.Diagnostics.Trace.WriteLine("Error creating structured report ...");
System.Diagnostics.Trace.WriteLine(exception.ToString());
System.Diagnostics.Trace.WriteLine("----------------------------------------------------");
System.Diagnostics.Trace.WriteLine("");
}
Expected behavior
Browser should accept the file and show its tags in orange. Even if some tags are missing, should show missing tags in red.
@browser
Bug description The file browser did not recognize the Structured Report (SR) file as valid. However, the same file opened in MicroDicom viewer (attached screenshot and the dcm file itself)
Steps for reproduction
Here's the code (C#) I used to build the file.
Expected behavior
Browser should accept the file and show its tags in orange. Even if some tags are missing, should show missing tags in red.
Additional context (e.g. screenshots)
sr_basic.zip
p.s. I am a fan of this browser!! Keep up the great work!