-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FATAL ERROR: Writing of the SEG dataset failed #250
Comments
@alexisdurieux thanks for your report! I believe the reason for this is the same as described in #232. The input image series that you are segmenting seems to contain attributes that violate the standard. It could be that the problems were introduced during the de-identification process. There is currently no way to force dcmqi to write the output. To confirm that this is indeed the source of the problem, you can modify your input DICOM series to have a valid value for If you are on a Mac or Linux, and have DCMTK installed, you can do it using
If you don't have DCMTK installed, you can use the docker image we provide here https://hub.docker.com/r/qiicr/docker-dcmtk-cli/:
(at the moment, the command above will not work, since I realized there is a problem with the way we build the docker image, I pushed a fix, and will update this issue when I confirm it is working) Please let us know if the instructions above fix the problem for you, or it is something else. |
@alexisdurieux I confirm the updated docker image is fixed, and the following command should work (I added echo, since it is quite slow):
|
Hi @fedorov thank you for your quick answer ! Are there any way to fix it without using the docker image and instead the binary ? Thanks a lot, i tried the command: |
You still have the same error after modifying PatientAge? Can you include the last few lines of the console output? |
It seems that the PatientAge wasn't modified with success. My bad, I try to use your docker image but there is an error while processing the images (Docker daemon socker). I try to figure this out and come back to you |
Hmm, you should not need to use the docker to modify, it should work with the command line tool. Were there any errors? Were you running the command I provided inside a directory that has the DICOM files you are passing as input to dcmqi? |
Alright so I managed to kill the warning by replacing the patient age with a correct VR value for instance 023Y with your command line. However I still have one error:
Any idea where it comes from ? |
Ah, of course! Very sorry for giving you imprecise and misleading instructions. Glad you figured it out!
Please check that the the argument you pass to the |
Thank you so much for your help ! It was indeed the problem. The segmentation is now saved successfully ! |
@alexisdurieux great, thank you for confirming! Sorry for the trouble. I am closing this issue, since its essence is covered by #232 and #225. |
@michaelonken it is somewhat misleading that the data issue is reported as a warning (see #250 (comment)), but in fact leads to the failure while writing the dataset. Is this expected?
|
Expected but not desired I guess. The reason is that the same check routine is used when reading and writing. I think the desired output is a warning when reading, and an error when writing. The natural way to resolve this put an extra parameter to the called check..() method which tells the routine which logger to use. I have to check whether its easily possible (or requires adding parameter to many calling methods). What do you think, worth spending 1-2 hours on it? |
Michael, yes - I think it is a good idea to see if it is an easy fix. |
I fixed this today in DCMTK testing branch. The commit 71496d will be visible in the next days in the public upstream DCMTK master. If you want to try this before it is published, you can find a copy of the current OFFIS testing branch in my private github copy: https://github.com/michaelonken/dcmtk (branch offis_testing) |
Great, thank you Michael! I confirm this works as expected - error before write failure when the referenced image data is invalid. The issue related to the fractional segmentation is also gone. Once it is published, we should upgrade DCMTK for dcmqi and Slicer! |
also related to #212 |
Hi, I'm trying to use the library to generate a DICOM Seg with itkimage2segimage. For the context I'm trying to segment only one slice of a set of dicoms, so the nrrd file is nrrd_mat is full of zeros except for the one slice we are trying to segment However, whenever we try a fatal error occurs. Here is the full error:
Do you have any ideas on what we are doing wrong or if it's a bug related issue ?
Alexis
The text was updated successfully, but these errors were encountered: