Open luferau opened 1 month ago
Hello! That sounds like a nice thing to support. Is that something you can help with? Can you attach a sample DICOM file to this issue?
Hello @PaulHax, thanks for you attention.
Archive attached with GSPS sample files that provide text and graphics (ELIPSE) annotation for DICOM file and also XML dumps. gsps-samples.zip
This is how this is rendered in Weasis:
Following is the example script that can create GSPS using DCMTK dcmpsmk and dcmodify tools. I hope this helps to better understand tags involved.
#!/bin/bash
INPUT_DICOM=mri-brain.dcm
OUTPUT_GSPS=mri-brain-gsps-text.dcm
CONTENT_LABEL="GSPS Text"
CONTENT_DESCRIPTION="GSPS Text example annotation"
CONTENT_CREATOR_NAME="NAME"
dcmpsmk "$INPUT_DICOM" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0080)=$CONTENT_LABEL" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0081)=$CONTENT_DESCRIPTION" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0084)=$CONTENT_CREATOR_NAME" "$OUTPUT_GSPS"
# Add Graphic Layer Sequence
dcmodify --no-backup --insert "(0070,0060)[0].(0070,0002)=ANNOTATION" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0060)[0].(0070,0062)=0" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0060)[0].(0070,0068)=Annotations" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0060)[0].(0070,0401)=63658\27358\57178" "$OUTPUT_GSPS"
# Add Graphic Annotation Sequence with Text
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0002)=ANNOTATION" "$OUTPUT_GSPS"
# Text annotation 1
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[0].(0070,0003)=PIXEL" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[0].(0070,0006)=Annotation text created with DCMTK #1" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[0].(0070,0010)=200\200" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[0].(0070,0011)=300\300" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[0].(0070,0014)=100\100" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[0].(0070,0015)=Y" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[0].(0070,0232)[0].(0070,0251)=63658\27358\57178" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[0].(0070,0232)[0].(0070,0253)=1" "$OUTPUT_GSPS"
# Text annotation 2
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[1].(0070,0003)=PIXEL" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[1].(0070,0006)=Annotation text created with DCMTK #2" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[1].(0070,0010)=600\200" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[1].(0070,0011)=700\300" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[1].(0070,0014)=800\100" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[1].(0070,0015)=Y" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[1].(0070,0232)[0].(0070,0251)=63658\27358\57178" "$OUTPUT_GSPS"
dcmodify --no-backup --insert "(0070,0001)[0].(0070,0008)[1].(0070,0232)[0].(0070,0253)=1" "$OUTPUT_GSPS"
if [ $? -eq 0 ]; then
echo "GSPS with text created as $OUTPUT_GSPS"
else
echo "Failed to create GSPS with text"
fi
Thanks for all this! Looks useful.
Next up for VolView file format work is upgrading "segmentation" support. Cuz AI. We could support you if you want to impliment this or if you have some funding to direct Kitware's way.
Hello, I have ORTHANC server where I want to render DICOM documents that contains
Grayscale Softcopy Presentation State (GSPS)
text and graphical annotations. One of the possibilities is to use a ORTHANC VolView plugin. However, I was unable to display the GSPS data.Is Kitware VolView support Grayscale Softcopy Presentation State?
Thanks!