From a0f972b8c1139dc6538b227b7b8692c96d86142d Mon Sep 17 00:00:00 2001 From: Christian Tischer Date: Sat, 2 Nov 2024 09:32:13 +0100 Subject: [PATCH] Improve opening of OpenOrganelle data and default collection table views to exclusive=false and add another column column to modify this behaviour --- pom.xml | 6 +- src/main/java/org/embl/mobie/MoBIE.java | 4 +- src/main/java/org/embl/mobie/cmd/HCSCmd.java | 1 - .../AbstractTransformationCommand.java | 2 +- .../context/AutomaticRegistrationCommand.txt | 2 +- .../command/context/SourcesInfoCommand.java | 2 +- .../open/OpenCollectionTableCommand.java | 2 +- .../command/open/OpenHCSDatasetCommand.java | 2 +- .../open/OpenImageAndLabelsCommand.java | 3 +- .../OpenMultipleImagesAndLabelsCommand.java | 2 +- .../command/open/OpenOMEZARRCommand.java | 2 +- .../mobie/command/open/OpenTableCommand.java | 2 +- .../OpenMoBIEProjectExpertCommand.java | 4 +- .../special/OpenMicrogliaTableCommand.java | 1 - .../command/view/ViewCurrentImageCommand.java | 2 +- .../ViewImageAndLabelsAndTableCommand.java | 2 +- .../widget/SwingSelectableImagesWidget.java | 2 +- .../org/embl/mobie/lib/ImageDataAdder.java | 1 + .../mobie/lib/SourcesFromTableCreator.java | 4 +- .../lib/bdv/MobieSerializableBdvOptions.java | 2 +- .../embl/mobie/lib/bdv/ScreenShotMaker.java | 4 +- .../lib/bdv/overlay/ImageNameOverlay.java | 1 + .../lib/bdv/view/AnnotationSliceView.java | 3 +- .../mobie/lib/create/DatasetSerializer.java | 3 +- .../embl/mobie/lib/create/ProjectCreator.java | 3 +- .../lib/data/CollectionTableDataSetter.java | 65 +++-- .../mobie/lib/data/GridSourcesDataSetter.java | 2 +- .../embl/mobie/lib/data/ImageGridSources.java | 6 +- .../embl/mobie/lib/data/LabelGridSources.java | 2 +- .../java/org/embl/mobie/lib/hcs/Plate.java | 2 +- .../lib/hcs/omezarr/OMEZarrHCSHelper.java | 4 +- .../embl/mobie/lib/image/StitchedImage.java | 4 +- .../org/embl/mobie/lib/io/DataFormats.java | 1 + .../org/embl/mobie/lib/serialize/View.java | 4 +- .../display/AbstractAnnotationDisplay.java | 2 +- .../transformation/AffineTransformation.java | 2 +- .../InterpolatedAffineTransformation.java | 2 +- .../TimepointsTransformation.java | 2 - .../lib/table/DefaultAnnotatedSegment.java | 1 + .../mobie/lib/table/DistanceComputer.java | 2 +- .../table/RegionDisplayAnnDataCreator.java | 3 +- .../columns/CollectionTableConstants.java | 91 ++++--- .../lib/table/{ => columns}/ColumnNames.java | 2 +- .../columns/MoBIESegmentColumnNames.java | 2 - .../embl/mobie/lib/table/saw/TableOpener.java | 2 +- .../saw/TableSawAnnotatedRegionCreator.java | 2 +- .../table/saw/TableSawAnnotatedSegment.java | 1 - .../lib/table/saw/TableSawAnnotatedSpot.java | 2 +- .../saw/TableSawAnnotatedSpotCreator.java | 2 +- .../mobie/lib/transform/ImageTransformer.java | 2 +- .../mobie/lib/{ => util}/MoBIEHelper.java | 2 +- .../OpenOrganelleCollectionTableCreator.java | 155 +++++++++++ .../mobie/lib/{ => util}/ThreadHelper.java | 2 +- .../plugins/platybrowser/GeneSearch.java | 2 +- .../org/embl/mobie/{lib => ui}/MoBIEInfo.java | 2 +- .../mobie/ui/SourceAndConverterProvider.java | 2 +- .../embl/mobie/ui/UserInterfaceHelper.java | 3 +- ...markMultithreadedTableSawTableLoading.java | 2 +- .../develop/OpenWithBioFormatsFromS3.java | 1 - src/test/java/develop/hcs/HCSIncuyteRaw.java | 1 - src/test/java/develop/hcs/HCSYokogawaCQ1.java | 3 +- .../resources/collections/open-organelle.txt | 7 + src/test/resources/uriToImages.json | 244 ++++++++++++++++++ 63 files changed, 575 insertions(+), 123 deletions(-) rename src/main/java/org/embl/mobie/lib/table/{ => columns}/ColumnNames.java (98%) rename src/main/java/org/embl/mobie/lib/{ => util}/MoBIEHelper.java (99%) create mode 100644 src/main/java/org/embl/mobie/lib/util/OpenOrganelleCollectionTableCreator.java rename src/main/java/org/embl/mobie/lib/{ => util}/ThreadHelper.java (99%) rename src/main/java/org/embl/mobie/{lib => ui}/MoBIEInfo.java (99%) create mode 100644 src/test/resources/collections/open-organelle.txt create mode 100644 src/test/resources/uriToImages.json diff --git a/pom.xml b/pom.xml index f4ef63d3a..9288c967c 100644 --- a/pom.xml +++ b/pom.xml @@ -9,9 +9,9 @@ org.embl.mobie mobie-viewer-fiji - 5.5.5 - + 5.5.6-SNAPSHOT + @@ -83,7 +83,7 @@ EMBL true - 3.0.4 + 3.1.0-SNAPSHOT 0.7.0 0.9.0 diff --git a/src/main/java/org/embl/mobie/MoBIE.java b/src/main/java/org/embl/mobie/MoBIE.java index 5c6f5fa83..7cf9ed12b 100644 --- a/src/main/java/org/embl/mobie/MoBIE.java +++ b/src/main/java/org/embl/mobie/MoBIE.java @@ -56,6 +56,8 @@ import org.embl.mobie.lib.table.columns.CollectionTableConstants; import org.embl.mobie.lib.table.saw.TableOpener; import org.embl.mobie.lib.transform.GridType; +import org.embl.mobie.lib.util.MoBIEHelper; +import org.embl.mobie.lib.util.ThreadHelper; import org.embl.mobie.lib.view.ViewManager; import org.embl.mobie.plugins.platybrowser.GeneSearchCommand; import org.embl.mobie.ui.UserInterface; @@ -137,7 +139,7 @@ public MoBIE( String uri, MoBIESettings settings ) throws IOException CollectionTableDataSetter dataSetter = new CollectionTableDataSetter( table, settings.values.getDataRoot() ); dataSetter.addToDataset( dataset ); - dataset.is2D( false ); // TODO: determine from data?! + dataset.is2D( settings.values.getBdvViewingMode().equals( BdvViewingMode.TwoDimensional ) ); initUiAndShowView( dataset.views().values().iterator().next().getName() ); } diff --git a/src/main/java/org/embl/mobie/cmd/HCSCmd.java b/src/main/java/org/embl/mobie/cmd/HCSCmd.java index 105ac637e..18fecb879 100644 --- a/src/main/java/org/embl/mobie/cmd/HCSCmd.java +++ b/src/main/java/org/embl/mobie/cmd/HCSCmd.java @@ -30,7 +30,6 @@ import org.embl.mobie.MoBIE; import org.embl.mobie.MoBIESettings; -import org.embl.mobie.lib.MoBIEHelper; import picocli.CommandLine; import picocli.CommandLine.Option; diff --git a/src/main/java/org/embl/mobie/command/context/AbstractTransformationCommand.java b/src/main/java/org/embl/mobie/command/context/AbstractTransformationCommand.java index 92fbc9f00..2a8b12dfd 100644 --- a/src/main/java/org/embl/mobie/command/context/AbstractTransformationCommand.java +++ b/src/main/java/org/embl/mobie/command/context/AbstractTransformationCommand.java @@ -37,7 +37,7 @@ import org.embl.mobie.ProjectType; import org.embl.mobie.command.widget.SelectableImages; import org.embl.mobie.command.widget.SwingSelectableImagesWidget; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import org.embl.mobie.lib.image.Image; import org.embl.mobie.lib.image.RegionAnnotationImage; import org.embl.mobie.lib.serialize.View; diff --git a/src/main/java/org/embl/mobie/command/context/AutomaticRegistrationCommand.txt b/src/main/java/org/embl/mobie/command/context/AutomaticRegistrationCommand.txt index 204a261fd..ed566b4f9 100644 --- a/src/main/java/org/embl/mobie/command/context/AutomaticRegistrationCommand.txt +++ b/src/main/java/org/embl/mobie/command/context/AutomaticRegistrationCommand.txt @@ -40,7 +40,7 @@ import ij.process.ImageConverter; import net.imglib2.display.ColorConverter; import net.imglib2.realtransform.AffineTransform3D; import org.embl.mobie.command.CommandConstants; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import org.embl.mobie.lib.align.TurboReg2DAligner; import org.embl.mobie.lib.bdv.ScreenShotMaker; import org.embl.mobie.lib.align.SIFT2DAligner; diff --git a/src/main/java/org/embl/mobie/command/context/SourcesInfoCommand.java b/src/main/java/org/embl/mobie/command/context/SourcesInfoCommand.java index 4518020fd..c69b008f4 100644 --- a/src/main/java/org/embl/mobie/command/context/SourcesInfoCommand.java +++ b/src/main/java/org/embl/mobie/command/context/SourcesInfoCommand.java @@ -35,7 +35,7 @@ import net.imglib2.realtransform.AffineTransform3D; import org.embl.mobie.DataStore; import org.embl.mobie.command.CommandConstants; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import org.embl.mobie.lib.image.Image; import org.embl.mobie.lib.io.ImageDataInfo; import org.embl.mobie.lib.serialize.transformation.AffineTransformation; diff --git a/src/main/java/org/embl/mobie/command/open/OpenCollectionTableCommand.java b/src/main/java/org/embl/mobie/command/open/OpenCollectionTableCommand.java index 07578751a..925342c74 100644 --- a/src/main/java/org/embl/mobie/command/open/OpenCollectionTableCommand.java +++ b/src/main/java/org/embl/mobie/command/open/OpenCollectionTableCommand.java @@ -33,7 +33,7 @@ import org.embl.mobie.MoBIESettings; import org.embl.mobie.ProjectType; import org.embl.mobie.command.CommandConstants; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import org.embl.mobie.lib.bdv.BdvViewingMode; import org.scijava.command.Command; import org.scijava.plugin.Parameter; diff --git a/src/main/java/org/embl/mobie/command/open/OpenHCSDatasetCommand.java b/src/main/java/org/embl/mobie/command/open/OpenHCSDatasetCommand.java index 70ef5a6dd..6d20be863 100644 --- a/src/main/java/org/embl/mobie/command/open/OpenHCSDatasetCommand.java +++ b/src/main/java/org/embl/mobie/command/open/OpenHCSDatasetCommand.java @@ -33,7 +33,7 @@ import org.embl.mobie.MoBIESettings; import org.embl.mobie.command.CommandConstants; import org.embl.mobie.io.util.IOHelper; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import org.embl.mobie.lib.hcs.OMEXMLParser; import org.scijava.command.Command; import org.scijava.plugin.Parameter; diff --git a/src/main/java/org/embl/mobie/command/open/OpenImageAndLabelsCommand.java b/src/main/java/org/embl/mobie/command/open/OpenImageAndLabelsCommand.java index d40ffb9dd..4289f10aa 100644 --- a/src/main/java/org/embl/mobie/command/open/OpenImageAndLabelsCommand.java +++ b/src/main/java/org/embl/mobie/command/open/OpenImageAndLabelsCommand.java @@ -32,13 +32,12 @@ import org.embl.mobie.MoBIESettings; import org.embl.mobie.command.CommandConstants; import org.embl.mobie.command.SpatialCalibration; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import org.embl.mobie.lib.transform.GridType; import org.scijava.command.Command; import org.scijava.plugin.Parameter; import org.scijava.plugin.Plugin; -import java.io.File; import java.io.IOException; import java.util.ArrayList; diff --git a/src/main/java/org/embl/mobie/command/open/OpenMultipleImagesAndLabelsCommand.java b/src/main/java/org/embl/mobie/command/open/OpenMultipleImagesAndLabelsCommand.java index 8826cbf46..f85a76d1d 100644 --- a/src/main/java/org/embl/mobie/command/open/OpenMultipleImagesAndLabelsCommand.java +++ b/src/main/java/org/embl/mobie/command/open/OpenMultipleImagesAndLabelsCommand.java @@ -32,7 +32,7 @@ import org.embl.mobie.MoBIESettings; import org.embl.mobie.command.CommandConstants; import org.embl.mobie.command.SpatialCalibration; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import org.embl.mobie.lib.transform.GridType; import org.scijava.command.Command; import org.scijava.plugin.Parameter; diff --git a/src/main/java/org/embl/mobie/command/open/OpenOMEZARRCommand.java b/src/main/java/org/embl/mobie/command/open/OpenOMEZARRCommand.java index da6eec2b3..ca349d3c7 100644 --- a/src/main/java/org/embl/mobie/command/open/OpenOMEZARRCommand.java +++ b/src/main/java/org/embl/mobie/command/open/OpenOMEZARRCommand.java @@ -31,7 +31,7 @@ import org.embl.mobie.MoBIE; import org.embl.mobie.MoBIESettings; import org.embl.mobie.command.CommandConstants; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import org.embl.mobie.lib.transform.GridType; import org.scijava.command.Command; import org.scijava.plugin.Parameter; diff --git a/src/main/java/org/embl/mobie/command/open/OpenTableCommand.java b/src/main/java/org/embl/mobie/command/open/OpenTableCommand.java index 3db084d1d..8bb2ea654 100644 --- a/src/main/java/org/embl/mobie/command/open/OpenTableCommand.java +++ b/src/main/java/org/embl/mobie/command/open/OpenTableCommand.java @@ -33,7 +33,7 @@ import org.embl.mobie.MoBIESettings; import org.embl.mobie.command.CommandConstants; import org.embl.mobie.command.SpatialCalibration; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import org.embl.mobie.lib.transform.GridType; import org.scijava.command.Command; import org.scijava.plugin.Parameter; diff --git a/src/main/java/org/embl/mobie/command/open/project/OpenMoBIEProjectExpertCommand.java b/src/main/java/org/embl/mobie/command/open/project/OpenMoBIEProjectExpertCommand.java index 93c645084..b121947ac 100644 --- a/src/main/java/org/embl/mobie/command/open/project/OpenMoBIEProjectExpertCommand.java +++ b/src/main/java/org/embl/mobie/command/open/project/OpenMoBIEProjectExpertCommand.java @@ -29,8 +29,8 @@ package org.embl.mobie.command.open.project; import org.embl.mobie.command.CommandConstants; -import org.embl.mobie.lib.MoBIEHelper; -import org.embl.mobie.lib.ThreadHelper; +import org.embl.mobie.lib.util.MoBIEHelper; +import org.embl.mobie.lib.util.ThreadHelper; import org.embl.mobie.lib.bdv.view.SliceViewer; import org.scijava.command.Command; import org.scijava.plugin.Parameter; diff --git a/src/main/java/org/embl/mobie/command/open/special/OpenMicrogliaTableCommand.java b/src/main/java/org/embl/mobie/command/open/special/OpenMicrogliaTableCommand.java index 31d4ac8a4..2b5f813c2 100644 --- a/src/main/java/org/embl/mobie/command/open/special/OpenMicrogliaTableCommand.java +++ b/src/main/java/org/embl/mobie/command/open/special/OpenMicrogliaTableCommand.java @@ -33,7 +33,6 @@ import org.embl.mobie.MoBIESettings; import org.embl.mobie.command.CommandConstants; import org.embl.mobie.command.SpatialCalibration; -import org.embl.mobie.lib.MoBIEHelper; import org.embl.mobie.lib.transform.GridType; import org.scijava.ItemVisibility; import org.scijava.command.Command; diff --git a/src/main/java/org/embl/mobie/command/view/ViewCurrentImageCommand.java b/src/main/java/org/embl/mobie/command/view/ViewCurrentImageCommand.java index 23dd55de8..4785e4d88 100644 --- a/src/main/java/org/embl/mobie/command/view/ViewCurrentImageCommand.java +++ b/src/main/java/org/embl/mobie/command/view/ViewCurrentImageCommand.java @@ -33,7 +33,7 @@ import org.embl.mobie.command.CommandConstants; import org.embl.mobie.io.imagedata.ImageData; import org.embl.mobie.io.imagedata.ImagePlusImageData; -import org.embl.mobie.lib.ThreadHelper; +import org.embl.mobie.lib.util.ThreadHelper; import org.scijava.command.Command; import org.scijava.plugin.Parameter; import org.scijava.plugin.Plugin; diff --git a/src/main/java/org/embl/mobie/command/view/ViewImageAndLabelsAndTableCommand.java b/src/main/java/org/embl/mobie/command/view/ViewImageAndLabelsAndTableCommand.java index 2c98bdaf8..73663e5a8 100644 --- a/src/main/java/org/embl/mobie/command/view/ViewImageAndLabelsAndTableCommand.java +++ b/src/main/java/org/embl/mobie/command/view/ViewImageAndLabelsAndTableCommand.java @@ -35,7 +35,7 @@ import org.embl.mobie.command.CommandConstants; import org.embl.mobie.io.imagedata.ImageData; import org.embl.mobie.io.imagedata.ImagePlusImageData; -import org.embl.mobie.lib.ThreadHelper; +import org.embl.mobie.lib.util.ThreadHelper; import org.embl.mobie.lib.io.StorageLocation; import org.embl.mobie.lib.table.TableDataFormat; import org.scijava.Initializable; diff --git a/src/main/java/org/embl/mobie/command/widget/SwingSelectableImagesWidget.java b/src/main/java/org/embl/mobie/command/widget/SwingSelectableImagesWidget.java index 9acec96c7..3d8d2ed5d 100644 --- a/src/main/java/org/embl/mobie/command/widget/SwingSelectableImagesWidget.java +++ b/src/main/java/org/embl/mobie/command/widget/SwingSelectableImagesWidget.java @@ -31,7 +31,7 @@ import bdv.util.BdvHandle; import bdv.viewer.SourceAndConverter; import org.embl.mobie.MoBIE; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import org.jetbrains.annotations.NotNull; import org.scijava.Priority; import org.scijava.plugin.Plugin; diff --git a/src/main/java/org/embl/mobie/lib/ImageDataAdder.java b/src/main/java/org/embl/mobie/lib/ImageDataAdder.java index 5018bd9af..c09803981 100644 --- a/src/main/java/org/embl/mobie/lib/ImageDataAdder.java +++ b/src/main/java/org/embl/mobie/lib/ImageDataAdder.java @@ -42,6 +42,7 @@ import org.embl.mobie.lib.serialize.display.ImageDisplay; import org.embl.mobie.lib.serialize.display.SegmentationDisplay; import org.embl.mobie.lib.table.TableDataFormat; +import org.embl.mobie.lib.util.MoBIEHelper; import org.janelia.saalfeldlab.n5.universe.metadata.canonical.CanonicalDatasetMetadata; import java.io.File; diff --git a/src/main/java/org/embl/mobie/lib/SourcesFromTableCreator.java b/src/main/java/org/embl/mobie/lib/SourcesFromTableCreator.java index 91f3bc671..3beba138c 100644 --- a/src/main/java/org/embl/mobie/lib/SourcesFromTableCreator.java +++ b/src/main/java/org/embl/mobie/lib/SourcesFromTableCreator.java @@ -33,10 +33,12 @@ import org.embl.mobie.lib.data.ImageGridSources; import org.embl.mobie.lib.data.LabelGridSources; import org.embl.mobie.lib.io.TableImageSource; -import org.embl.mobie.lib.table.ColumnNames; +import org.embl.mobie.lib.table.columns.ColumnNames; import org.embl.mobie.lib.table.saw.Aggregators; import org.embl.mobie.lib.table.saw.TableOpener; import org.embl.mobie.lib.transform.GridType; +import org.embl.mobie.lib.util.MoBIEHelper; +import org.embl.mobie.lib.util.ThreadHelper; import tech.tablesaw.api.NumberColumn; import tech.tablesaw.api.StringColumn; import tech.tablesaw.api.Table; diff --git a/src/main/java/org/embl/mobie/lib/bdv/MobieSerializableBdvOptions.java b/src/main/java/org/embl/mobie/lib/bdv/MobieSerializableBdvOptions.java index 784d41cd4..c37a17db1 100644 --- a/src/main/java/org/embl/mobie/lib/bdv/MobieSerializableBdvOptions.java +++ b/src/main/java/org/embl/mobie/lib/bdv/MobieSerializableBdvOptions.java @@ -31,7 +31,7 @@ import bdv.util.AxisOrder; import bdv.util.BdvOptions; import bdv.viewer.render.AccumulateProjectorFactory; -import org.embl.mobie.lib.ThreadHelper; +import org.embl.mobie.lib.util.ThreadHelper; import org.embl.mobie.lib.bdv.blend.AccumulateAlphaBlendingProjectorARGBFactory; import net.imglib2.type.numeric.ARGBType; 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 2667191e5..216174e96 100644 --- a/src/main/java/org/embl/mobie/lib/bdv/ScreenShotMaker.java +++ b/src/main/java/org/embl/mobie/lib/bdv/ScreenShotMaker.java @@ -47,8 +47,8 @@ import net.imglib2.type.Type; import net.imglib2.type.logic.BitType; import net.imglib2.type.numeric.real.FloatType; -import org.embl.mobie.lib.MoBIEHelper; -import org.embl.mobie.lib.ThreadHelper; +import org.embl.mobie.lib.util.MoBIEHelper; +import org.embl.mobie.lib.util.ThreadHelper; import org.embl.mobie.lib.annotation.Annotation; import org.embl.mobie.lib.bdv.blend.AccumulateAlphaBlendingProjectorARGB; import net.imglib2.algorithm.util.Grids; diff --git a/src/main/java/org/embl/mobie/lib/bdv/overlay/ImageNameOverlay.java b/src/main/java/org/embl/mobie/lib/bdv/overlay/ImageNameOverlay.java index 4dea67d4b..76d51d5c7 100644 --- a/src/main/java/org/embl/mobie/lib/bdv/overlay/ImageNameOverlay.java +++ b/src/main/java/org/embl/mobie/lib/bdv/overlay/ImageNameOverlay.java @@ -122,6 +122,7 @@ private void updateOverlayItems( Graphics2D g ) FinalRealInterval viewerInterval = BdvHandleHelper.getViewerGlobalBoundingInterval( bdvHandle ); + final Set< SourceAndConverter< ? > > sourceAndConverters = viewerState.getVisibleAndPresentSources(); for ( final SourceAndConverter< ? > sourceAndConverter : sourceAndConverters ) diff --git a/src/main/java/org/embl/mobie/lib/bdv/view/AnnotationSliceView.java b/src/main/java/org/embl/mobie/lib/bdv/view/AnnotationSliceView.java index 476a74ece..b6e71786f 100644 --- a/src/main/java/org/embl/mobie/lib/bdv/view/AnnotationSliceView.java +++ b/src/main/java/org/embl/mobie/lib/bdv/view/AnnotationSliceView.java @@ -143,7 +143,8 @@ private void configureRendering( SourceAndConverter< ? > sourceAndConverter ) final String someRegion = display.sources.keySet().iterator().next(); final String someSource = display.sources.get( someRegion ).get( 0 ); final RealMaskRealInterval mask = DataStore.getImage( someSource ).getMask(); - final double width = mask.realMax( 0 ) - mask.realMin( 0 ); + double width = mask.realMax( 0 ) - mask.realMin( 0 ); + width = Math.min( width, mask.realMax( 1 ) - mask.realMin( 1 ) ); boundaryThickness = width * boundaryThickness; } } diff --git a/src/main/java/org/embl/mobie/lib/create/DatasetSerializer.java b/src/main/java/org/embl/mobie/lib/create/DatasetSerializer.java index 3d69178c5..61b65e3dc 100644 --- a/src/main/java/org/embl/mobie/lib/create/DatasetSerializer.java +++ b/src/main/java/org/embl/mobie/lib/create/DatasetSerializer.java @@ -29,7 +29,7 @@ package org.embl.mobie.lib.create; import de.embl.cba.tables.color.ColoringLuts; -import org.embl.mobie.lib.table.ColumnNames; +import org.embl.mobie.lib.table.columns.ColumnNames; import org.embl.mobie.lib.serialize.display.ImageDisplay; import org.embl.mobie.lib.serialize.display.SegmentationDisplay; import org.embl.mobie.lib.serialize.display.Display; @@ -48,7 +48,6 @@ import java.io.File; import java.io.IOException; -import java.net.URI; import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/src/main/java/org/embl/mobie/lib/create/ProjectCreator.java b/src/main/java/org/embl/mobie/lib/create/ProjectCreator.java index 5e54a1e19..e0332c135 100644 --- a/src/main/java/org/embl/mobie/lib/create/ProjectCreator.java +++ b/src/main/java/org/embl/mobie/lib/create/ProjectCreator.java @@ -29,10 +29,9 @@ package org.embl.mobie.lib.create; import mpicbg.spim.data.SpimDataException; -import net.imagej.patcher.LegacyInjector; import org.embl.mobie.io.ImageDataFormat; import org.embl.mobie.io.util.IOHelper; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import org.embl.mobie.lib.serialize.*; import java.io.File; diff --git a/src/main/java/org/embl/mobie/lib/data/CollectionTableDataSetter.java b/src/main/java/org/embl/mobie/lib/data/CollectionTableDataSetter.java index 8aa47991b..12d0bd959 100644 --- a/src/main/java/org/embl/mobie/lib/data/CollectionTableDataSetter.java +++ b/src/main/java/org/embl/mobie/lib/data/CollectionTableDataSetter.java @@ -1,7 +1,6 @@ package org.embl.mobie.lib.data; import ij.IJ; -import net.imagej.omero.roi.ellipse.ImageJToOMEROEllipse; import net.imglib2.type.numeric.ARGBType; import org.apache.commons.io.FilenameUtils; import org.embl.mobie.DataStore; @@ -16,7 +15,7 @@ import org.embl.mobie.lib.serialize.transformation.AffineTransformation; import org.embl.mobie.lib.serialize.transformation.GridTransformation; import org.embl.mobie.lib.serialize.transformation.Transformation; -import org.embl.mobie.lib.table.ColumnNames; +import org.embl.mobie.lib.table.columns.ColumnNames; import org.embl.mobie.lib.table.TableDataFormat; import org.embl.mobie.lib.table.TableSource; import org.embl.mobie.lib.table.columns.CollectionTableConstants; @@ -34,12 +33,13 @@ public class CollectionTableDataSetter private final Table table; private final String rootPath; - private final Map< String, Display< ? > > gridToDisplay = new HashMap<>(); - private final Map< String, List< Transformation > > gridToTransformations = new HashMap<>(); - private final Map< String, String > gridToView = new HashMap<>(); - private final Map< String, String > viewToGroup = new HashMap<>(); - private final Map< String, List< Integer > > gridToRowIndices = new HashMap<>(); + private final Map< String, String > viewToGroup = new LinkedHashMap<>(); + private final Map< String, Display< ? > > gridToDisplay = new LinkedHashMap<>(); + private final Map< String, List< Transformation > > gridToTransformations = new LinkedHashMap<>(); + private final Map< String, String > gridToView = new LinkedHashMap<>(); + private final Map< String, List< Integer > > gridToRowIndices = new LinkedHashMap<>(); + private final Map< String, Boolean > gridToExclusive = new LinkedHashMap<>(); public CollectionTableDataSetter( Table table, String rootPath ) { @@ -89,11 +89,13 @@ public void addToDataset( Dataset dataset ) } else // intensities { - final ImageDataSource imageDataSource = new ImageDataSource( imageName, imageDataFormat, storageLocation ); + final ImageDataSource imageDataSource = new ImageDataSource( + imageName, + imageDataFormat, + storageLocation ); imageDataSource.preInit( false ); dataset.putDataSource( imageDataSource ); - // TODO create a GridDisplay is adequate display = createImageDisplay( imageName, row ); @@ -106,6 +108,7 @@ public void addToDataset( Dataset dataset ) addDisplayToView( getViewName( display, row ), getGroupName( display, row ), + getExclusive( row ), display, getAffineTransformationAsList( display.getSources(), row ), dataset.views() ); @@ -116,9 +119,10 @@ public void addToDataset( Dataset dataset ) .computeIfAbsent( gridId, k -> new ArrayList<>() ) .add( row.getRowNumber() ); - String viewName = getViewName( display, row ); - gridToView.put( gridId, viewName ); - viewToGroup.put( viewName, getGroupName( display, row ) ); + String gridViewName = getViewName( display, row ); // defaults to display=grid name if view name is absent + gridToView.put( gridId, gridViewName ); + gridToExclusive.put( gridId, getExclusive( row ) ); + viewToGroup.put( gridViewName, getGroupName( display, row ) ); if ( gridToDisplay.containsKey( gridId ) ) { @@ -161,15 +165,17 @@ else if ( existingDisplay instanceof ImageDisplay ) GridTransformation grid = new GridTransformation( display.getSources() ); transformations.add( grid ); + String viewName = gridToView.get( gridId ); + View gridView = addDisplayToView( - gridToView.get( gridId ), - viewToGroup.get( gridToView.get( gridId ) ), + viewName, + viewToGroup.get( viewName ), + gridToExclusive.get( gridId ), display, transformations, dataset.views() ); - gridView.setExclusive( true ); - gridView.overlayNames( false ); // <- TODO: exchange this with the showing the regionId column as an annotation overlay! + gridView.overlayNames( false ); // TODO: exchange this with the showing the regionId column as an annotation overlay! // Create grid regions table Selection rowSelection = Selection @@ -199,17 +205,30 @@ else if ( existingDisplay instanceof ImageDisplay ) for ( String source : display.getSources() ) gridRegionDisplay.sources.put( source, Collections.singletonList( source ) ); + dataset.views().get( viewName ).displays().add( gridRegionDisplay ); + } + } - dataset.views().get( gridToView.get( gridId ) ).displays().add( gridRegionDisplay ); + private static boolean getExclusive( Row row ) + { + try { + String string = row.getString( CollectionTableConstants.EXCLUSIVE ); + if ( string.toLowerCase().equals( CollectionTableConstants.TRUE ) ) + return true; + else + return false; + } + catch ( Exception e ) + { + return false; } - } private static TableSource getTable( Row row, String rootPath ) { try { - String tablePath = row.getString( CollectionTableConstants.LABEL_TABLE ); + String tablePath = row.getString( CollectionTableConstants.LABELS_TABLE ); if ( rootPath != null ) tablePath = IOHelper.combinePath( rootPath, tablePath ); StorageLocation storageLocation = new StorageLocation(); @@ -301,6 +320,7 @@ private static int getChannel( Row row ) private static View addDisplayToView( String viewName, String groupName, + boolean exclusive, Display< ? > display, List< Transformation > transforms, final Map< String, View > views ) @@ -313,9 +333,6 @@ private static View addDisplayToView( String viewName, View existingView = views.get( viewName ); existingView.transformations().addAll( transforms ); existingView.displays().addAll( displays ); - // if several images are combined into the - // same view we make it exclusive - existingView.setExclusive( true ); return existingView; } else @@ -326,7 +343,7 @@ private static View addDisplayToView( String viewName, displays, transforms, null, - false, + exclusive, null ); views.put( newView.getName(), newView ); @@ -358,7 +375,7 @@ private static String getViewName( Display< ? > display, Row row ) { String name = row.getString( CollectionTableConstants.VIEW ); - if ( name.isEmpty() ) + if ( name == null || name.isEmpty() ) return display.getName(); return name; diff --git a/src/main/java/org/embl/mobie/lib/data/GridSourcesDataSetter.java b/src/main/java/org/embl/mobie/lib/data/GridSourcesDataSetter.java index 63ff54001..b6f0f2a90 100644 --- a/src/main/java/org/embl/mobie/lib/data/GridSourcesDataSetter.java +++ b/src/main/java/org/embl/mobie/lib/data/GridSourcesDataSetter.java @@ -45,7 +45,7 @@ import org.embl.mobie.lib.serialize.display.SegmentationDisplay; import org.embl.mobie.lib.serialize.transformation.*; import org.embl.mobie.lib.source.Metadata; -import org.embl.mobie.lib.table.ColumnNames; +import org.embl.mobie.lib.table.columns.ColumnNames; import org.embl.mobie.lib.table.TableDataFormat; import org.embl.mobie.lib.table.TableSource; import org.embl.mobie.lib.transform.GridType; diff --git a/src/main/java/org/embl/mobie/lib/data/ImageGridSources.java b/src/main/java/org/embl/mobie/lib/data/ImageGridSources.java index 48f52f33b..9a3f59c7f 100644 --- a/src/main/java/org/embl/mobie/lib/data/ImageGridSources.java +++ b/src/main/java/org/embl/mobie/lib/data/ImageGridSources.java @@ -37,11 +37,11 @@ import org.embl.mobie.io.ImageDataOpener; import org.embl.mobie.io.imagedata.ImageData; import org.embl.mobie.io.util.IOHelper; -import org.embl.mobie.lib.MoBIEHelper; -import org.embl.mobie.lib.ThreadHelper; +import org.embl.mobie.lib.util.MoBIEHelper; +import org.embl.mobie.lib.util.ThreadHelper; import org.embl.mobie.lib.source.Metadata; import org.embl.mobie.lib.source.SourceHelper; -import org.embl.mobie.lib.table.ColumnNames; +import org.embl.mobie.lib.table.columns.ColumnNames; import org.embl.mobie.lib.table.TableDataFormat; import org.embl.mobie.lib.table.columns.SegmentColumnNames; import org.embl.mobie.lib.transform.GridType; diff --git a/src/main/java/org/embl/mobie/lib/data/LabelGridSources.java b/src/main/java/org/embl/mobie/lib/data/LabelGridSources.java index 9ab2dec7b..4c2d58d5f 100644 --- a/src/main/java/org/embl/mobie/lib/data/LabelGridSources.java +++ b/src/main/java/org/embl/mobie/lib/data/LabelGridSources.java @@ -29,7 +29,7 @@ package org.embl.mobie.lib.data; import ij.IJ; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import org.embl.mobie.lib.io.StorageLocation; import org.embl.mobie.lib.table.TableDataFormat; import org.embl.mobie.lib.table.TableSource; diff --git a/src/main/java/org/embl/mobie/lib/hcs/Plate.java b/src/main/java/org/embl/mobie/lib/hcs/Plate.java index 046564b68..cabe29ccc 100644 --- a/src/main/java/org/embl/mobie/lib/hcs/Plate.java +++ b/src/main/java/org/embl/mobie/lib/hcs/Plate.java @@ -44,7 +44,7 @@ import org.embl.mobie.io.toml.ZPosition; import org.embl.mobie.io.util.IOHelper; import org.embl.mobie.io.util.S3Utils; -import org.embl.mobie.lib.ThreadHelper; +import org.embl.mobie.lib.util.ThreadHelper; import org.embl.mobie.lib.color.ColorHelper; import org.embl.mobie.lib.hcs.omezarr.OMEZarrHCSHelper; diff --git a/src/main/java/org/embl/mobie/lib/hcs/omezarr/OMEZarrHCSHelper.java b/src/main/java/org/embl/mobie/lib/hcs/omezarr/OMEZarrHCSHelper.java index 014b4fc8a..6421f5788 100644 --- a/src/main/java/org/embl/mobie/lib/hcs/omezarr/OMEZarrHCSHelper.java +++ b/src/main/java/org/embl/mobie/lib/hcs/omezarr/OMEZarrHCSHelper.java @@ -32,8 +32,8 @@ import com.google.gson.reflect.TypeToken; import ij.IJ; import org.embl.mobie.io.util.IOHelper; -import org.embl.mobie.lib.MoBIEHelper; -import org.embl.mobie.lib.ThreadHelper; +import org.embl.mobie.lib.util.MoBIEHelper; +import org.embl.mobie.lib.util.ThreadHelper; import org.embl.mobie.lib.serialize.JsonHelper; import java.io.IOException; diff --git a/src/main/java/org/embl/mobie/lib/image/StitchedImage.java b/src/main/java/org/embl/mobie/lib/image/StitchedImage.java index f74e2565a..d8ceb4edd 100644 --- a/src/main/java/org/embl/mobie/lib/image/StitchedImage.java +++ b/src/main/java/org/embl/mobie/lib/image/StitchedImage.java @@ -55,8 +55,8 @@ import net.imglib2.view.IntervalView; import net.imglib2.view.Views; import org.embl.mobie.DataStore; -import org.embl.mobie.lib.MoBIEHelper; -import org.embl.mobie.lib.ThreadHelper; +import org.embl.mobie.lib.util.MoBIEHelper; +import org.embl.mobie.lib.util.ThreadHelper; import org.embl.mobie.lib.io.Status; import org.embl.mobie.lib.source.MoBIEVolatileTypeMatcher; import org.embl.mobie.lib.source.SourceHelper; diff --git a/src/main/java/org/embl/mobie/lib/io/DataFormats.java b/src/main/java/org/embl/mobie/lib/io/DataFormats.java index 95b814cc3..ef9f6f979 100644 --- a/src/main/java/org/embl/mobie/lib/io/DataFormats.java +++ b/src/main/java/org/embl/mobie/lib/io/DataFormats.java @@ -48,6 +48,7 @@ public enum Location add( ImageDataFormat.BdvN5S3 ); add( ImageDataFormat.OpenOrganelleS3 ); add( ImageDataFormat.BioFormatsS3 ); + add( ImageDataFormat.N5 ); } }; diff --git a/src/main/java/org/embl/mobie/lib/serialize/View.java b/src/main/java/org/embl/mobie/lib/serialize/View.java index ea7fbdcd1..a3343b7af 100644 --- a/src/main/java/org/embl/mobie/lib/serialize/View.java +++ b/src/main/java/org/embl/mobie/lib/serialize/View.java @@ -51,9 +51,9 @@ public class View private ViewerTransform viewerTransform = null; - private Boolean isExclusive = null; + private Boolean isExclusive; - private String description; // TODO: make part of the spec + private String description; // TODO add to JSON spec? // Runtime // diff --git a/src/main/java/org/embl/mobie/lib/serialize/display/AbstractAnnotationDisplay.java b/src/main/java/org/embl/mobie/lib/serialize/display/AbstractAnnotationDisplay.java index f3afee3c3..b9e61a11c 100644 --- a/src/main/java/org/embl/mobie/lib/serialize/display/AbstractAnnotationDisplay.java +++ b/src/main/java/org/embl/mobie/lib/serialize/display/AbstractAnnotationDisplay.java @@ -52,7 +52,7 @@ import org.embl.mobie.lib.annotation.Annotation; import org.embl.mobie.lib.table.AnnData; import org.embl.mobie.lib.table.AnnDataHelper; -import org.embl.mobie.lib.table.ColumnNames; +import org.embl.mobie.lib.table.columns.ColumnNames; import org.embl.mobie.lib.table.TableView; import net.imglib2.util.ValuePair; diff --git a/src/main/java/org/embl/mobie/lib/serialize/transformation/AffineTransformation.java b/src/main/java/org/embl/mobie/lib/serialize/transformation/AffineTransformation.java index cdd605fed..9c2becd5b 100644 --- a/src/main/java/org/embl/mobie/lib/serialize/transformation/AffineTransformation.java +++ b/src/main/java/org/embl/mobie/lib/serialize/transformation/AffineTransformation.java @@ -29,7 +29,7 @@ package org.embl.mobie.lib.serialize.transformation; import net.imglib2.realtransform.AffineTransform3D; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/org/embl/mobie/lib/serialize/transformation/InterpolatedAffineTransformation.java b/src/main/java/org/embl/mobie/lib/serialize/transformation/InterpolatedAffineTransformation.java index 38ab1f59f..87484b933 100644 --- a/src/main/java/org/embl/mobie/lib/serialize/transformation/InterpolatedAffineTransformation.java +++ b/src/main/java/org/embl/mobie/lib/serialize/transformation/InterpolatedAffineTransformation.java @@ -28,7 +28,7 @@ */ package org.embl.mobie.lib.serialize.transformation; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import java.util.*; diff --git a/src/main/java/org/embl/mobie/lib/serialize/transformation/TimepointsTransformation.java b/src/main/java/org/embl/mobie/lib/serialize/transformation/TimepointsTransformation.java index 930a78f1d..d9fd0f1e3 100644 --- a/src/main/java/org/embl/mobie/lib/serialize/transformation/TimepointsTransformation.java +++ b/src/main/java/org/embl/mobie/lib/serialize/transformation/TimepointsTransformation.java @@ -28,8 +28,6 @@ */ package org.embl.mobie.lib.serialize.transformation; -import org.embl.mobie.lib.MoBIEHelper; - import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; diff --git a/src/main/java/org/embl/mobie/lib/table/DefaultAnnotatedSegment.java b/src/main/java/org/embl/mobie/lib/table/DefaultAnnotatedSegment.java index 22a2ae3fd..2c7549479 100644 --- a/src/main/java/org/embl/mobie/lib/table/DefaultAnnotatedSegment.java +++ b/src/main/java/org/embl/mobie/lib/table/DefaultAnnotatedSegment.java @@ -31,6 +31,7 @@ import net.imglib2.RealInterval; import net.imglib2.realtransform.AffineTransform3D; import org.embl.mobie.lib.annotation.AnnotatedSegment; +import org.embl.mobie.lib.table.columns.ColumnNames; import java.util.HashMap; diff --git a/src/main/java/org/embl/mobie/lib/table/DistanceComputer.java b/src/main/java/org/embl/mobie/lib/table/DistanceComputer.java index 7575a075d..63316734d 100644 --- a/src/main/java/org/embl/mobie/lib/table/DistanceComputer.java +++ b/src/main/java/org/embl/mobie/lib/table/DistanceComputer.java @@ -31,7 +31,7 @@ import ij.IJ; import ij.gui.GenericDialog; import net.imglib2.type.numeric.ARGBType; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import org.embl.mobie.lib.annotation.Annotation; import org.embl.mobie.lib.color.ColoringModels; import org.embl.mobie.lib.color.MobieColoringModel; diff --git a/src/main/java/org/embl/mobie/lib/table/RegionDisplayAnnDataCreator.java b/src/main/java/org/embl/mobie/lib/table/RegionDisplayAnnDataCreator.java index 507a2354e..7e0bc4054 100644 --- a/src/main/java/org/embl/mobie/lib/table/RegionDisplayAnnDataCreator.java +++ b/src/main/java/org/embl/mobie/lib/table/RegionDisplayAnnDataCreator.java @@ -30,7 +30,8 @@ import org.embl.mobie.MoBIE; import org.embl.mobie.DataStore; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.table.columns.ColumnNames; +import org.embl.mobie.lib.util.MoBIEHelper; import org.embl.mobie.lib.annotation.AnnotatedRegion; import org.embl.mobie.lib.io.StorageLocation; import org.embl.mobie.lib.serialize.RegionTableSource; diff --git a/src/main/java/org/embl/mobie/lib/table/columns/CollectionTableConstants.java b/src/main/java/org/embl/mobie/lib/table/columns/CollectionTableConstants.java index 3acf94496..cdbaefa60 100644 --- a/src/main/java/org/embl/mobie/lib/table/columns/CollectionTableConstants.java +++ b/src/main/java/org/embl/mobie/lib/table/columns/CollectionTableConstants.java @@ -107,10 +107,10 @@ public class CollectionTableConstants * - e.g., "r(0)-g(255)-b(0)-a(255)" * - e.g., "white", "red", .... * - * Default value: "white" - * The default value will be assigned if - * - this column is absent. - * - the value cannot be parsed to a color by [this code](). + * Default: "white" + * If the column is absent or the value cannot be parsed, + * the color will be "white". + * */ public static final String COLOR = "color"; @@ -119,12 +119,14 @@ public class CollectionTableConstants * * The value determines the blending mode for this image. * - * The value MUST be one of "sum" or "alpha". + * Supported values: + * - "sum" + * - "alpha" + * + * Default: "sum" + * If the column is absent or the value is not supported, + * the blending mode will be "sum". * - * Default value: "sum" - * The default value will be assigned if - * - this column is absent. - * - the value cannot be parsed to a {@code BlendingMode} */ public static final String BLEND = "blend"; @@ -141,10 +143,10 @@ public class CollectionTableConstants * - e.g., identity transform: (1,0,0,0,0,1,0,0,0,0,1,0) * - e.g., shift along x-axis: (1,0,0,-105.34,0,1,0,0,0,0,1,0) * - * Default value: There is no default value. - * No transformation will be applied if - * - this column is absent. - * - the given value cannot be parsed. + * Default: No transformation + * If the column is absent or the value cannot be parsed no + * additional transformation will be applied on top of the + * transformation that is found within the image data itself. * * Notes: * - This affine transformation will be applied on top of any transformation @@ -161,14 +163,12 @@ public class CollectionTableConstants * Supported values: * - Free text * - * Default value: There is no default value. - * No additional view will be assigned if - * - this column is absent. - * - the value is empty. + * Default: value determined from NAME column + * If the column is absent or if the value is an empty string, + * the name of the view will be set equal to value determined + * by the NAME column (see above). * * Use cases: - * - One can add data from the same URI a second time, but - * with a different "affine" transform, or a different "channel" * - One can combine several images into the same view, e.g. * different channels of the same image, or an image and a corresponding * label mask (segmentation) image, or several (registered) images of @@ -176,6 +176,33 @@ public class CollectionTableConstants */ public static final String VIEW = "view"; + /** + * The "exclusive" column MAY be present. + * + * The value will determine whether the view that is associated to + * this row will be exclusive. + * If exclusive = true, upon showing the view all currently displayed + * items will be removed. + * If exclusive = false, the view will be display in addition to all + * currently displayed items. + * + * Supported values: + * - "true" + * - "false" + * + * Default: "false" + * If the column is absent or the String is none of the supported values + * the view will not be exclusive. + * + * Use cases: + * - If there is data in the table that is displayed in different coordinate systems + * it can make sense to avoid that they will be shown together. + */ + public static final String EXCLUSIVE = "exclusive"; + public static final String TRUE = "true"; + public static final String FALSE = "false"; // default + + /** * The "group" column MAY be present. * @@ -185,10 +212,10 @@ public class CollectionTableConstants * Supported values: * - Free text * - * Default value: "views" - * The default value will be assigned if - * - this column is absent. - * - the table cell is empty. + * Default: "views" + * If the column is absent or contains an empty string the + * view that corresponds to this row will be put in + * a UI selection group called "views". * * Use cases: * - If you have a lot of data it can be helpful to @@ -207,12 +234,14 @@ public class CollectionTableConstants * - For supported columns in segmentation tables see, e.g. * {@code MoBIESegmentColumnNames} or {@code SkimageSegmentColumnNames}. * - * Default value: N/A + * Default: + * If the column is absent or contains an empty string + * no labels table will be loaded. * * Use cases: * - Exploration of measurements corresponding to the labels */ - public static final String LABEL_TABLE = "labels_table"; + public static final String LABELS_TABLE = "labels_table"; /** * The "contrast_limits" column MAY be present. @@ -224,13 +253,15 @@ public class CollectionTableConstants * - Bracketed, semicolon separated list of min and max, e.g. * - (10;240) * - * Default value: N/A + * Default: + * If the column is absent or can't be parsed, MoBIE will apply an + * auto-contrast algorithm, if the data is not too big. // TODO explain more + * If the data is too big, the contrast limits will be set to + * the limits of the pixel data type. * * Use cases: * - Adjust the contrast limits such that the intensities are readily visible * - * Notes: - * - One could consider supporting "auto" here as another supported value */ public static final String CONTRAST_LIMITS = "contrast_limits"; @@ -249,7 +280,9 @@ public class CollectionTableConstants * Supported values: * - Free text * - * Default value: N/A + * Default: No grid + * If the column is absent or contains an empty string the + * data in this row will not be part of a grid. * * Use cases: * - Display similar data together such that it can be readily compared diff --git a/src/main/java/org/embl/mobie/lib/table/ColumnNames.java b/src/main/java/org/embl/mobie/lib/table/columns/ColumnNames.java similarity index 98% rename from src/main/java/org/embl/mobie/lib/table/ColumnNames.java rename to src/main/java/org/embl/mobie/lib/table/columns/ColumnNames.java index 0e0af9ac1..84b1db97c 100644 --- a/src/main/java/org/embl/mobie/lib/table/ColumnNames.java +++ b/src/main/java/org/embl/mobie/lib/table/columns/ColumnNames.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package org.embl.mobie.lib.table; +package org.embl.mobie.lib.table.columns; public class ColumnNames { diff --git a/src/main/java/org/embl/mobie/lib/table/columns/MoBIESegmentColumnNames.java b/src/main/java/org/embl/mobie/lib/table/columns/MoBIESegmentColumnNames.java index 651cebe15..4fa8a4cdf 100644 --- a/src/main/java/org/embl/mobie/lib/table/columns/MoBIESegmentColumnNames.java +++ b/src/main/java/org/embl/mobie/lib/table/columns/MoBIESegmentColumnNames.java @@ -28,8 +28,6 @@ */ package org.embl.mobie.lib.table.columns; -import org.embl.mobie.lib.table.ColumnNames; - import java.util.Collection; public class MoBIESegmentColumnNames implements SegmentColumnNames diff --git a/src/main/java/org/embl/mobie/lib/table/saw/TableOpener.java b/src/main/java/org/embl/mobie/lib/table/saw/TableOpener.java index 77cdf0e8b..c8f805fd2 100644 --- a/src/main/java/org/embl/mobie/lib/table/saw/TableOpener.java +++ b/src/main/java/org/embl/mobie/lib/table/saw/TableOpener.java @@ -33,7 +33,7 @@ import net.thisptr.jackson.jq.internal.misc.Strings; import org.embl.mobie.io.util.IOHelper; import org.embl.mobie.lib.io.StorageLocation; -import org.embl.mobie.lib.table.ColumnNames; +import org.embl.mobie.lib.table.columns.ColumnNames; import org.embl.mobie.lib.table.TableDataFormat; import org.embl.mobie.lib.table.columns.SegmentColumnNames; import tech.tablesaw.api.ColumnType; diff --git a/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedRegionCreator.java b/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedRegionCreator.java index 92007c0c5..05cf9b921 100644 --- a/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedRegionCreator.java +++ b/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedRegionCreator.java @@ -28,7 +28,7 @@ */ package org.embl.mobie.lib.table.saw; -import org.embl.mobie.lib.table.ColumnNames; +import org.embl.mobie.lib.table.columns.ColumnNames; import tech.tablesaw.api.Table; import java.util.ArrayList; diff --git a/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedSegment.java b/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedSegment.java index 46dc7ea84..9e930a37b 100644 --- a/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedSegment.java +++ b/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedSegment.java @@ -32,7 +32,6 @@ import org.embl.mobie.lib.annotation.AnnotatedSegment; import net.imglib2.FinalRealInterval; import net.imglib2.RealInterval; -import org.embl.mobie.lib.table.ColumnNames; import org.embl.mobie.lib.volume.MeshTransformer; public class TableSawAnnotatedSegment extends AbstractTableSawAnnotation implements AnnotatedSegment diff --git a/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedSpot.java b/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedSpot.java index d5eaab8c5..0265d720e 100644 --- a/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedSpot.java +++ b/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedSpot.java @@ -30,7 +30,7 @@ import net.imglib2.realtransform.AffineTransform3D; import org.embl.mobie.lib.annotation.AnnotatedSpot; -import org.embl.mobie.lib.table.ColumnNames; +import org.embl.mobie.lib.table.columns.ColumnNames; public class TableSawAnnotatedSpot extends AbstractTableSawAnnotation implements AnnotatedSpot { diff --git a/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedSpotCreator.java b/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedSpotCreator.java index cbbca048a..6cf43d831 100644 --- a/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedSpotCreator.java +++ b/src/main/java/org/embl/mobie/lib/table/saw/TableSawAnnotatedSpotCreator.java @@ -28,7 +28,7 @@ */ package org.embl.mobie.lib.table.saw; -import org.embl.mobie.lib.table.ColumnNames; +import org.embl.mobie.lib.table.columns.ColumnNames; import tech.tablesaw.api.Table; import java.util.ArrayList; diff --git a/src/main/java/org/embl/mobie/lib/transform/ImageTransformer.java b/src/main/java/org/embl/mobie/lib/transform/ImageTransformer.java index 5a8ae2f29..e3357385e 100644 --- a/src/main/java/org/embl/mobie/lib/transform/ImageTransformer.java +++ b/src/main/java/org/embl/mobie/lib/transform/ImageTransformer.java @@ -30,7 +30,7 @@ import net.imglib2.realtransform.AffineTransform3D; import net.imglib2.type.numeric.IntegerType; -import org.embl.mobie.lib.ThreadHelper; +import org.embl.mobie.lib.util.ThreadHelper; import org.embl.mobie.lib.annotation.Annotation; import org.embl.mobie.lib.annotation.AnnotationAdapter; import org.embl.mobie.lib.annotation.DefaultAnnotationAdapter; diff --git a/src/main/java/org/embl/mobie/lib/MoBIEHelper.java b/src/main/java/org/embl/mobie/lib/util/MoBIEHelper.java similarity index 99% rename from src/main/java/org/embl/mobie/lib/MoBIEHelper.java rename to src/main/java/org/embl/mobie/lib/util/MoBIEHelper.java index 0f490f4a3..4961bea8c 100644 --- a/src/main/java/org/embl/mobie/lib/MoBIEHelper.java +++ b/src/main/java/org/embl/mobie/lib/util/MoBIEHelper.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package org.embl.mobie.lib; +package org.embl.mobie.lib.util; import bdv.util.BdvHandle; import bdv.viewer.SourceAndConverter; diff --git a/src/main/java/org/embl/mobie/lib/util/OpenOrganelleCollectionTableCreator.java b/src/main/java/org/embl/mobie/lib/util/OpenOrganelleCollectionTableCreator.java new file mode 100644 index 000000000..7f9ebf666 --- /dev/null +++ b/src/main/java/org/embl/mobie/lib/util/OpenOrganelleCollectionTableCreator.java @@ -0,0 +1,155 @@ +package org.embl.mobie.lib.util; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.reflect.TypeToken; +import org.embl.mobie.lib.table.columns.CollectionTableConstants; +import org.janelia.saalfeldlab.n5.N5Reader; +import org.janelia.saalfeldlab.n5.N5URI; +import org.janelia.saalfeldlab.n5.universe.N5Factory; +import tech.tablesaw.api.StringColumn; +import tech.tablesaw.api.Table; +import tech.tablesaw.io.csv.CsvWriteOptions; + +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.lang.reflect.Type; +import java.net.URISyntaxException; +import java.util.*; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Executors; +import java.util.stream.Collectors; + +public class OpenOrganelleCollectionTableCreator +{ + public static void main( String[] args ) throws URISyntaxException, ExecutionException, InterruptedException + { + String[] uris = { + "s3://janelia-cosem-datasets/jrc_macrophage-2/jrc_macrophage-2.n5", + "s3://janelia-cosem-datasets/jrc_hela-3/jrc_hela-3.n5", + "s3://janelia-cosem-datasets/jrc_jurkat-1/jrc_jurkat-1.n5" + }; + + String imagesPath = "/Users/tischer/Documents/mobie-viewer-fiji/src/test/resources/uriToImages.json"; + + // fetchImagesFromUris( imagesPath, uris ); + + Map< String, List< String > > uriToImages = readImages( imagesPath ); + + String tablePath = "/Users/tischer/Documents/mobie-viewer-fiji/src/test/resources/collections/open-organelle.txt"; + + createCollectionTable( uriToImages, tablePath ); + + System.exit( 0 ); + } + + public static Map< String, List< String > > uriToImages( String[] uris ) throws URISyntaxException, ExecutionException, InterruptedException + { + HashMap< String, List< String > > uriToDatasets = new HashMap<>(); + + for ( String uri : uris ) + { + System.out.println( "Finding images in " + uri ); + N5URI n5URI = new N5URI( uri ); + String containerPath = n5URI.getContainerPath(); + N5Reader n5 = new N5Factory().openReader( containerPath ); + String[] datasets = n5.deepListDatasets( "/", Executors.newCachedThreadPool() ); + + List< String > images = Arrays.stream( datasets ) + .filter( s -> s.endsWith( "/s0" ) ) + .map( s -> s.replace( "/s0", "" ) ) + .collect( Collectors.toList() ); + + uriToDatasets.put( uri, images ); + System.out.println( "...found " + images.size() ); + } + + return uriToDatasets; + } + + private static void fetchImagesFromUris( final String outputPath, final String[] uris ) throws URISyntaxException, ExecutionException, InterruptedException + { + // https://openorganelle.janelia.org/datasets + + Map< String, List< String > > uriToImages = uriToImages( uris ); + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + try (FileWriter writer = new FileWriter( outputPath )) { + gson.toJson(uriToImages, writer); + } catch ( IOException e) { + e.printStackTrace(); + } + + System.out.println("Wrote results to " + outputPath ); + } + + private static void createCollectionTable( Map< String, List< String > > uriToImages, final String tablePath ) + { + String[] imagesAndLabels = { "em/fibsem-uint16", "labels/pm_seg" }; + + Table table = Table.create( "OpenOrganelle" ); + + int numVolumes = uriToImages.size(); + int numRows = numVolumes * ( imagesAndLabels.length ); + + StringColumn uriColumn = StringColumn.create( CollectionTableConstants.URI, numRows ); + StringColumn typeColumn = StringColumn.create( CollectionTableConstants.TYPE, numRows ); + StringColumn gridColumn = StringColumn.create( CollectionTableConstants.GRID, numRows ); + StringColumn nameColumn = StringColumn.create( CollectionTableConstants.NAME, numRows ); + StringColumn contrastColumn = StringColumn.create( CollectionTableConstants.NAME, numRows ); + + table.addColumns( + uriColumn, + nameColumn, + typeColumn, + gridColumn, + contrastColumn ); + + int rowIndex = 0; + + for ( String relativePath : imagesAndLabels ) + { + for ( String uri : uriToImages.keySet() ) + { + String sampleName = Arrays.stream( uri.split( "/" ) ) + .filter( s -> s.contains( ".n5" ) ) + .map( s -> s.replace( ".n5", "" ) ) + .findFirst().get(); + + String type = relativePath.contains( "labels" ) ? + CollectionTableConstants.LABELS : + CollectionTableConstants.INTENSITIES; + + String contrast = relativePath.contains( "labels" ) ? + "" : + "(18000;32000)"; + + uriColumn.set( rowIndex, uri + "/" + relativePath ) ; + typeColumn.set( rowIndex, type ) ; + gridColumn.set( rowIndex, relativePath ); + nameColumn.set( rowIndex, sampleName + "/" + relativePath ); + contrastColumn.set( rowIndex, contrast ); + + rowIndex++; + } + } + + + CsvWriteOptions options = CsvWriteOptions.builder( tablePath ).separator( '\t' ).build(); + table.write().usingOptions( options ); + + System.out.println( "Written collection table to " + tablePath ); + } + + private static Map< String, List< String > > readImages( String imagesPath ) + { + Gson gson = new Gson(); + Type mapType = new TypeToken>>() {}.getType(); + + try ( FileReader reader = new FileReader(imagesPath)) { + return gson.fromJson(reader, mapType); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/src/main/java/org/embl/mobie/lib/ThreadHelper.java b/src/main/java/org/embl/mobie/lib/util/ThreadHelper.java similarity index 99% rename from src/main/java/org/embl/mobie/lib/ThreadHelper.java rename to src/main/java/org/embl/mobie/lib/util/ThreadHelper.java index eb5656981..39e500e59 100644 --- a/src/main/java/org/embl/mobie/lib/ThreadHelper.java +++ b/src/main/java/org/embl/mobie/lib/util/ThreadHelper.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package org.embl.mobie.lib; +package org.embl.mobie.lib.util; import bdv.cache.SharedQueue; diff --git a/src/main/java/org/embl/mobie/plugins/platybrowser/GeneSearch.java b/src/main/java/org/embl/mobie/plugins/platybrowser/GeneSearch.java index 5992dcdd4..eee04006b 100644 --- a/src/main/java/org/embl/mobie/plugins/platybrowser/GeneSearch.java +++ b/src/main/java/org/embl/mobie/plugins/platybrowser/GeneSearch.java @@ -33,7 +33,7 @@ import ij.IJ; import org.embl.mobie.DataStore; import org.embl.mobie.MoBIE; -import org.embl.mobie.lib.ThreadHelper; +import org.embl.mobie.lib.util.ThreadHelper; import org.embl.mobie.lib.serialize.DataSource; import org.embl.mobie.lib.serialize.Dataset; import org.embl.mobie.lib.serialize.ImageDataSource; diff --git a/src/main/java/org/embl/mobie/lib/MoBIEInfo.java b/src/main/java/org/embl/mobie/ui/MoBIEInfo.java similarity index 99% rename from src/main/java/org/embl/mobie/lib/MoBIEInfo.java rename to src/main/java/org/embl/mobie/ui/MoBIEInfo.java index e5897d3dc..1e974a088 100644 --- a/src/main/java/org/embl/mobie/lib/MoBIEInfo.java +++ b/src/main/java/org/embl/mobie/ui/MoBIEInfo.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package org.embl.mobie.lib; +package org.embl.mobie.ui; import bdv.tools.HelpDialog; import ij.IJ; diff --git a/src/main/java/org/embl/mobie/ui/SourceAndConverterProvider.java b/src/main/java/org/embl/mobie/ui/SourceAndConverterProvider.java index 85a6a17d0..6e63d7bf3 100644 --- a/src/main/java/org/embl/mobie/ui/SourceAndConverterProvider.java +++ b/src/main/java/org/embl/mobie/ui/SourceAndConverterProvider.java @@ -2,7 +2,7 @@ import bdv.util.BdvHandle; import bdv.viewer.SourceAndConverter; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import java.util.List; import java.util.stream.Collectors; diff --git a/src/main/java/org/embl/mobie/ui/UserInterfaceHelper.java b/src/main/java/org/embl/mobie/ui/UserInterfaceHelper.java index 1e717e963..70ba3ba6f 100644 --- a/src/main/java/org/embl/mobie/ui/UserInterfaceHelper.java +++ b/src/main/java/org/embl/mobie/ui/UserInterfaceHelper.java @@ -47,7 +47,6 @@ import org.embl.mobie.lib.bdv.AutoContrastAdjuster; import org.embl.mobie.lib.bdv.blend.BlendingMode; import org.embl.mobie.lib.io.FileLocation; -import org.embl.mobie.lib.MoBIEInfo; import org.embl.mobie.lib.Services; import org.embl.mobie.lib.color.ColorHelper; import org.embl.mobie.lib.color.OpacityHelper; @@ -712,7 +711,7 @@ public JPanel createSegmentationDisplaySettingsPanel( SegmentationDisplay displa panel.add( createSliceViewerVisibilityCheckbox( display.isVisible(), sourceAndConverters ) ); final AnnData annData = display.getAnnData(); - if ( annData != null ) + if ( annData != null ) // TODO: can annData ever be null?? { // segments 3D view panel.add( createSegmentsVolumeViewerVisibilityCheckbox( display ) ); diff --git a/src/test/java/develop/BenchmarkMultithreadedTableSawTableLoading.java b/src/test/java/develop/BenchmarkMultithreadedTableSawTableLoading.java index 0800d50d0..b1e7c8453 100644 --- a/src/test/java/develop/BenchmarkMultithreadedTableSawTableLoading.java +++ b/src/test/java/develop/BenchmarkMultithreadedTableSawTableLoading.java @@ -28,7 +28,7 @@ */ package develop; -import org.embl.mobie.lib.ThreadHelper; +import org.embl.mobie.lib.util.ThreadHelper; import tech.tablesaw.api.Table; import tech.tablesaw.io.csv.CsvReadOptions; diff --git a/src/test/java/develop/OpenWithBioFormatsFromS3.java b/src/test/java/develop/OpenWithBioFormatsFromS3.java index 8784a7a37..5b4087909 100644 --- a/src/test/java/develop/OpenWithBioFormatsFromS3.java +++ b/src/test/java/develop/OpenWithBioFormatsFromS3.java @@ -33,7 +33,6 @@ import loci.common.DebugTools; import loci.common.Location; import org.embl.mobie.io.util.IOHelper; -import org.embl.mobie.lib.MoBIEHelper; import java.io.*; diff --git a/src/test/java/develop/hcs/HCSIncuyteRaw.java b/src/test/java/develop/hcs/HCSIncuyteRaw.java index a597cafdf..92ea2a8e3 100644 --- a/src/test/java/develop/hcs/HCSIncuyteRaw.java +++ b/src/test/java/develop/hcs/HCSIncuyteRaw.java @@ -32,7 +32,6 @@ import net.imagej.ImageJ; import org.embl.mobie.MoBIE; import org.embl.mobie.MoBIESettings; -import org.embl.mobie.lib.ThreadHelper; import java.io.IOException; diff --git a/src/test/java/develop/hcs/HCSYokogawaCQ1.java b/src/test/java/develop/hcs/HCSYokogawaCQ1.java index c958a193b..d8050540f 100644 --- a/src/test/java/develop/hcs/HCSYokogawaCQ1.java +++ b/src/test/java/develop/hcs/HCSYokogawaCQ1.java @@ -29,11 +29,10 @@ package develop.hcs; import mpicbg.spim.data.SpimDataException; -import mpicbg.spim.data.sequence.FinalVoxelDimensions; import net.imagej.ImageJ; import org.embl.mobie.MoBIE; import org.embl.mobie.MoBIESettings; -import org.embl.mobie.lib.MoBIEHelper; +import org.embl.mobie.lib.util.MoBIEHelper; import java.io.IOException; diff --git a/src/test/resources/collections/open-organelle.txt b/src/test/resources/collections/open-organelle.txt new file mode 100644 index 000000000..8cc5a19c0 --- /dev/null +++ b/src/test/resources/collections/open-organelle.txt @@ -0,0 +1,7 @@ +uri name type grid +s3://janelia-cosem-datasets/jrc_hela-3/jrc_hela-3.n5/em/fibsem-uint16 jrc_hela-3/em/fibsem-uint16 intensities em/fibsem-uint16 +s3://janelia-cosem-datasets/jrc_macrophage-2/jrc_macrophage-2.n5/em/fibsem-uint16 jrc_macrophage-2/em/fibsem-uint16 intensities em/fibsem-uint16 +s3://janelia-cosem-datasets/jrc_jurkat-1/jrc_jurkat-1.n5/em/fibsem-uint16 jrc_jurkat-1/em/fibsem-uint16 intensities em/fibsem-uint16 +s3://janelia-cosem-datasets/jrc_hela-3/jrc_hela-3.n5/labels/pm_seg jrc_hela-3/labels/pm_seg labels labels/pm_seg +s3://janelia-cosem-datasets/jrc_macrophage-2/jrc_macrophage-2.n5/labels/pm_seg jrc_macrophage-2/labels/pm_seg labels labels/pm_seg +s3://janelia-cosem-datasets/jrc_jurkat-1/jrc_jurkat-1.n5/labels/pm_seg jrc_jurkat-1/labels/pm_seg labels labels/pm_seg diff --git a/src/test/resources/uriToImages.json b/src/test/resources/uriToImages.json new file mode 100644 index 000000000..f9af0dc9b --- /dev/null +++ b/src/test/resources/uriToImages.json @@ -0,0 +1,244 @@ +{ + "s3://janelia-cosem-datasets/jrc_hela-3/jrc_hela-3.n5": [ + "labels/nucleus_pred", + "labels/ne_pred", + "labels/chrom_pred", + "labels/golgi_mt_contacts", + "labels/cent-dapp_pred", + "labels/vesicle_seg", + "labels/mito_pred", + "labels/ne_seg", + "labels/lyso-mem_seg", + "labels/er_mt_contacts", + "labels/eres_seg", + "labels/ribo_classified", + "labels/np_pred", + "labels/ld-mem_pred", + "labels/chrom_seg", + "labels/mito_seg", + "labels/er-mem_seg", + "labels/vesicle_pred", + "labels/ld_pred", + "labels/lyso_seg", + "labels/nhchrom_pred", + "labels/golgi_vesicle_contacts", + "labels/ld-mem_seg", + "labels/nhchrom_seg", + "labels/lyso_pred", + "labels/endo_mt_contacts", + "labels/mt_pm_contacts", + "labels/pm_pred", + "labels/endo-mem_seg", + "labels/gt", + "labels/endo_pred", + "labels/endo_er_contacts", + "labels/mito-mem_seg", + "labels/endo_seg", + "labels/mito_mt_contacts", + "labels/np_seg", + "labels/cent-dapp_seg", + "labels/er_pm_contacts", + "labels/ne-mem_seg", + "labels/ld_seg", + "labels/er_seg", + "labels/er_curvature", + "labels/nucleus_seg", + "labels/vesicle-mem_pred", + "labels/nucleolus_seg", + "labels/lyso-mem_pred", + "labels/er_golgi_contacts", + "labels/er_vesicle_contacts", + "labels/mito_pm_contacts", + "labels/nucleolus_pred", + "labels/golgi-mem_seg", + "labels/ecs_seg", + "em/fibsem-uint16", + "labels/golgi-mem_pred", + "labels/vesicle-mem_seg", + "labels/mt-out_seg", + "labels/ribo_pred", + "labels/endo-mem_pred", + "labels/er-mem_pred", + "labels/eres_pred", + "labels/mito_skeleton-lsp", + "labels/cent_pred", + "labels/golgi_seg", + "labels/ribo_seg", + "labels/ecs_pred", + "labels/er_ribo_contacts", + "labels/mito_skeleton", + "labels/er_mito_contacts", + "labels/er_pred", + "labels/endo_golgi_contacts", + "labels/mt_vesicle_contacts", + "labels/ne-mem_pred", + "labels/pm_seg", + "labels/cent_seg", + "labels/mito-mem_pred", + "labels/golgi_pred", + "labels/er_medial-surface", + "labels/mt_nucleus_contacts", + "labels/masks/foreground" + ], + "s3://janelia-cosem-datasets/jrc_macrophage-2/jrc_macrophage-2.n5": [ + "em/fibsem-uint16", + "labels/ribo_pred", + "labels/er_golgi_contacts", + "labels/mt_pm_contacts", + "labels/mito_pm_contacts", + "labels/lyso-mem_seg", + "labels/mt-in_pred", + "labels/er_pm_contacts", + "labels/pm_seg", + "labels/golgi_vesicle_contacts", + "labels/chrom_pred", + "labels/ld_pred", + "labels/ribo_seg", + "labels/er-mem_pred", + "labels/mito_seg", + "labels/eres_seg", + "labels/mito_skeleton-lsp", + "labels/vesicle-mem_seg", + "labels/cent_seg", + "labels/er_ribo_contacts", + "labels/eres_pred", + "labels/golgi-mem_seg", + "labels/mt_vesicle_contacts", + "labels/ld_seg", + "labels/er_pred", + "labels/er_medial-surface", + "labels/endo_golgi_contacts", + "labels/ne-mem_seg", + "labels/er_curvature", + "labels/golgi_mt_contacts", + "labels/pm_pred", + "labels/vesicle_seg", + "labels/mito-mem_pred", + "labels/np_seg", + "labels/ecs_pred", + "labels/er_mito_contacts", + "labels/lyso_seg", + "labels/lyso-mem_pred", + "labels/mito-mem_seg", + "labels/nhchrom_pred", + "labels/nucleus_seg", + "labels/nucleolus_pred", + "labels/endo_er_contacts", + "labels/ecs_seg", + "labels/cent-dapp_seg", + "labels/np_pred", + "labels/nucleolus_seg", + "labels/ne-mem_pred", + "labels/ld-mem_seg", + "labels/mito_pred", + "labels/endo_pred", + "labels/ne_seg", + "labels/endo-mem_pred", + "labels/er-mem_seg", + "labels/golgi_pred", + "labels/endo_seg", + "labels/ne_pred", + "labels/nucleus_pred", + "labels/endo_mt_contacts", + "labels/cent-dapp_pred", + "labels/gt", + "labels/golgi_seg", + "labels/golgi-mem_pred", + "labels/mito_mt_contacts", + "labels/ribo_classified", + "labels/nhchrom_seg", + "labels/er_mt_contacts", + "labels/cent_pred", + "labels/mt-out_seg", + "labels/mt_nucleus_contacts", + "labels/vesicle_pred", + "labels/er_seg", + "labels/lyso_pred", + "labels/er_vesicle_contacts", + "labels/mito_skeleton", + "labels/chrom_seg", + "labels/ld-mem_pred", + "labels/endo-mem_seg", + "labels/vesicle-mem_pred", + "labels/masks/foreground" + ], + "s3://janelia-cosem-datasets/jrc_jurkat-1/jrc_jurkat-1.n5": [ + "labels/nucleus_seg", + "labels/er_mt_contacts", + "labels/ld_pred", + "labels/mito-mem_seg", + "labels/er-mem_pred", + "labels/ne-mem_seg", + "labels/nhchrom_pred", + "labels/chrom_seg", + "labels/er_pred", + "labels/nucleus_pred", + "labels/gt", + "labels/nucleolus_pred", + "labels/mito_pred", + "labels/mt_pm_contacts", + "labels/chrom_pred", + "labels/lyso-mem_pred", + "labels/ld_seg", + "labels/mito-mem_pred", + "labels/er_golgi_contacts", + "labels/vesicle-mem_pred", + "labels/er-mem_seg", + "labels/endo_pred", + "labels/nhchrom_seg", + "labels/cent_pred", + "labels/er_mito_contacts", + "labels/mt-out_seg", + "labels/ne_seg", + "labels/er_ribo_contacts", + "labels/pm_pred", + "labels/pm_seg", + "labels/mito_pm_contacts", + "labels/er_vesicle_contacts", + "labels/golgi_vesicle_contacts", + "labels/eres_seg", + "labels/ld-mem_pred", + "labels/cent_seg", + "labels/np_seg", + "labels/ribo_classified", + "labels/vesicle_seg", + "labels/er_medial-surface", + "labels/ribo_seg", + "labels/vesicle-mem_seg", + "labels/golgi-mem_seg", + "labels/mt_nucleus_contacts", + "labels/vesicle_pred", + "labels/golgi_pred", + "labels/ecs_pred", + "labels/eres_pred", + "labels/mito_seg", + "labels/er_seg", + "labels/mito_mt_contacts", + "labels/mt_vesicle_contacts", + "labels/cent-dapp_seg", + "labels/endo_mt_contacts", + "labels/ld-mem_seg", + "labels/er_curvature", + "labels/endo_er_contacts", + "labels/golgi_seg", + "labels/endo-mem_seg", + "labels/ne_pred", + "labels/ribo_pred", + "labels/endo-mem_pred", + "labels/endo_seg", + "labels/ecs_seg", + "labels/golgi-mem_pred", + "labels/lyso_seg", + "labels/cent-dapp_pred", + "labels/nucleolus_seg", + "labels/lyso-mem_seg", + "labels/endo_golgi_contacts", + "labels/np_pred", + "labels/lyso_pred", + "labels/ne-mem_pred", + "labels/er_pm_contacts", + "labels/golgi_mt_contacts", + "labels/masks/foreground", + "em/fibsem-uint16" + ] +} \ No newline at end of file