In stone dicom viewer what dicom tag creates the Date in “DateFormat” : “DD/MM/YYYY”, ?
Is it an option to change it at Study Date ?
many thanks,
kyriakos
In stone dicom viewer what dicom tag creates the Date in “DateFormat” : “DD/MM/YYYY”, ?
Is it an option to change it at Study Date ?
many thanks,
kyriakos
I think the DICOM tag format for StudyDate is standard and always the same: See the Standard for VR type DA(Date): https://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_6.2.html
In the Stone Viewer, there is a configuration item for the Date Format, and for time, e.g.
“DateFormat” : “YYYY/MM/DD”,
“TimeFormat” : “hh:mm:ss.f”,
There is JS in the Stone Viewer, I think to handle the conversion of the StudyDate to the desired format based on the config definition (see below). There is one for time also, but I did not include that.
FormatDate: function(date)
{
if (date === undefined ||
date.length == 0) {
return ‘’;
}
else {
var format = this.globalConfiguration[‘DateFormat’];
if (format === undefined) {
// No configuration for the date format, use the DICOM tag as such
return date;
}
else {
var year = date.replace(/^([0-9]{4})([0-9]{2})([0-9]{2})$/, ‘$1’);
var month = date.replace(/^([0-9]{4})([0-9]{2})([0-9]{2})$/, ‘$2’);
var day = date.replace(/^([0-9]{4})([0-9]{2})([0-9]{2})$/, ‘$3’);
return format.replace(/YYYY/g, year).replace(/MM/g, month).replace(/DD/g, day);
}
}
},
Stephen D. Scotti, M.D.
I am sorry,
the question i wanted to make is what is the actual Dicom Tag orthanc stone viewer use to display date
InstanceCreationDate (0008,0012) ?
StudyDate (0008,0020) ?
SieriesDate (0008,0021) ?
ContentDate (0008,0023) ?
and if there is a way to change between this tags
many thanks,
kyriakos
Στις Τρίτη 6 Σεπτεμβρίου 2022 στις 1:34:18 π.μ. UTC+3, ο χρήστης stephen....@gmail.com έγραψε:
I presume then that you are talking about the annotations displayed at the series and instance levels ?
If you look at the source code for the StoneViewer WebApp front-end here:
https://hg.orthanc-server.com/orthanc-stone/file/tip/Applications/StoneWebViewer/WebApplication
and then mostly in index.html and app.js you can probably figure out what it is doing yourself. I think it uses the StudyDate / Time if ContentDate / Time are not defined or empty, otherwise ContentDate / Time. If you host your own front-end you can customize the annotations somewhat, up to a limit.
It would not be that hard to add a configuration to allow selecting additional options, but that would have to go through the release process. Not much development recently on the StoneViewer end.
e.g., line 682 in index.html:
. . . .
/sds
Hello,
The date format can be changed using the “DateFormat” configuration option of the Stone Web viewer:
https://book.orthanc-server.com/plugins/stone-webviewer.html#advanced-options
https://hg.orthanc-server.com/orthanc-stone/file/StoneWebViewer-2.5/Applications/StoneWebViewer/WebApplication/configuration.json
Regards,
Sébastien-