Ohif Roi Color endpoints are not working

42 views
Skip to first unread message

Farhood Etaati

unread,
Aug 10, 2022, 1:19:54 AM8/10/22
to xnat_discussion
Hello,

According to this, XNAT ohif viewer should have an ROI contour color plugin that can add a predefined ROI label for a project or get the labels defined by the project.(/ohifroicolor endpoints)

Currently with the XNAT 1.8.5 and ohif viewer 3.3.0, I cannot use the put method at all and get a method not allowed response when I want to define a roi color list, nor I can get any list and get a 404 error when I use the get method.

Is these endpoints functional? And if so, how? There is also zero documentation about these.

Mo Al Sa'd

unread,
Aug 24, 2022, 10:45:14 AM8/24/22
to xnat_discussion
Hi Farhood,

Yes, the endpoint is functional.

Only XNAT admins can set the ROI colors for a specified project. The error message suggests that you do not have the permission for the PUT call.

Kind regards,
Mo

Farhood Etaati

unread,
Aug 24, 2022, 11:58:50 AM8/24/22
to xnat_di...@googlegroups.com
I'm fairly sure I'm sending the request via adequate auth_basic header which is currently my test admin user. This is definitely not the issue here.

--
You received this message because you are subscribed to a topic in the Google Groups "xnat_discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xnat_discussion/oJanKM9wunM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/cf5f7a98-f287-4579-87c6-1f200d4d6dacn%40googlegroups.com.

Mo Al Sa'd

unread,
Aug 29, 2022, 9:45:51 AM8/29/22
to xnat_discussion
Please explain more about "cannot use the PUT method", such as what response status do you receive when you invoke the call?

Here's a working example that you may want to try:
curl -X PUT "XNAT_HOSTNAME/xapi/ohifroicolor/projects/PROJ_ID/roicolor" -H "accept: */*" -H "Content-Type: application/json" -d "[ { \"label\": \"Kidney (Right)\", \"color\": \"0, 204, 0\" }, { \"label\": \"Kidney (Left)\", \"color\": \"255, 51, 51\" }, { \"label\": \"liver\", \"color\": \"255, 255, 50\" }]"
Reply all
Reply to author
Forward
0 new messages