DICOM Tags (2D)

DICOM Tags and Study/Patient/Image Information

This builds on the 2D Example to describe how to access the DICOM Tags.  A subset of DICOM tags are automatically returned from the server in the SeriesDataContext (sdc) and are also provided with each rendered image via the onImageMetaDataReceived callback.  These tags are cached locally and require no additional round trip server call.

View source /foviaserver/public/apps/hellofovia/dicomtags2d.js

To run the example, click on the local link of http://localhost:8088/apps/hellofovia/dicomtags2d.html, open up the JavaScript console to review the  SeriesDataContext object.

console.log(sdc);

The  SDC Tags (listed below) include the a default set of patient-, study-, and series- level attributes.  When working with volumes, the VolumeDataContext (vdc) also contains a reference to the sdc.  The default set of Image-level tags for each DICOM image is also available through the imageTags array of the sdc:

console.log(sdc.imageTags[0]);

The image-level tags are also returned as part of the onImageMetaDataReceived callback when an image is returned from the server:

var onImageMetaDataReceived = function (data) {
    console.log("onImageMetaDataReceived - dicomTags for this image");
    console.log(data.dicomTags);
}


For network optimization, only a subset of DICOM tags are provided.  If other tags, including private tags are required, the separate server call to SeriesDataContext.getDICOMTags(sopInstanceUID) will return the a dicomTagArray that includes the Full DICOM tags, arranged based on the element and group number.

sdc.getDICOMTags(volumeDataContext.sdc.imageTags[0].sopInstanceUID).then(function (dicomTagArray) {
    console.log(
dicomTagArray);
});

Example Output


SeriesDataContext

SeriesDataContext
attendingPhysicanName: ""
cadFindingsInfo: []
cadMarkerSummary: null
imageCount: 956
imageHeight: 512
imageTags: (956) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, …]
imageWidth: 512
institutionName: ""
is3DableSeries: true
keyImages: []
manufacturer: "GE MEDICAL SYSTEMS"
modality: "CT"
patientAge: "036Y"
patientBirthDate: "19681231"
patientID: "46598628"
patientName: "AA_NECK"
patientSex: "F "
referringPhysicianName: ""
seriesDate: "20050914"
seriesDescription: "CTA TIMING: PCT/2 + 6 "
seriesFolderPath: "data/democases/DICOM2"
seriesInstanceUID: "1.2.840.113619.2.55.3.314599446.5388.1126625110.957"
seriesNumber: 4
seriesTime: "132100"
studyAccessionNumber: "5039275 "
studyDate: "20050914"
studyDescription: "CT ANGIO NECK "
studyInstanceUID: "1.2.124.113532.192.9.54.60.20050914.91917.3208601"
studyTime: "131004.000000 "
subSeriesID: 1
totalClusterFindings: 0
totalDensityFindings: 0

ImageLevel entry (SeriesDataContext.imageTags array)

imageTags: Array(956)
[0 … 99]
0:
acquisitionNumber: 1
axis: "Z"
bitsAllocated: 16
bitsStored: 16
bluePaletteLUTDescriptor: ""
cols: 512
echoNumbers: ""
fieldOfViewDimensions: ""
frameIncrementPointer: ""
frameNumber: 1
frameOfReferenceUID: "1.2.840.113619.2.55.3.314599446.5388.1126625110.487.7100.0.11"
greenPaletteLUTDescriptor: ""
highBit: 15
imageCreationDate: "20050914"
imageCreationTime: "132245"
imageLocation: 144.5
imageNumber: 1
imageOrientationPatient: "1.000\0.000\0.000\0.000\1.000\0.000"
imagePath: "data/democases/DICOM2\949580.dcm"
imagePositionPatient: "-110.000-92.400\144.500"
imageType: "ORIGINAL\PRIMARY\AXIAL"
laterality: ""
lutExplanation: []
numberOfFrames: 1
numberOfVOILUTEntries: 0
patientOrientation: ""
patientPosition: "HFS "
photometricInterpretation: "MONOCHROME2 "
pixelPaddingValue: -2000
pixelRepresentation: 1
pixelSpacing: "0.430\0.430"
plannarConfiguration: 0
redPaletteLUTDescriptor: ""
rescaleIntercept: -1024
rescaleSlope: 1
rescaleType: "HU"
rows: 512
samplesPerPixel: 1
sliceLocation: 144.5
sliceThickness: 0.625
sopInstanceUID: "1.2.840.113619.2.55.3.314599446.5388.1126625111.914.1"
sourceImageSequence: []
spacingBetweenSlices: 0
spatialLocationPreserved: true
totalFrames: 1
tpiNumber: 0
windowCenter: "40.000000"
windowWidth: "100.000000"


The full list of DICOM tags can also be accessed through SeriesDataContext.getDICOMTags(sopInstanceUID).  This is an example of a the first few element / groups sets for one specific sopInstanceUID, in all there are 236 sets.  This is a heavyweight call and requires the server to read all tags and construct a JSON object that is then available in JavaScript.

(236) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, …]
[0 … 99]
0: {element: 0, group: 2, length: 4, sequence: false, tagName: "File Meta Information Group Length", …}
1: {element: 1, group: 2, length: 2, sequence: false, tagName: "File Meta Information Version", …}
2: {element: 2, group: 2, length: 26, sequence: false, tagName: "Media Storage SOP Class UID", …}
3: {element: 3, group: 2, length: 54, sequence: false, tagName: "Media Storage SOP Instance UID", …}
4: {element: 16, group: 2, length: 18, sequence: false, tagName: "Transfer Syntax UID", …}
5: {element: 18, group: 2, length: 16, sequence: false, tagName: "Implementation Class UID", …}
6: {element: 19, group: 2, length: 6, sequence: false, tagName: "Implementation Version Name", …}
7: {element: 22, group: 2, length: 18, sequence: false, tagName: "Source Application Entity Title", …}
8: {element: 5, group: 8, length: 10, sequence: false, tagName: "Specific Character Set", …}
9: {element: 8, group: 8, length: 22, sequence: false, tagName: "Image Type", …}
10: {element: 18, group: 8, length: 8, sequence: false, tagName: "Instance Creation Date", …}
11: {element: 19, group: 8, length: 6, sequence: false, tagName: "Instance Creation Time", …}
12: {element: 22, group: 8, length: 26, sequence: false, tagName: "SOP Class UID", …}
13:
element: 24
group: 8
length: 54
sequence: false
tagName: "SOP Instance UID"
tagValue: "1.2.840.113619.2.55.3.314599446.5388.1126625111.914.1"
vm: 1
vr: "UI"
proto: Object
14:
element: 32
group: 8
length: 8
sequence: false
tagName: "Study Date"
tagValue: "20050914"
vm: 1
vr: "DA"
proto: Object
15:
element: 33
group: 8
length: 8
sequence: false
tagName: "Series Date"
tagValue: "20050914"
vm: 1
vr: "DA"
proto: Object
16: {element: 34, group: 8, length: 8, sequence: false, tagName: "Acquisition Date", …}
17: {element: 35, group: 8, length: 8, sequence: false, tagName: "Content Date", …}
18: {element: 48, group: 8, length: 14, sequence: false, tagName: "Study Time", …}
19: {element: 49, group: 8, length: 6, sequence: false, tagName: "Series Time", …}