1515 * Output: catalog.json file for use with QuPath extension manager
1616 *
1717 * @author BIOP
18- * @version 1 .0
19- * @requires QuPath v0.6 .0+
18+ * @version 2 .0
19+ * @requires QuPath v0.7 .0+
2020 */
2121
2222// --------------- YOU NEED TO MODIFY THIS VARIABLE BEFORE RUNNING IT
@@ -37,9 +37,9 @@ def mvn_central_url = "https://repo1.maven.org/maven2/"
3737
3838def gh_biop_url = " https://github.com/BIOP/"
3939
40- def qupathVersionRange0606 = new VersionRange (" v0.6.0" , " v0.6.0" , null )
41- def qupathVersionRange0607 = new VersionRange (" v0.6.0" , " v0.7.0" , null )
42- def qupathVersionRange0707 = new VersionRange (" v0.7.0" , " v0.7.0" , null )
40+ def qupathVersionRange0606 = new VersionRangeModel (" v0.6.0" , " v0.6.0" , null )
41+ def qupathVersionRange0607 = new VersionRangeModel (" v0.6.0" , " v0.7.0" , null )
42+ def qupathVersionRange0707 = new VersionRangeModel (" v0.7.0" , " v0.7.0" , null )
4343
4444def extensionList = []
4545
@@ -54,7 +54,7 @@ def cellposeTagList = [
5454 ]
5555def cellposeVersionList = []
5656cellposeTagList. each{tag , versionRange ->
57- var cellposeRelease = new Release (
57+ var cellposeRelease = new ReleaseModel (
5858 tag,
5959 new URI (gh_biop_url+ " qupath-extension-cellpose/releases/download/" + tag+ " /qupath-extension-cellpose-" + tag[1 .. -1 ]+ " .zip" ),
6060 null ,
@@ -65,7 +65,7 @@ cellposeTagList.each{tag, versionRange ->
6565
6666 cellposeVersionList. add(cellposeRelease)
6767}
68- var cellposeExtension = new Extension (
68+ var cellposeExtension = new ExtensionModel (
6969 " QuPath Cellpose extension" ,
7070 " QuPath extension to use Cellpose" ,
7171 " BIOP" ,
@@ -78,11 +78,11 @@ extensionList.add(cellposeExtension)
7878
7979// ------------------------ WARPY EXTENSION
8080def warpyTagList = [
81- " 0.4.2" : qupathVersionRange0607
81+ " 0.4.2" : qupathVersionRange0606
8282]
8383def warpyVersionList = []
8484warpyTagList. each{tag , versionRange ->
85- var warpyRelease = new Release (
85+ var warpyRelease = new ReleaseModel (
8686 " v" + tag,
8787 new URI (gh_biop_url + " qupath-extension-warpy/releases/download/" + tag+ " /qupath-extension-warpy-" + tag+ " .jar" ),
8888 List . of(new URI (mvn_sj_url + " net/imglib2/imglib2-realtransform/" + imglib2_realtransform_version+ " /imglib2-realtransform-" + imglib2_realtransform_version+ " .jar" ), // real-transform
@@ -98,7 +98,7 @@ warpyTagList.each{tag, versionRange->
9898
9999 warpyVersionList. add(warpyRelease)
100100}
101- var warpyExtension = new Extension (
101+ var warpyExtension = new ExtensionModel (
102102 " QuPath Warpy extension" ,
103103 " Warpy - QuPath extension that supports transformations (affine, spline) of images." ,
104104 " BIOP" ,
@@ -111,11 +111,11 @@ extensionList.add(warpyExtension)
111111
112112// ------------------------ ABBA EXTENSION
113113def abbaTagList = [
114- " 0.4.0" : qupathVersionRange0607
114+ " 0.4.0" : qupathVersionRange0606
115115]
116116def abbaVersionList = []
117117abbaTagList. each{tag , versionRange ->
118- var abbaRelease = new Release (
118+ var abbaRelease = new ReleaseModel (
119119 " v" + tag,
120120 new URI (gh_biop_url + " qupath-extension-abba/releases/download/" + tag+ " /qupath-extension-abba-" + tag+ " .jar" ),
121121 List . of(new URI (mvn_sj_url + " net/imglib2/imglib2-realtransform/" + imglib2_realtransform_version+ " /imglib2-realtransform-" + imglib2_realtransform_version+ " .jar" ), // real-transform
@@ -133,7 +133,7 @@ abbaTagList.each{tag, versionRange->
133133
134134 abbaVersionList. add(abbaRelease)
135135}
136- var abbaExtension = new Extension (
136+ var abbaExtension = new ExtensionModel (
137137 " QuPath ABBA extension" ,
138138 " QuPath extension to use Aligning Big Brain and Atlases" ,
139139 " BIOP" ,
@@ -154,7 +154,7 @@ def spotiflowTagList = [
154154]
155155def spotiflowVersionList = []
156156spotiflowTagList. each{tag , versionRange ->
157- var spotiflowRelease = new Release (
157+ var spotiflowRelease = new ReleaseModel (
158158 tag,
159159 new URI (gh_biop_url + " qupath-extension-spotiflow/releases/download/" + tag+ " /qupath-extension-spotiflow-" + tag[1 .. -1 ]+ " .zip" ),
160160 null ,
@@ -171,7 +171,7 @@ def oldSpotiflowTagList = [
171171 " v0.2.0" : qupathVersionRange0606
172172]
173173oldSpotiflowTagList. each{tag , versionRange ->
174- var spotiflowRelease = new Release (
174+ var spotiflowRelease = new ReleaseModel (
175175 tag,
176176 new URI (gh_biop_url + " qupath-extension-spotiflow/releases/download/" + tag+ " /qupath-extension-spotiflow-" + tag[1 .. -1 ]+ " .jar" ),
177177 null ,
@@ -182,7 +182,7 @@ oldSpotiflowTagList.each{tag, versionRange->
182182
183183 spotiflowVersionList. add(spotiflowRelease)
184184}
185- var spotiflowExtension = new Extension (
185+ var spotiflowExtension = new ExtensionModel (
186186 " QuPath Spotiflow extension" ,
187187 " QuPath extension to use Spotiflow" ,
188188 " BIOP" ,
@@ -235,7 +235,7 @@ def biopTagList = [
235235]
236236def biopVersionList = []
237237biopTagList. each{tag , versionRange ->
238- var biopRelease = new Release (
238+ var biopRelease = new ReleaseModel (
239239 tag,
240240 new URI (gh_biop_url + " qupath-extension-biop/releases/download/" + tag+ " /qupath-extension-biop-" + tag[1 .. -1 ]+ " .jar" ),
241241 null ,
@@ -246,7 +246,7 @@ biopTagList.each{tag, versionRange->
246246
247247 biopVersionList. add(biopRelease)
248248}
249- var biopExtension = new Extension (
249+ var biopExtension = new ExtensionModel (
250250 " QuPath BIOP extension" ,
251251 " QuPath extension containing utilitiy functions by the BIOP" ,
252252 " BIOP" ,
@@ -257,7 +257,7 @@ var biopExtension = new Extension(
257257extensionList. add(biopExtension)
258258
259259
260- var catalog = new Catalog (
260+ var catalog = new CatalogModel (
261261 " QuPath-BIOP catalog" ,
262262 " Extensions maintained by the BIOP team" ,
263263 extensionList
@@ -274,8 +274,7 @@ try (FileWriter fileWriter = new FileWriter(savingFolder)) {
274274}
275275println " Catalog saved to " + savingFolder
276276
277-
278- import qupath.ext.extensionmanager.core.catalog.*
277+ import qupath.ext.extensionmanager.core.model.*
279278import com.google.gson.GsonBuilder
280279import com.google.gson.FieldNamingPolicy
281280import java.nio.file.Paths
0 commit comments