Session builder not implemented for Opthalmic Photography (xnat:opSessionData)

瀏覽次數:77 次
跳到第一則未讀訊息

Choon Hua Thng

未讀,
2022年11月17日 上午9:41:192022/11/17
收件者:xnat_discussion
Hi
I created a new data type xnat:opSessionData.
I tried to load Opthalmic Photographs:
Modality=OP;
SOP Class UID=1.2.840.10008.5.1.4.1.1.77.1.5.1

But i encountered a "Session builder not implemented for SOP class."

May I pls seek some advice or help?

Best regards
Choon

Kate Alpert

未讀,
2022年11月29日 晚上10:38:272022/11/29
收件者:xnat_discussion
Hi, Choon,

The best way to work around this issue is to write a plugin to inject custom scan/session builder factories, see the sample repo, described in this post

Best,
Kate

Pei Lee

未讀,
2022年12月19日 上午10:02:112022/12/19
收件者:xnat_discussion
Hi Kate, 

Thank you so much for your kind assistance on this matter, and for the link to your sample repo. 

I cloned the sample repo and attempted to modify the modality from "SM" -> "OP". 

However, when attempting to build the jar file (just to test it out), I first encountered the following errors:

Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain

-> As a workaround, I went to install gradle-5.6.2 as specified in the gradle-wrapper.properties file. 

When running gradle-5.6.2 to build the jar file, I then encountered the following error:

Could not initialize class org.codehaus.groovy.reflection.ReflectionCache
> Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 [in thread "Daemon worker"]

When using the newer versions of gradle (gradle 7.6), I encountered the following error:
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

The XNAT version that we're using is XNAT 1.8, but I can't seem to find the plugin docs for XNAT 1.8. 

 I'm not familiar with XNAT plugins - would it be possible for you to very kindly assist on this matter? We would only need to load Opthalmic Photographs for the dicom modality = "OP".

Thank you so much for your help on this!  

Kind regards, 
PY

Rick Herrick

未讀,
2022年12月19日 下午1:09:532022/12/19
收件者:xnat_di...@googlegroups.com
Hi Pei,

The immediate issue with the ClassNotFoundException is that gradle-wrapper.jar is missing in that repository. You can fix that by going to this URL, clicking View raw (which should download gradle-wrapper.jar), then moving the downloaded jar file to the folder gradle/wrapper in your cloned repository. Now when you run that ./gradlew jar you should get a proper build.

You may also want to reference the template plugin as well, which you can find here. The build configuration for that plugin is newer, using Gradle 7.2, and also includes the xnat-data-builder plugin, which generates metadata in the plugin jar that XNAT uses to locate your plugin.

Adapting from SM to OP modality will require more than just changing “SM” to “OP” in that one location. For example, classes like XnatSmscandataBeanFactory and XnatSmScanAttributes should be renamed to reflect the change in modality. These classes also reference the XFT bean classes for SM data, XnatSmsessiondataBean and XnatSmscandataBean. You’ll need to change those to reference the XFT bean classes for OP data, XnatOpsessiondataBean and XnatOpscandataBean.

Try making those changes and see what happens.

I’ll also repeat our standard warning: don’t deploy this onto your production system until you’ve thoroughly tested it on a development system! And make sure to back up your database before deploying to production as well...

Rick Herrick
Senior Software Developer


------ Original Message ------
From "Pei Lee" <py3...@gmail.com>
To "xnat_discussion" <xnat_di...@googlegroups.com>
Date 12/19/2022 1:17:55 AM
Subject [XNAT Discussion] Re: Session builder not implemented for Opthalmic Photography (xnat:opSessionData)

--
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/8ae09854-e136-4e35-8ca2-024022e4dbfcn%40googlegroups.com.
回覆所有人
回覆作者
轉寄
0 則新訊息