From b8aba1c8a3f229053345e75857c6780cc90e9e16 Mon Sep 17 00:00:00 2001 From: Christian Tischer Date: Sun, 25 Feb 2024 12:42:51 +0100 Subject: [PATCH] Rename SpimDataImage to ImageDataImage --- pom.xml.releaseBackup | 249 ------------------ release.properties | 28 -- src/main/java/org/embl/mobie/MoBIE.java | 17 +- .../embl/mobie/lib/bdv/ScreenShotMaker.java | 2 + .../mobie/lib/hcs/VirtualBioFormatsStack.java | 5 - ...SpimDataImage.java => ImageDataImage.java} | 12 +- src/test/java/develop/OpenIlastikHDF5.java | 2 + 7 files changed, 20 insertions(+), 295 deletions(-) delete mode 100644 pom.xml.releaseBackup delete mode 100644 release.properties rename src/main/java/org/embl/mobie/lib/image/{SpimDataImage.java => ImageDataImage.java} (90%) diff --git a/pom.xml.releaseBackup b/pom.xml.releaseBackup deleted file mode 100644 index 4aaa883f1..000000000 --- a/pom.xml.releaseBackup +++ /dev/null @@ -1,249 +0,0 @@ - - - 4.0.0 - - org.scijava - pom-scijava - 36.0.0 - - - org.embl.mobie - mobie-viewer-fiji - 4.2.3-SNAPSHOT - - - - - - - - - https://github.com/mobie/mobie-viewer-fiji - MoBIE Fiji Viewer - Fiji viewer for MoBIE projects - 2018 - - EMBL - http://embl.de/ - - - - Simplified BSD License - repo - - - - - tischi - Christian Tischer - - lead - developer - debugger - reviewer - support - maintainer - - - - - - Kimberly Meechan - - developer - debugger - reviewer - support - - - - - - Image.sc Forum - https://forum.image.sc/ - - - - scm:git:https://github.com/mobie/mobie-viewer-fiji - scm:git:git@github.com:mobie/mobie-viewer-fiji - mobie-viewer-fiji-4.0.7 - https://github.com/mobie/mobie-viewer-fiji - - - GitHub - https://github.com/mobie/mobie-viewer-fiji/issues - - - Github Actions - https://github.com/mobie/mobie-viewer-fiji/actions - - - de.embl.cba.mobie - bsd_2 - EMBL - true - - 0.8.0 - 0.6.9 - 2.2.3 - 1.0.2 - 16.0.2 - - - 1.6.0-scijava-2 - - - 0.43.1 - 0.10.0 - - - sign,deploy-to-scijava - - - - - - scijava.public - https://maven.scijava.org/content/groups/public - - - - - - net.imagej - imagej-legacy - - - - mpicbg - mpicbg - - - - sc.fiji - TurboReg_ - 2.0.0 - - - sc.fiji - bigdataviewer-playground - ${bigdataviewer-playground.version} - - - net.imagej - imagej - - - - - net.imglib2 - imglib2 - - - net.imglib2 - imglib2-cache - - - sc.fiji - bigdataviewer-core - - - - sc.fiji - bigdataviewer-vistools - - - sc.fiji - spim_data - - - org.embl.mobie - mobie-io - ${mobie-io.version} - - - - sc.fiji - 3D_Viewer - 4.0.5 - - - org.scijava - j3dcore - - - de.embl.cba - imagej-utils - ${imagej-utils.version} - - - net.imagej - imagej - - - - - org.jetbrains - annotations - ${annotations.version} - - - com.formdev - flatlaf - - - net.imagej - ij - - - trove - trove - ${trove.version} - - - tech.tablesaw - tablesaw-core - ${tablesaw-core.version} - - - net.tlabs-data - tablesaw_${tablesaw-core.version}-parquet - ${tablesaw-parquet.version} - - - info.picocli - picocli - - - net.imagej - imagej - - - org.junit.jupiter - junit-jupiter-api - 5.4.2 - test - - - org.junit.jupiter - junit-jupiter-engine - 5.4.2 - test - - - com.github.erosb - everit-json-schema - 1.14.2 - test - - - diff --git a/release.properties b/release.properties deleted file mode 100644 index 7969cbd2f..000000000 --- a/release.properties +++ /dev/null @@ -1,28 +0,0 @@ -#release configuration -#Tue Feb 20 17:48:00 CET 2024 -scm.commentPrefix=[maven-release-plugin] -project.scm.org.embl.mobie\:mobie-viewer-fiji.url=https\://github.com/mobie/mobie-viewer-fiji -exec.pomFileName=pom.xml -pushChanges=false -releaseStrategyId=default -project.dev.org.embl.mobie\:mobie-viewer-fiji=4.2.4-SNAPSHOT -project.scm.org.embl.mobie\:mobie-viewer-fiji.connection=scm\:git\:https\://github.com/mobie/mobie-viewer-fiji -project.rel.org.embl.mobie\:mobie-viewer-fiji=4.2.3 -projectVersionPolicyConfig=${projectVersionPolicyConfig}\n -scm.tag=mobie-viewer-fiji-4.2.3 -remoteTagging=true -exec.additionalArguments=-Dgpg.skip\=true -scm.branchCommitComment=@{prefix} prepare branch @{releaseLabel} -projectVersionPolicyId=default -scm.url=scm\:git\:git@github.com\:mobie/mobie-viewer-fiji -scm.tagNameFormat=@{project.artifactId}-@{project.version} -pinExternals=false -preparationGoals=clean verify -scm.releaseCommitComment=@{prefix} prepare release @{releaseLabel} -exec.snapshotReleasePluginAllowed=false -project.scm.org.embl.mobie\:mobie-viewer-fiji.developerConnection=scm\:git\:git@github.com\:mobie/mobie-viewer-fiji -exec.activateProfiles=deploy-to-scijava -project.scm.org.embl.mobie\:mobie-viewer-fiji.tag=mobie-viewer-fiji-4.0.7 -scm.developmentCommitComment=@{prefix} prepare for next development iteration -scm.rollbackCommitComment=@{prefix} rollback the release of @{releaseLabel} -completedPhase=generate-release-poms diff --git a/src/main/java/org/embl/mobie/MoBIE.java b/src/main/java/org/embl/mobie/MoBIE.java index 97926b609..e6872cb9d 100644 --- a/src/main/java/org/embl/mobie/MoBIE.java +++ b/src/main/java/org/embl/mobie/MoBIE.java @@ -50,7 +50,7 @@ import org.embl.mobie.lib.hcs.Site; import org.embl.mobie.lib.image.CachedCellImage; import org.embl.mobie.lib.image.Image; -import org.embl.mobie.lib.image.SpimDataImage; +import org.embl.mobie.lib.image.ImageDataImage; import org.embl.mobie.lib.io.DataFormats; import org.embl.mobie.lib.io.StorageLocation; import org.embl.mobie.plugins.platybrowser.GeneSearchCommand; @@ -712,7 +712,7 @@ private void initDataSource( DataSource dataSource, String log ) { if ( imageDataFormat.equals( ImageDataFormat.SpimData ) ) { - return new SpimDataImage<>( ( AbstractSpimData ) storageLocation.data, storageLocation.getChannel(), name, settings.values.getRemoveSpatialCalibration() ); + return new ImageDataImage<>( ( AbstractSpimData ) storageLocation.data, storageLocation.getChannel(), name, settings.values.getRemoveSpatialCalibration() ); } if ( imageDataFormat.equals( ImageDataFormat.IlastikHDF5 ) ) @@ -728,25 +728,26 @@ private void initDataSource( DataSource dataSource, String log ) { // the whole plate is already initialised as one big SpimData // note that channel <=> setupID - return new SpimDataImage( site.getSpimData(), site.channel, name, settings.values.getRemoveSpatialCalibration() ); + return new ImageDataImage( site.getSpimData(), site.channel, name, settings.values.getRemoveSpatialCalibration() ); } if ( site.getImageDataFormat().equals( ImageDataFormat.OmeZarr ) ) { - return new SpimDataImage( ImageDataFormat.OmeZarr, site.absolutePath, site.channel, name, ThreadHelper.sharedQueue, settings.values.getRemoveSpatialCalibration() ); + return new ImageDataImage( ImageDataFormat.OmeZarr, site.absolutePath, site.channel, name, ThreadHelper.sharedQueue, settings.values.getRemoveSpatialCalibration() ); } if ( site.getImageDataFormat().equals( ImageDataFormat.OmeZarrS3 ) ) { - return new SpimDataImage( ImageDataFormat.OmeZarrS3, site.absolutePath, site.channel, name, ThreadHelper.sharedQueue, settings.values.getRemoveSpatialCalibration() ); + return new ImageDataImage( ImageDataFormat.OmeZarrS3, site.absolutePath, site.channel, name, ThreadHelper.sharedQueue, settings.values.getRemoveSpatialCalibration() ); } - return new SpimDataImage( site, name, ThreadHelper.sharedQueue, settings.values.getRemoveSpatialCalibration() ); + return new ImageDataImage( site, name, ThreadHelper.sharedQueue, settings.values.getRemoveSpatialCalibration() ); } + // FIXME: The image below should not be called SpimDataImage final String imagePath = getImageLocation( imageDataFormat, storageLocation ); - final SpimDataImage spimDataImage = new SpimDataImage( imageDataFormat, imagePath, storageLocation.getChannel(), name, ThreadHelper.sharedQueue, settings.values.getRemoveSpatialCalibration() ); - return spimDataImage; + final ImageDataImage imageDataImage = new ImageDataImage( imageDataFormat, imagePath, storageLocation.getChannel(), name, ThreadHelper.sharedQueue, settings.values.getRemoveSpatialCalibration() ); + return imageDataImage; } public List< DataSource > getDataSources( Set< String > names ) diff --git a/src/main/java/org/embl/mobie/lib/bdv/ScreenShotMaker.java b/src/main/java/org/embl/mobie/lib/bdv/ScreenShotMaker.java index cd2f75ec8..baf5b33e3 100644 --- a/src/main/java/org/embl/mobie/lib/bdv/ScreenShotMaker.java +++ b/src/main/java/org/embl/mobie/lib/bdv/ScreenShotMaker.java @@ -28,6 +28,7 @@ */ package org.embl.mobie.lib.bdv; +import bdv.SpimSource; import bdv.util.BdvHandle; import bdv.viewer.Interpolation; import bdv.viewer.Source; @@ -110,6 +111,7 @@ public Roi[] getMasks() public void run( Double targetSamplingInXY ) { List< SourceAndConverter< ? > > sacs = getVisibleSourceAndConverters(); + run( sacs, targetSamplingInXY ); } diff --git a/src/main/java/org/embl/mobie/lib/hcs/VirtualBioFormatsStack.java b/src/main/java/org/embl/mobie/lib/hcs/VirtualBioFormatsStack.java index de86aef5b..d3fe40ea0 100644 --- a/src/main/java/org/embl/mobie/lib/hcs/VirtualBioFormatsStack.java +++ b/src/main/java/org/embl/mobie/lib/hcs/VirtualBioFormatsStack.java @@ -4,15 +4,10 @@ import ij.ImagePlus; import ij.ImageStack; import ij.WindowManager; -import ij.io.Opener; import ij.plugin.FolderOpener; import ij.process.*; import ij.util.Tools; -import io.scif.img.IO; -import loci.formats.in.CellSensReader; -import org.embl.mobie.io.SpimDataOpener; import org.embl.mobie.io.util.IOHelper; -import org.embl.mobie.lib.MoBIEHelper; import java.awt.*; import java.awt.image.ColorModel; diff --git a/src/main/java/org/embl/mobie/lib/image/SpimDataImage.java b/src/main/java/org/embl/mobie/lib/image/ImageDataImage.java similarity index 90% rename from src/main/java/org/embl/mobie/lib/image/SpimDataImage.java rename to src/main/java/org/embl/mobie/lib/image/ImageDataImage.java index 98923ceb1..b3ab312cb 100644 --- a/src/main/java/org/embl/mobie/lib/image/SpimDataImage.java +++ b/src/main/java/org/embl/mobie/lib/image/ImageDataImage.java @@ -45,7 +45,10 @@ import javax.annotation.Nullable; -public class SpimDataImage< T extends NumericType< T > & RealType< T > > implements Image< T > +/** + * Converts various input resources into an {@code Image}. + */ +public class ImageDataImage< T extends NumericType< T > & RealType< T > > implements Image< T > { private ImageDataFormat imageDataFormat; private String path; @@ -60,7 +63,7 @@ public class SpimDataImage< T extends NumericType< T > & RealType< T > > impleme private TransformedSource< T > transformedSource; private AffineTransform3D currentTransform = new AffineTransform3D(); - public SpimDataImage( AbstractSpimData< ? > spimData, Integer setupId, String name, Boolean removeSpatialCalibration ) + public ImageDataImage( AbstractSpimData< ? > spimData, Integer setupId, String name, Boolean removeSpatialCalibration ) { this.imageDataFormat = null; this.path = null; @@ -71,7 +74,7 @@ public SpimDataImage( AbstractSpimData< ? > spimData, Integer setupId, String na createSourcePair( spimData, setupId, name ); } - public SpimDataImage( ImageDataFormat imageDataFormat, String path, int setupId, String name, @Nullable SharedQueue sharedQueue, Boolean removeSpatialCalibration ) + public ImageDataImage( ImageDataFormat imageDataFormat, String path, int setupId, String name, @Nullable SharedQueue sharedQueue, Boolean removeSpatialCalibration ) { this.imageDataFormat = imageDataFormat; this.path = path; @@ -81,7 +84,7 @@ public SpimDataImage( ImageDataFormat imageDataFormat, String path, int setupId, this.removeSpatialCalibration = removeSpatialCalibration; } - public SpimDataImage( Site site, String name, SharedQueue sharedQueue, Boolean removeSpatialCalibration ) + public ImageDataImage( Site site, String name, SharedQueue sharedQueue, Boolean removeSpatialCalibration ) { this.setupId = site.getChannel(); this.name = name; @@ -153,7 +156,6 @@ public void setMask( RealMaskRealInterval mask ) private void open() { final AbstractSpimData< ? > spimData = openSpimData(); - createSourcePair( spimData, setupId, name ); } diff --git a/src/test/java/develop/OpenIlastikHDF5.java b/src/test/java/develop/OpenIlastikHDF5.java index cf749f137..42eedc5de 100644 --- a/src/test/java/develop/OpenIlastikHDF5.java +++ b/src/test/java/develop/OpenIlastikHDF5.java @@ -32,6 +32,7 @@ import org.embl.mobie.lib.ThreadHelper; import org.embl.mobie.lib.image.CachedCellImage; import org.embl.mobie.lib.image.SourcePair; +import sc.fiji.bdvpg.sourceandconverter.SourceAndConverterHelper; public class OpenIlastikHDF5 { @@ -39,5 +40,6 @@ public static void main( String[] args ) { final CachedCellImage< ? > test = new CachedCellImage( "test", "/Users/tischer/Desktop/C5_2022-07-12-165037-0000--0.4.0-0-1.4.0--tracking-oids.h5", 0, ImageDataFormat.IlastikHDF5, ThreadHelper.sharedQueue ); final SourcePair< ? > sourcePair = test.getSourcePair(); + } }