Class SetCharacteristicsFromSummary

java.lang.Object
com.pixelmed.apps.SetCharacteristicsFromSummary

public class SetCharacteristicsFromSummary extends Object

A class containing an application for adding or replacing top level and shared multi-frame functional group attributes from a JSON summary description.

The JSON file used to describe the changes is not encoded in the same format as the standard PS3.18 Annex F DICOM JSON Model, since (a) it allows the data elements to be changed by keyword in addition to the data element tag, and (b) it compactly specifies whether the changes are to the top level dataset ("top") or the keyword of the sequence corresponding to the functional group to be changed, and (c) lists attributes in the top level data set to be removed ("remove") or those to be removed recursively from within sequences ("removeall"), and (d) lists options that control the process of modification.

The required format of the JSON file is a single enclosing object containing a list of objects named by "remove", "options", a functional group sequence keyword or "top".

The functional group sequence keyword or "top" entries each contains either a single string value, an array of string values (possibly empty) (for multi-valued attributes), or an array of objects (possibly empty) each of which is a sequence item consisting of a list of attributes, an object that contained a list of code sequence item attributes (named as cv for CodeValue, csd for CodingSchemeDesignator and cm for CodeMeaning) or null for an empty (type 2) attribute or sequence.

The "remove" object contains a list of keywords and null values.

The "options" object contains a list of options and boolean values. Current options are ReplaceCodingSchemeIdentificationSequence (default is true) and AppendToContributingEquipmentSequence (default is true)

E.g.:

 {
        "options" : {
                "AppendToContributingEquipmentSequence" : false
        },
        "remove" : {
                "ContributingEquipmentSequence" : null
        },
        "removeall" : {
                "FrameType" : null
        },
        "top" : {
                "00204000" : "new value of ImageComments",
                "InstitutionalDepartmentName" : "Radiology",
                "ImageType" : [ "DERIVED", "PRIMARY", "DIXON", "WATER" ],
                "PatientBreedCodeSequence" : null,
                "BreedRegistrationSequence" : [
                        {
                                "BreedRegistrationNumber" : "1234",
                                "BreedRegistryCodeSequence" : { "cv" : "109200", "csd" : "DCM", "cm" : "America Kennel Club" }
                        },
                        {
                                "BreedRegistrationNumber" : \"5678\",
                                "BreedRegistryCodeSequence" : { "cv" : "109202", "csd" : "DCM", "cm" : "American Canine Association" }
                        }
                ],
                "StudyID" : null,
                "AccessionNumber" : [],
                "ReferencedStudySequence" : [],
                "ContentCreatorName" : "Smith^John"
        },
        "FrameAnatomySequence" : {
                "AnatomicRegionSequence" : { "cv" : "T-A0100", "csd" : "SRT", "cm" : "Brain" },
                "FrameLaterality" : "B"
        },
        "ParametricMapFrameTypeSequence" : {
                "FrameType" : [ "DERIVED", "PRIMARY", "DIXON", "WATER" ]
        },
        "FrameVOILUTSequence" : {
                "WindowCenter" : "0.7",
                "WindowWidth" : "0.7",
                "VOILUTFunction" : "LINEAR_EXACT"
        }
 }
 

Attributes are "merged" with the existing content of a functional group sequence, if any, otherwise a new functional group sequence is created.

Currently only the shared functional group sequence can be updated, since non-programmatic use cases for replacing the content of the per-frame functional group sequence items have not yet been identified.