Hello!
While testing the tools/create-dicom endpoint, I found out that some specific PNG files causes a 404 error on Orthanc’s side. For instance this PNG:
I’ve used an online image comparator to compare against a working PNG image:
The only relevant difference seems to be Format = Palette in the failing image. Is this an issue on Orthanc’s side?
Hi Diego,
Indeed, reading palette PNG is not implemented yet:
As a reminder, here’s how I tested it:
(echo -n '{"Parent": "1842682f-74fabb09-35f9feef-5cffc011-82d13d5b", "Tags" : {"Modality" : "CT"}, "Content" : "data:image/png;base64,'; base6
4 palette_569x500.png; echo '"}') > /tmp/foo
cat /tmp/foo | curl -H "Content-Type: application/json" -d @- http://localhost:8043/tools/create-dicom
I’m actually getting a 500 on my side which is in line with the “not implemented yet” exception.
I’ll add it in our TODO but that’s probably for very long term.
Best regards,
Alain.
Thanks Alain. Now I’m just wondering why Orthanc replies with 404 instead of 500 like yours. Do you have a clue? I use the Docker image version 1.11.0.
Have you tried with 1.12 ? If you still get the 404, feel free to share your request and I can have a look
Hello,
I’ve tried Alain’s instructions with both 1.11.0 and 1.12.0, and both versions return 500, which is the expected behaviour.
Regards,
Sébastien-
Hey guys. Here is the log of a failed request (I couldn’t attach a .txt file), done with Spring’s RestTemplate:
2023-06-07 03:00:40.842 INFO 4280 — [io-17500-exec-2] b.c.c.config.LoggingRequestInterceptor : Method: POST
2023-06-07 03:00:43.936 INFO 4280 — [io-17500-exec-2] b.c.c.config.LoggingRequestInterceptor : URI: https://dev.laudos.com.br/orthanc-nightly-writer/tools/create-dicom
2023-06-07 03:00:44.281 INFO 4280 — [io-17500-exec-2] b.c.c.config.LoggingRequestInterceptor : Headers: [Accept:“text/plain, application/json, application/*+json, /”, Content-Type:“application/json”, Content-Length:“96508”, Authorization:“Basic Y2NyQWRtaW46bHgpMiMyNlYwIS1BMTNb”]
2023-06-07 03:00:45.184 INFO 4280 — [io-17500-exec-2] b.c.c.config.LoggingRequestInterceptor : Request Body: {“Content”:[“data:image/png;base64,superbigbase64text”],“Tags”:{“PatientBirthDate”:“20230602”,“PatientSex”:“M”,“InstitutionName”:“CENTRO DE IMAGEM DE ARARUAMA”,“RequestedProcedurePriority”:“ROUTINE”,“StudyDescription”:“qwdwq”,“PatientName”:“dqqw”,“EmptyStudy”:“false”,“PatientComments”:null,“Modality”:“AU”,“SOPClassUID”:“1.2.840.10008.5.1.4.1.1.7”,“SeriesDescription”:“qwdwq”}}
2023-06-07 03:00:46.165 ERROR 4280 — [io-17500-exec-2] unknown.jul.logger : ERRO!
org.springframework.web.client.HttpClientErrorException$NotFound: 404 Not Found: [{
“HttpError” : “Not Found”,
“HttpStatus” : 404,
“Message” : “Unknown resource”,
“Method” : “POST”,
“OrthancError” : “Unknown resource”,
“OrthancStatus” : 17,
“Uri” : “/tools/create-dicom”
}
]
Perhaps it is related to my headers… not sure really.
Hello,
In your query, you have the "EmptyStudy":"false"
, which doesn’t correspond to an existing DICOM tag. The following command-line query (which doesn’t try and set EmptyStudy
) works (tested on Orthanc 1.12.1):
$ curl http://localhost:8042/tools/create-dicom -d '{"Content":["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5wcLBg4peggT2wAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAADElEQVQI12P4//8/AAX+Av7czFnnAAAAAElFTkSuQmCC"],"Tags":{"PatientBirthDate":"20230602","PatientSex":"M","InstitutionName":"CENTRO DE IMAGEM DE ARARUAMA","RequestedProcedurePriority":"ROUTINE","StudyDescription":"qwdwq","PatientName":"dqqw","PatientComments":null,"Modality":"AU","SOPClassUID":"1.2.840.10008.5.1.4.1.1.7","SeriesDescription":"qwdwq"}}'
All the remaining problems are related to your Spring application, for which we cannot provide any support.
Regards,
Sébastien-