OHIF Viewer - Error loading images after migration

350 views
Skip to first unread message

Duncan Smith

unread,
Apr 17, 2020, 9:06:27 AM4/17/20
to xnat_discussion
Hi all,

We are currently in the process of migrating one of our XNAT instances to new servers. We have taken the full migration route in the sense of copying over the full archive and a database dump and importing it to create an identical instance as much as possible.

I've found that in doing so, the OHIF Viewer is no longer able to display any images it previously had metadata for. I am met with "Error Loading Image - An error has occurred loading image: dicomweb://<old file path>". When looking at the metadata .json file on the server I can see there is a url field with a reference to the old file path. After manually removing a json file for a session I am able to re-generate a new file and this allows the OHIF Viewer to work again. 

From what I can tell, when running a site or session-wide meta-generation through Swagger (or similar) this only creates new data when there is no existing metadata. The existing json files do not get modified or replaced after successfully running the command.

Before I write a script to find and remove the existing metadata json files from the server, is there a better way to deal with this situation?

This new instance is using XNAT 1.7.6. and the 2.1 OHIF Viewer.

Thanks in advance,

Duncan.

Simon Doran

unread,
Apr 20, 2020, 12:23:30 PM4/20/20
to xnat_discussion
Hi Duncan,

  Yes, it should be really straightforward to deal with this, although, depending on the size of your archive this could take a while to run.

  Just go to the Swagger page for your new instance: Administer -> Site Administration -> Other -> Miscellaneous -> Development Utilities -> Swagger.

  On it you will see a list of all the "new format" REST APIs (xapis) supported by your particular instance. If you have the OHIF viewer plugin installed, then one of these APIs will be the OHIF viewer one. Once you have found this, click on the POST button at the top of the section, so that your screen looks like this:

Capture.PNG


  If you click on the "Try it out!" button, you should find that the system will whirr away (for quite some time, depending on how big your archive is) and regenerate all the links. After that, the viewer should work again as if nothing had ever happened!


  Best wishes,


Simon 


Moore, Charlie

unread,
Apr 20, 2020, 12:35:11 PM4/20/20
to xnat_di...@googlegroups.com
Hi Duncan,

As an addendum to Simon's post, if you find that this still doesn't resolve the issue, please double check that you have updated XNAT's Site URL value in the admin UI. That's in the top bar in Administer > Site Administration, then "Site Url" in the default tab. If it still has the old URL, regenerating the cached JSON is just going to be putting the incorrect value back in. Additionally, if you haven't restarted tomcat since updating the value, you should do that as well. I believe the OHIF viewer caches that value, so it might be cached as the old URL.

Thanks,
Charlie

From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of Simon Doran <simon...@icr.ac.uk>
Sent: Monday, April 20, 2020 11:23 AM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] Re: OHIF Viewer - Error loading images after migration
 

* External Email - Caution *

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/6ba50c0c-5806-4efa-b98a-b593ac77b0e7%40googlegroups.com.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Duncan Smith

unread,
Apr 23, 2020, 5:11:57 AM4/23/20
to xnat_discussion
Hi guys,

While the site-wide Swagger tool didn't work to begin with, it looks like this was caused by the caching issue as I'm unsure if Tomcat had been restarted after the Site URL change.

Once restarted, this tool worked as expected and managed to work through and create updated metadata for the archive.

Thanks for your help with this,

Duncan.

Simon Doran

unread,
Apr 23, 2020, 9:27:25 PM4/23/20
to xnat_discussion
Excellent. Glad it's all sorted now.

Best wishes,
Simon

Reply all
Reply to author
Forward
0 new messages