Check the consistency of data before send it to the server
Moderator: Moderator Team
-
- Posts: 34
- Joined: Mon, 2021-02-01, 11:32
Check the consistency of data before send it to the server
In one use, the server received the data to store an image, but it could not interpret it and rejected it. I would like to check the data
to see if the error is occurring on my end.
Is there a way to check the data for correctness and consistency before send it to the server?
to see if the error is occurring on my end.
Is there a way to check the data for correctness and consistency before send it to the server?
-
- DCMTK Developer
- Posts: 2512
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Check the consistency of data before send it to the server
You could e.g. use dciodvfy for this purpose... depending on what you mean by "check the data for correctness and consistency".
-
- Posts: 34
- Joined: Mon, 2021-02-01, 11:32
Re: Check the consistency of data before send it to the server
Here's what I want to check:
1. do the data contain all necessary attributes (for Patient and image data, we use Secondary Image Capture to store the images)
2. is the content of the attributes DICOM conform
3. are attributes duplicated.
4. does the data contain illegal characters.
1. do the data contain all necessary attributes (for Patient and image data, we use Secondary Image Capture to store the images)
2. is the content of the attributes DICOM conform
3. are attributes duplicated.
4. does the data contain illegal characters.
-
- DCMTK Developer
- Posts: 2512
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Check the consistency of data before send it to the server
I'm not 100% sure about item 4 but, in general, dciodvfy should do what you want. In addition, you could use dcentvfy (also from dicom3tools) to make sure that the data on patient, study and series level is consistent over multiple DICOM instances of a patient, study, series...
-
- Posts: 34
- Joined: Mon, 2021-02-01, 11:32
Re: Check the consistency of data before send it to the server
Thank you for your reply.
I found the issue. The value for StudyID was too long and the PACS rejected the data.
In our application, I check the StudyID to see if it is empty. If yes, I create a new ID with the function dcmGenerateUniqueIdentifier(uid, SITE_STUDY_UID_ROOT).
According to the DICOM standard, the StudyID can be empty. I.e. I don't have to generate a new one. Is this correct?
The helper functions you mentioned are command line applications from another package. Are there any functions in DCMTK to check the data (e.g. for required length, format etc.) ?
Thank you very much.
I found the issue. The value for StudyID was too long and the PACS rejected the data.
In our application, I check the StudyID to see if it is empty. If yes, I create a new ID with the function dcmGenerateUniqueIdentifier(uid, SITE_STUDY_UID_ROOT).
According to the DICOM standard, the StudyID can be empty. I.e. I don't have to generate a new one. Is this correct?
The helper functions you mentioned are command line applications from another package. Are there any functions in DCMTK to check the data (e.g. for required length, format etc.) ?
Thank you very much.
-
- DCMTK Developer
- Posts: 2512
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Check the consistency of data before send it to the server
Study ID is not a unique identifier (UID) but just an identifier (ID). Therefore, using dcmGenerateUniqueIdentifier() makes no sense.In our application, I check the StudyID to see if it is empty. If yes, I create a new ID with the function dcmGenerateUniqueIdentifier(uid, SITE_STUDY_UID_ROOT).
According to the DICOM standard, the StudyID can be empty. I.e. I don't have to generate a new one. Is this correct?
Yes, Study ID (as part of the General Study Module, i.e. contained in a Composite IOD) can be left empty if unknown since it is of Type 2.
By the way, what is the background of generating a new value for Study ID?
Right. Within DCMTK, you could e.g. use the checkElement() method on the particular data element. However, please be warned that the length check (maximum number of bytes or characters) does not yet work in all cases as expected since the value of Specific Character Set (0008,0005) would need to be known in order to determine the number of bytes per character. This also applies to Study ID, which uses the Value Representation (VR) "Short String" (SH).The helper functions you mentioned are command line applications from another package. Are there any functions in DCMTK to check the data (e.g. for required length, format etc.) ?
-
- Posts: 34
- Joined: Mon, 2021-02-01, 11:32
Re: Check the consistency of data before send it to the server
Thank you for your reply.
I assumed that the StudyID would be mandatory and therefore i wanted to create a new ID if it was not defined.
This was my mistake, which I have now fixed.
Thanks again for your great support.
I assumed that the StudyID would be mandatory and therefore i wanted to create a new ID if it was not defined.
This was my mistake, which I have now fixed.
Thanks again for your great support.
Who is online
Users browsing this forum: Semrush [Bot] and 1 guest