XNAT 1.5.1: Handling a new modaility

135 views
Skip to first unread message

Groat Mike

unread,
Aug 16, 2013, 3:46:10 PM8/16/13
to xnat_di...@googlegroups.com
Hello XNAT!
 
I first want to thank you guys for all the work you put in to build such a useful and beneficial tool. I recently started work on an existing project, and have been learning the ins and outs of XNAT.
 
We recently came across a need to handle images in a new modality. We have been processing ultrasound images for some time now, but have are now receiving images of the Other Type (OT) modality. When trying to upload these to XNAT through the upload images gui, I receive the following error:
 
Extraction / Review summary:
Importing file (1.2.40.0.13.1.1.1.10.34.100.93.20130530152911114.32768.dcm)
mkdir /imdata_xnat/xnat_cache/2/uploads/2/20130816_152925931
Uploading to /imdata_xnat/xnat_cache/2/uploads/2/20130816_152925931/1.2.40.0.13.1.1.1.10.34.100.93.20130530152911114.32768.dcm ... 
file uploaded
mkdir /imdata_xnat/xnat_prearchive/phn/20130816_152925931
Importing to /imdata_xnat/xnat_prearchive/phn/20130816_152925931
processing
looking for DICOM files
found 1 DICOM files
found DICOM study 900617918_000 (1.2.3.170.2.78170057980817579347912993222222557722)
Decompression error :org.dcm4che2.data.ConfigurationError: No Image Reader of class com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageReader available for format:jpeg. Storing in original format.
done finding DICOM
looking for ECAT files
found 0 ECAT files
done finding ECAT
done
Setting additional values for '900617918_000'
failed to set appropriate field(s) for '900617918_000'. Data may be publicly accessible until archived.
Premature end of file.
 Looking through xdat.log, the portion relevant to this upload is:
 
2013-08-16 15:29:26,169 [http-8080-39] ERROR org.nrg.xnat.turbine.utils.ImageUploadHelper -
org.xml.sax.SAXParseException: Premature end of file.
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:277)
 at org.nrg.xft.schema.Wrappers.XMLWrapper.SAXReader.parse(SAXReader.java:188)
 at org.nrg.xnat.turbine.utils.ImageUploadHelper.call(ImageUploadHelper.java:83)
 at org.nrg.xnat.helpers.PrearcImporterHelper.reorganize(PrearcImporterHelper.java:304)
 at org.nrg.xnat.helpers.PrearcImporterHelper.call(PrearcImporterHelper.java:160)
 at org.nrg.xnat.restlet.actions.SessionImporter.importToPrearc(SessionImporter.java:96)
 at org.nrg.xnat.restlet.actions.SessionImporter.call(SessionImporter.java:207)
 at org.nrg.xnat.restlet.services.Importer.handlePost(Importer.java:176)
 at org.restlet.Finder.handle(Finder.java:357)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Router.handle(Router.java:504)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
 at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112)
 at org.restlet.Application.handle(Application.java:341)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Router.handle(Router.java:504)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Router.handle(Router.java:504)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
 at org.restlet.Component.handle(Component.java:673)
 at org.restlet.Server.handle(Server.java:331)
 at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68)
 at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147)
 at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881)
 at org.nrg.xnat.restlet.servlet.XNATRestletServlet.service(XNATRestletServlet.java:99)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)
 at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Thread.java:662)
2013-08-16 15:29:26,169 [http-8080-39] INFO  org.nrg.xnat.turbine.utils.ImageUploadHelper - processing
2013-08-16 15:29:26,169 [http-8080-39] INFO  org.nrg.xnat.turbine.utils.ImageUploadHelper - looking for DICOM files
2013-08-16 15:29:26,169 [http-8080-39] INFO  org.nrg.xnat.turbine.utils.ImageUploadHelper - found 1 DICOM files
2013-08-16 15:29:26,169 [http-8080-39] INFO  org.nrg.xnat.turbine.utils.ImageUploadHelper - found DICOM study 900617918_000 (1.2.3.170.2.78170057980817579347912993222222557722)
2013-08-16 15:29:26,169 [http-8080-39] ERROR org.nrg.xnat.turbine.utils.ImageUploadHelper - Decompression error :org.dcm4che2.data.ConfigurationError: No Image Reader of class com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageReader available for format:jpeg. Storing in original format.
2013-08-16 15:29:26,169 [http-8080-39] INFO  org.nrg.xnat.turbine.utils.ImageUploadHelper - done finding DICOM
2013-08-16 15:29:26,169 [http-8080-39] INFO  org.nrg.xnat.turbine.utils.ImageUploadHelper - looking for ECAT files
2013-08-16 15:29:26,169 [http-8080-39] INFO  org.nrg.xnat.turbine.utils.ImageUploadHelper - found 0 ECAT files
2013-08-16 15:29:26,169 [http-8080-39] INFO  org.nrg.xnat.turbine.utils.ImageUploadHelper - done finding ECAT
2013-08-16 15:29:26,169 [http-8080-39] INFO  org.nrg.xnat.turbine.utils.ImageUploadHelper - done
2013-08-16 15:29:26,170 [http-8080-39] ERROR org.nrg.xnat.restlet.services.Importer -
org.nrg.action.ServerException: Premature end of file.
 at org.nrg.xnat.helpers.PrearcImporterHelper.call(PrearcImporterHelper.java:179)
 at org.nrg.xnat.restlet.actions.SessionImporter.importToPrearc(SessionImporter.java:96)
 at org.nrg.xnat.restlet.actions.SessionImporter.call(SessionImporter.java:207)
 at org.nrg.xnat.restlet.services.Importer.handlePost(Importer.java:176)
 at org.restlet.Finder.handle(Finder.java:357)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Router.handle(Router.java:504)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
 at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112)
 at org.restlet.Application.handle(Application.java:341)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Router.handle(Router.java:504)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Router.handle(Router.java:504)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
 at org.restlet.Filter.handle(Filter.java:195)
 at org.restlet.Filter.doHandle(Filter.java:150)
 at org.restlet.Filter.handle(Filter.java:195)
 at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
 at org.restlet.Component.handle(Component.java:673)
 at org.restlet.Server.handle(Server.java:331)
 at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68)
 at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147)
 at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881)
 at org.nrg.xnat.restlet.servlet.XNATRestletServlet.service(XNATRestletServlet.java:99)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)
 at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Thread.java:662)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
 at org.nrg.xdat.bean.reader.XDATXMLReader.parse(XDATXMLReader.java:465)
 at org.nrg.xnat.helpers.prearchive.PrearcTableBuilder.parseSession(PrearcTableBuilder.java:54)
 at org.nrg.xnat.restlet.actions.PrearcImporterA$PrearcSession.<init>(PrearcImporterA.java:121)
 at org.nrg.xnat.helpers.PrearcImporterHelper.call(PrearcImporterHelper.java:177)
 ... 57 more
 I have inspected the OT dicom, and haven't found any glaring differences between this dicom and the other US dicoms we have been able to process. I am at a bit of a loss given that we have not had issues with the US images we've been processing previously. If you would be able to point me in the right direction in how to resolve this, I will be eternally grateful!
 
Mike
 

Groat Mike

unread,
Aug 17, 2013, 5:23:50 PM8/17/13
to xnat_di...@googlegroups.com
I have been looking into this a bit more, and have made the following observations...

Inside the prearchive session directory for this study (900620902), the session xml is empty. This would be the cause of the parser error.
The dcmtoxnat.log for this session contains: "Session builder not implemented for SOP class [1.2.840.10008.5.1.4.1.1.7.4] or modality [OT]". This should be why the session xml 900620902.xml is empty.

I am now wondering if there anyone could help guide me in how to extend the SessionBuilder class to provide support for the OT modality. I appreciate any help you guys could provide!

Mike

Archie, Kevin

unread,
Aug 19, 2013, 2:53:34 PM8/19/13
to <xnat_discussion@googlegroups.com>
Hi, Mike,

it is true that we haven't implemented an OT session type, mostly because XNAT expects experiments to be of some known modality -- we can't extract anything meaningful from an OT file in general. If you have OT-only studies, and a sensible way to model the contents, then you might define your own datatype (https://wiki.xnat.org/display/XNAT/Customizing+XNAT) and modify the DICOM to XNAT metadata translation code (in the library dicom-xnat-mx-${VERSION).jar, source code at https://bitbucket.org/nrg/dicom-xnat). This will require nontrivial changes to Java code, and I can provide some advice if you want to go that way (ideally ending up with not just a working implementation code for you, but also a new tutorial for us). There was some refactoring in 1.6.2 that would make this easier, with more changes to text configuration files and less to Java code.

Alternatively, are these OTs associated with a second, "real" imaging study? Maybe you could upload the OT DICOM objects as experiment- or scan-level resources? That's probably a better match to the XNAT data model.

  - Kevin

--
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 post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at http://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/groups/opt_out.




The material in this message is private and may contain Protected Healthcare Information (PHI). 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.

Groat Mike

unread,
Aug 22, 2013, 1:34:42 PM8/22/13
to xnat_di...@googlegroups.com
Thanks Kevin!
 
I apologize for not getting back to you sooner, its been a very busy week for us. This gives me a great idea for a starting point, I just need to get with my higher-ups to see how much a priority it is for us to handle these, since we've only received a handful of these from one hospital. If I can find the time, I would love to give this a shot; I'd love to give something back to this community!
 
Mike
Reply all
Reply to author
Forward
0 new messages