Repository: mobie/mobie-viewer-fiji (language: python)

Issue:
Update PublishedFigures.java
Add all panels for Fig2.


Discussion / hints:

Fix patch:
diff --git a/src/main/java/org/embl/mobie/viewer/MoBIE.java b/src/main/java/org/embl/mobie/viewer/MoBIE.java
index 7f8fbaef3..39a389737 100644
--- a/src/main/java/org/embl/mobie/viewer/MoBIE.java
+++ b/src/main/java/org/embl/mobie/viewer/MoBIE.java
@@ -95,6 +95,7 @@ public class MoBIE
 	private Map< String, SourceAndConverter< ? > > sourceNameToSourceAndConverter;
 	private ArrayList< String > projectCommands = new ArrayList<>();;
 	public static int minLogTimeMillis = 100;
+	public static boolean initiallyShowSourceNames = false;
 
 	public MoBIE( String projectRoot ) throws IOException
 	{
@@ -123,7 +124,7 @@ public MoBIE( String projectLocation, MoBIESettings settings ) throws IOExceptio
 		projectName = MoBIEHelper.getName( projectLocation );
 		PlaygroundPrefs.setSourceAndConverterUIVisibility( false );
 		project = new ProjectJsonParser().parseProject( IOHelper.combinePath( projectRoot,  "project.json" ) );
-		this.settings = setImageDataFormat( projectLocation );
+		setImageDataFormats( projectLocation );
 		openDataset();
 	}
 
@@ -157,47 +158,46 @@ private void setS3Credentials( MoBIESettings settings )
 		}
 	}
 
-	private MoBIESettings setImageDataFormat( String projectLocation )
+	private void setImageDataFormats( String projectLocation )
 	{
-		final List<ImageDataFormat> imageDataFormat = settings.values.getImageDataFormat();
+		final Set< ImageDataFormat > imageDataFormat = settings.values.getImageDataFormats();
 
-		if ( imageDataFormat.size()  != 0 )
+		if ( imageDataFormat.size() > 0 )
 		{
 			if ( project.getImageDataFormats().stream().noneMatch(imageDataFormat::contains) )
 			{
 				throw new RuntimeException( "The requested image data format " + imageDataFormat + " is not supported by the project: " + projectLocation );
 			}
 		}
-		else // automatically determine the correct image format
+		else
 		{
 			final List< ImageDataFormat > imageDataFormats = project.getImageDataFormats();
 			if ( projectLocation.startsWith( "http" ) )
 			{
 				if ( imageDataFormats.contains( ImageDataFormat.OmeZarrS3 ) )
-					settings.imageDataFormat( ImageDataFormat.OmeZarrS3 );
+					 settings.addImageDataFormat( ImageDataFormat.OmeZarrS3 );
 				if ( imageDataFormats.contains( ImageDataFormat.BdvOmeZarrS3 ) )
-					 settings.imageDataFormat( ImageDataFormat.BdvOmeZarrS3 );
+					 settings.addImageDataFormat( ImageDataFormat.BdvOmeZarrS3 );
 				if ( imageDataFormats.contains( ImageDataFormat.BdvN5S3 ) )
-					 settings.imageDataFormat( ImageDataFormat.BdvN5S3 );
+					 settings.addImageDataFormat( ImageDataFormat.BdvN5S3 );
 				if ( imageDataFormats.contains( ImageDataFormat.OpenOrganelleS3 ) )
-					 settings.imageDataFormat( ImageDataFormat.OpenOrganelleS3 );
-				if (!(imageDataFormats.contains( ImageDataFormat.OmeZarrS3 ) || imageDataFormats.contains( ImageDataFormat.BdvOmeZarrS3 )
+					 settings.addImageDataFormat( ImageDataFormat.OpenOrganelleS3 );
+				if ( ! ( imageDataFormats.contains( ImageDataFormat.OmeZarrS3 ) || imageDataFormats.contains( ImageDataFormat.BdvOmeZarrS3 )
                 || imageDataFormats.contains( ImageDataFormat.BdvN5S3 ) ||  imageDataFormats.contains( ImageDataFormat.OpenOrganelleS3 )))
-					throw new UnsupportedOperationException( "Could not find an S3 storage of the images." );
+					throw new UnsupportedOperationException( "Could not find any S3 storage of the images." );
 			}
 			else
 			{
 				if ( imageDataFormats.contains( ImageDataFormat.OmeZarr ) )
-					return settings.imageDataFormat( ImageDataFormat.OmeZarr );
-				else if ( imageDataFormats.contains( ImageDataFormat.BdvOmeZarr ) )
-					return settings.imageDataFormat( ImageDataFormat.BdvOmeZarr );
-				else if ( imageDataFormats.contains( ImageDataFormat.BdvN5 ) )
-					return settings.imageDataFormat( ImageDataFormat.BdvN5 );
+					settings.addImageDataFormat( ImageDataFormat.OmeZarr );
+				if ( imageDataFormats.contains( ImageDataFormat.BdvOmeZarr ) )
+					settings.addImageDataFormat( ImageDataFormat.BdvOmeZarr );
+				if ( imageDataFormats.contains( ImageDataFormat.BdvN5 ) )
+					settings.addImageDataFormat( ImageDataFormat.BdvN5 );
 				else
-					throw new UnsupportedOperationException( "Could not find a file system storage of the images." );
+					throw new UnsupportedOperationException( "Could not find any file system storage of the images." );
 			}
 		}
-		return settings;
 	}
 
 	public static void mergeRegionTables( List< RegionTableRow > tableRows, Map< String, List< String > > columns )
@@ -417,17 +417,8 @@ public synchronized ImageSource getSource( String sourceName )
 	public SourceAndConverter< ? > openSourceAndConverter( String sourceName, String log )
 	{
 		final ImageSource imageSource = getSource( sourceName );
-        Set<ImageDataFormat> tmp = imageSource.imageData.keySet();
-        ImageDataFormat imageDataFormat = null;
-        for ( ImageDataFormat f : tmp ) {
-            if ( settings.values.getImageDataFormat().contains( f ) ) {
-                imageDataFormat = f;
-            }
-        }
-        if (imageDataFormat == null) {
-            System.err.println( "Error opening: " + imageSource );
-            throw new RuntimeException();
-        }
+
+		ImageDataFormat imageDataFormat = getImageDataFormat( sourceName, imageSource.imageData.keySet() );
 
 		final String imagePath = getImagePath( imageSource, imageDataFormat );
         if( log != null )
@@ -453,6 +444,25 @@ public synchronized ImageSource getSource( String sourceName )
 		}
     }
 
+	private ImageDataFormat getImageDataFormat( String sourceName, Set< ImageDataFormat > sourceDataFormats )
+	{
+		for ( ImageDataFormat sourceDataFormat : sourceDataFormats )
+		{
+			if ( settings.values.getImageDataFormats().contains( sourceDataFormat ) )
+			{
+				return sourceDataFormat;
+			}
+		}
+
+		System.err.println("Error opening: " + sourceName );
+		for ( ImageDataFormat dataFormat : sourceDataFormats )
+			System.err.println("Source supports: " + dataFormat);
+		for ( ImageDataFormat dataFormat : settings.values.getImageDataFormats() )
+			System.err.println("Project settings support: " + dataFormat);
+		throw new RuntimeException();
+
+	}
+
 	private SpimData tryOpenSpimData( String imagePath, ImageDataFormat imageDataFormat )
 	{
 		try
diff --git a/src/main/java/org/embl/mobie/viewer/MoBIESettings.java b/src/main/java/org/embl/mobie/viewer/MoBIESettings.java
index 1b470b52a..ef52794de 100644
--- a/src/main/java/org/embl/mobie/viewer/MoBIESettings.java
+++ b/src/main/java/org/embl/mobie/viewer/MoBIESettings.java
@@ -31,7 +31,9 @@
 import org.embl.mobie.io.ImageDataFormat;
 
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 public class MoBIESettings
 {
@@ -60,7 +62,7 @@ public MoBIESettings gitProjectBranch( String gitBranch )
 		return this;
 	}
 
-	public MoBIESettings imageDataFormat( ImageDataFormat imageDataFormat )
+	public MoBIESettings addImageDataFormat( ImageDataFormat imageDataFormat )
 	{
 		this.values.imageDataFormats.add( imageDataFormat );
 		return this;
@@ -109,7 +111,7 @@ public static class Values
 		private String dataset;
 		private String projectBranch = "main"; // project and images
 		private String tableDataBranch;
-		private List<ImageDataFormat> imageDataFormats = new ArrayList<>();
+		private Set< ImageDataFormat > imageDataFormats = new HashSet<>();
 		private String projectLocation;
 		private String imageDataLocation;
 		private String tableDataLocation;
@@ -125,7 +127,7 @@ public String getProjectBranch()
 			return projectBranch;
 		}
 
-		public List<ImageDataFormat> getImageDataFormat() { return imageDataFormats; }
+		public Set< ImageDataFormat > getImageDataFormats() { return imageDataFormats; }
 
 		public String getImageDataLocation()
 		{
diff --git a/src/main/java/org/embl/mobie/viewer/bdv/DisplayVisibilityChecker.java b/src/main/java/org/embl/mobie/viewer/bdv/DisplayVisibilityChecker.java
new file mode 100644
index 000000000..b984390ab
--- /dev/null
+++ b/src/main/java/org/embl/mobie/viewer/bdv/DisplayVisibilityChecker.java
@@ -0,0 +1,26 @@
+package org.embl.mobie.viewer.bdv;
+
+import bdv.util.BdvHandle;
+import net.imglib2.FinalRealInterval;
+import org.embl.mobie.viewer.display.SourceDisplay;
+import sc.fiji.bdvpg.bdv.BdvHandleHelper;
+
+import java.util.function.Function;
+
+public class DisplayVisibilityChecker implements Function< SourceDisplay, Boolean >
+{
+	private final BdvHandle bdvHandle;
+
+	public DisplayVisibilityChecker( BdvHandle bdvHandle )
+	{
+		this.bdvHandle = bdvHandle;
+	}
+
+	@Override
+	public Boolean apply( SourceDisplay display )
+	{
+		final FinalRealInterval viewerInterval = BdvHandleHelper.getViewerGlobalBoundingInterval( bdvHandle );
+
+		return null;
+	}
+}
diff --git a/src/main/java/org/embl/mobie/viewer/bdv/SourceNamesRenderer.java b/src/main/java/org/embl/mobie/viewer/bdv/SourceNamesRenderer.java
new file mode 100644
index 000000000..17815a2d4
--- /dev/null
+++ b/src/main/java/org/embl/mobie/viewer/bdv/SourceNamesRenderer.java
@@ -0,0 +1,124 @@
+package org.embl.mobie.viewer.bdv;
+
+import bdv.util.BdvFunctions;
+import bdv.util.BdvHandle;
+import bdv.util.BdvOptions;
+import bdv.util.BdvOverlay;
+import bdv.util.BdvOverlaySource;
+import bdv.viewer.Source;
+import bdv.viewer.SourceAndConverter;
+import bdv.viewer.TransformListener;
+import bdv.viewer.ViewerState;
+import net.imglib2.FinalRealInterval;
+import net.imglib2.Interval;
+import net.imglib2.realtransform.AffineTransform3D;
+import net.imglib2.util.Intervals;
+import org.embl.mobie.viewer.source.SourceHelper;
+import sc.fiji.bdvpg.bdv.BdvHandleHelper;
+
+import java.awt.*;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class SourceNamesRenderer extends BdvOverlay implements TransformListener< AffineTransform3D >
+{
+	private final BdvHandle bdvHandle;
+	private Map< String, FinalRealInterval > sourceNameToBounds = new ConcurrentHashMap< String, FinalRealInterval >();
+	private FinalRealInterval viewerInterval;
+	private BdvOverlaySource< SourceNamesRenderer > overlaySource;
+	private boolean isActive;
+
+	public SourceNamesRenderer( BdvHandle bdvHandle, boolean isActive )
+	{
+		this.bdvHandle = bdvHandle;
+		bdvHandle.getViewerPanel().addTransformListener( this );
+		overlaySource = BdvFunctions.showOverlay(
+				this,
+				"sourceNameRenderer",
+				BdvOptions.options().addTo( bdvHandle ) );
+		setActive( isActive );
+	}
+
+	public void setActive( boolean isActive )
+	{
+		this.isActive = isActive;
+		overlaySource.setActive( isActive );
+	}
+
+	public boolean isActive()
+	{
+		return isActive;
+	}
+
+
+	@Override
+	public void transformChanged( AffineTransform3D transform3D )
+	{
+		adaptSourceNames();
+	}
+
+	private synchronized void adaptSourceNames()
+	{
+		sourceNameToBounds.clear();
+
+		final ViewerState viewerState = bdvHandle.getViewerPanel().state().snapshot();
+
+		final AffineTransform3D viewerTransform = viewerState.getViewerTransform();
+
+		viewerInterval = BdvHandleHelper.getViewerGlobalBoundingInterval( bdvHandle );
+
+		final Set< SourceAndConverter< ? > > sources = viewerState.getVisibleAndPresentSources();
+
+		final int t = viewerState.getCurrentTimepoint();
+
+		final AffineTransform3D sourceToGlobal = new AffineTransform3D();
+		final double[] sourceMin = new double[ 3 ];
+		final double[] sourceMax = new double[ 3 ];
+
+		for ( final SourceAndConverter< ? > source : sources )
+		{
+			if( SourceHelper.getLabelSource( source ) != null )
+			{
+				// do not show names of "overlays"
+				continue;
+			}
+
+			final Source< ? > spimSource = source.getSpimSource();
+
+			final int level = 0; // spimSource.getNumMipmapLevels() - 1;
+			spimSource.getSourceTransform( t, level, sourceToGlobal );
+
+			final Interval interval = spimSource.getSource( t, level );
+			for ( int d = 0; d < 3; d++ )
+			{
+				sourceMin[ d ] = interval.realMin( d );
+				sourceMax[ d ] = interval.realMax( d );
+			}
+			final FinalRealInterval sourceInterval = sourceToGlobal.estimateBounds( new FinalRealInterval( sourceMin, sourceMax ) );
+			final FinalRealInterval intersect = Intervals.intersect( sourceInterval, viewerInterval );
+			if ( ! Intervals.isEmpty( intersect ) )
+			{
+				// If we want the name to be always visible
+				// we could use intersect:
+				// final FinalRealInterval boundsInViewer = viewerTransform.estimateBounds( intersect );
+				final FinalRealInterval boundsInViewer = viewerTransform.estimateBounds( sourceInterval );
+				sourceNameToBounds.put( spimSource.getName(), boundsInViewer );
+			}
+		}
+	}
+
+	@Override
+	protected void draw( Graphics2D g )
+	{
+		for ( Map.Entry< String, FinalRealInterval > entry : sourceNameToBounds.entrySet() )
+		{
+			final FinalRealInterval sourceBoundsInViewer = entry.getValue();
+			final double sourceWidth = sourceBoundsInViewer.realMax( 0 ) - sourceBoundsInViewer.realMin( 0 );
+			final double relativeWidth = 1.0 * sourceWidth / bdvHandle.getViewerPanel().getWidth();
+			final int fontSize = Math.min( 20,  (int) ( 20 * 4 * relativeWidth ));
+			g.setFont( new Font( "TimesRoman", Font.PLAIN, fontSize ) );
+			g.drawString( entry.getKey(), (int) sourceBoundsInViewer.realMin( 0 ), (int) sourceBoundsInViewer.realMax( 1 ) + fontSize );
+		}
+	}
+}
diff --git a/src/main/java/org/embl/mobie/viewer/bdv/view/ImageSliceView.java b/src/main/java/org/embl/mobie/viewer/bdv/view/ImageSliceView.java
index d857a5406..f7989723c 100644
--- a/src/main/java/org/embl/mobie/viewer/bdv/view/ImageSliceView.java
+++ b/src/main/java/org/embl/mobie/viewer/bdv/view/ImageSliceView.java
@@ -66,7 +66,8 @@ public ImageSliceView( MoBIE moBIE, ImageDisplay display )
 	private void show( )
 	{
 		Map< String, SourceAndConverter< ? > > sourceNameToSourceAndConverter = new HashMap<>();
-		for ( String name : display.getSources() ) {
+		for ( String name : display.getSources() )
+		{
 			sourceNameToSourceAndConverter.put( name, moBIE.sourceNameToSourceAndConverter().get( name ) );
 		}
 
diff --git a/src/main/java/org/embl/mobie/viewer/bdv/view/SliceViewer.java b/src/main/java/org/embl/mobie/viewer/bdv/view/SliceViewer.java
index 3067bd811..4bdb04c29 100644
--- a/src/main/java/org/embl/mobie/viewer/bdv/view/SliceViewer.java
+++ b/src/main/java/org/embl/mobie/viewer/bdv/view/SliceViewer.java
@@ -30,10 +30,10 @@
 
 import bdv.util.BdvHandle;
 import bdv.viewer.SourceAndConverter;
-import net.imglib2.realtransform.AffineTransform3D;
 import org.embl.mobie.viewer.MoBIE;
 import org.embl.mobie.viewer.bdv.MobieBdvSupplier;
 import org.embl.mobie.viewer.bdv.MobieSerializableBdvOptions;
+import org.embl.mobie.viewer.bdv.SourceNamesRenderer;
 import org.embl.mobie.viewer.bdv.SourcesAtMousePositionSupplier;
 import org.embl.mobie.viewer.bdv.ViewerTransformLogger;
 import org.embl.mobie.viewer.bdv.render.BlendingMode;
@@ -47,9 +47,7 @@
 import org.embl.mobie.viewer.command.ShowRasterImagesCommand;
 import org.embl.mobie.viewer.command.SourceAndConverterBlendingModeChangerCommand;
 import org.embl.mobie.viewer.display.AbstractSourceDisplay;
-import org.embl.mobie.viewer.playground.SourceAffineTransformer;
 import org.embl.mobie.viewer.segment.SliceViewRegionSelector;
-import org.embl.mobie.viewer.view.ViewManager;
 import org.scijava.ui.behaviour.ClickBehaviour;
 import org.scijava.ui.behaviour.io.InputTriggerConfig;
 import org.scijava.ui.behaviour.util.Behaviours;
@@ -81,6 +79,7 @@ public class SliceViewer
 
 	private SourceAndConverterContextMenuClickBehaviour contextMenu;
 	private final SourceAndConverterService sacService;
+	private SourceNamesRenderer sourceNameRenderer;
 
 	public SliceViewer( MoBIE moBIE, boolean is2D, int timepoints )
 	{
@@ -96,9 +95,16 @@ public SliceViewer( MoBIE moBIE, boolean is2D, int timepoints )
 		setBdvWindowPositionAndSize( bdvHandle );
 		sacDisplayService.registerBdvHandle( bdvHandle );
 
+		sourceNameRenderer = new SourceNamesRenderer( bdvHandle, moBIE.initiallyShowSourceNames );
+
 		installContextMenuAndKeyboardShortCuts();
 	}
 
+	public SourceNamesRenderer getSourceNameRenderer()
+	{
+		return sourceNameRenderer;
+	}
+
 	public BdvHandle getBdvHandle()
 	{
 		if ( bdvHandle == null )
diff --git a/src/main/java/org/embl/mobie/viewer/command/OpenPublishedMoBIEFigureCommand.java b/src/main/java/org/embl/mobie/viewer/command/OpenMoBIEFigureCommand.java
similarity index 96%
rename from src/main/java/org/embl/mobie/viewer/command/OpenPublishedMoBIEFigureCommand.java
rename to src/main/java/org/embl/mobie/viewer/command/OpenMoBIEFigureCommand.java
index 472b0a75a..a152919f3 100644
--- a/src/main/java/org/embl/mobie/viewer/command/OpenPublishedMoBIEFigureCommand.java
+++ b/src/main/java/org/embl/mobie/viewer/command/OpenMoBIEFigureCommand.java
@@ -42,8 +42,8 @@
 import java.util.Map;
 
 
-@Plugin(type = Command.class, menuPath = CommandConstants.MOBIE_PLUGIN_ROOT + "Open>Open Published MoBIE Figure..." )
-public class OpenPublishedMoBIEFigureCommand implements Command
+@Plugin(type = Command.class, menuPath = CommandConstants.MOBIE_PLUGIN_ROOT + "Open>Open MoBIE Figure..." )
+public class OpenMoBIEFigureCommand implements Command
 {
 	static { net.imagej.patcher.LegacyInjector.preinit(); }
 
diff --git a/src/main/java/org/embl/mobie/viewer/command/OpenMoBIEProjectAdvancedCommand.java b/src/main/java/org/embl/mobie/viewer/command/OpenMoBIEProjectAdvancedCommand.java
index 14f945ffc..5f5450e8b 100644
--- a/src/main/java/org/embl/mobie/viewer/command/OpenMoBIEProjectAdvancedCommand.java
+++ b/src/main/java/org/embl/mobie/viewer/command/OpenMoBIEProjectAdvancedCommand.java
@@ -67,7 +67,7 @@ public void run()
 					projectLocation,
 					MoBIESettings.settings()
 							.gitProjectBranch( projectBranch )
-							.imageDataFormat( ImageDataFormat.valueOf( imageDataStorageModality ) )
+							.addImageDataFormat( ImageDataFormat.valueOf( imageDataStorageModality ) )
 							.imageDataLocation( imageDataLocation )
 							.tableDataLocation( tableDataLocation )
 							.gitTablesBranch( tableDataBranch ) );
diff --git a/src/main/java/org/embl/mobie/viewer/command/OpenPlatyBrowserCommand.java b/src/main/java/org/embl/mobie/viewer/command/OpenPlatyBrowserCommand.java
index 75e843675..b6cf87e77 100644
--- a/src/main/java/org/embl/mobie/viewer/command/OpenPlatyBrowserCommand.java
+++ b/src/main/java/org/embl/mobie/viewer/command/OpenPlatyBrowserCommand.java
@@ -43,7 +43,7 @@ public class OpenPlatyBrowserCommand implements Command
 	@Override
 	public void run()
 	{
-		MoBIESettings options = MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvN5S3 );
+		MoBIESettings options = MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvN5S3 );
 
 		try
 		{
diff --git a/src/main/java/org/embl/mobie/viewer/project/PublishedFigures.java b/src/main/java/org/embl/mobie/viewer/project/PublishedFigures.java
index 1ceaeb846..bdaa7472e 100644
--- a/src/main/java/org/embl/mobie/viewer/project/PublishedFigures.java
+++ b/src/main/java/org/embl/mobie/viewer/project/PublishedFigures.java
@@ -40,43 +40,25 @@ public class PublishedFigures
 
 	public PublishedFigures()
 	{
-		mobieFigure1c();
-		mobieFigure2a();
-		mobieFigure3( "a" );
-		mobieFigure3( "b" );
-		mobieFigure3( "c" );
-		mobieFigure3( "d" );
+		addMobieFigure( "1c" );
+		addMobieFigure( "2a" );
+		addMobieFigure( "2b" );
+		addMobieFigure( "2c" );
+		addMobieFigure( "2d" );
+		addMobieFigure( "2e" );
+		addMobieFigure( "3a" );
+		addMobieFigure( "3b" );
+		addMobieFigure( "3c" );
+		addMobieFigure( "3d" );
 	}
 
-	private void mobieFigure1c()
+	private void addMobieFigure( final String name )
 	{
 		final PublishedFigure figure = new PublishedFigure();
 		figure.publicationAbbreviation = MOBIE;
-		figure.name = "Figure 1c";
-		figure.location = "https://github.com/mobie/platybrowser-project";
-		figure.view = "Figure1c";
-		figure.publicationURL = "TBD";
-		publishedFigures.add( figure );
-	}
-
-	private void mobieFigure2a()
-	{
-		final PublishedFigure figure = new PublishedFigure();
-		figure.publicationAbbreviation = MOBIE;
-		figure.name = "Figure 2a";
+		figure.name = "Figure " + name;
 		figure.location = "https://github.com/mobie/clem-example-project";
-		figure.view = "Figure2a";
-		figure.publicationURL = "TBD";
-		publishedFigures.add( figure );
-	}
-
-	private void mobieFigure3( final String panel )
-	{
-		final PublishedFigure figure = new PublishedFigure();
-		figure.publicationAbbreviation = MOBIE;
-		figure.name = "Figure 3" + panel;
-		figure.location = "https://github.com/mobie/covid-if-project";
-		figure.view = "Figure3"+panel;
+		figure.view = "Figure" + name;
 		figure.publicationURL = "TBD";
 		publishedFigures.add( figure );
 	}
diff --git a/src/main/java/org/embl/mobie/viewer/source/SourceHelper.java b/src/main/java/org/embl/mobie/viewer/source/SourceHelper.java
index 8348bd18f..14ff0c6e6 100644
--- a/src/main/java/org/embl/mobie/viewer/source/SourceHelper.java
+++ b/src/main/java/org/embl/mobie/viewer/source/SourceHelper.java
@@ -119,4 +119,28 @@ else if ( sac.getSpimSource() instanceof TransformedSource )
             return null;
         }
     }
+
+
+    public static LabelSource< ? > isAnnotationSource( SourceAndConverter sac )
+    {
+        if ( sac.getSpimSource() instanceof LabelSource )
+        {
+            return ( LabelSource< ? > ) sac.getSpimSource();
+        }
+        else if ( sac.getSpimSource() instanceof TransformedSource )
+        {
+            if ( ( ( TransformedSource<?> ) sac.getSpimSource() ).getWrappedSource() instanceof LabelSource )
+            {
+                return ( LabelSource< ? > ) ( ( TransformedSource<?> ) sac.getSpimSource() ).getWrappedSource();
+            }
+            else
+            {
+                return null;
+            }
+        }
+        else
+        {
+            return null;
+        }
+    }
 }
diff --git a/src/main/java/org/embl/mobie/viewer/table/TableViewer.java b/src/main/java/org/embl/mobie/viewer/table/TableViewer.java
index 2f79ed8c8..19520ebae 100644
--- a/src/main/java/org/embl/mobie/viewer/table/TableViewer.java
+++ b/src/main/java/org/embl/mobie/viewer/table/TableViewer.java
@@ -67,7 +67,6 @@
 
 public class TableViewer< T extends TableRow > implements SelectionListener< T >, ColoringListener, TableRowListener
 {
-
 	static { net.imagej.patcher.LegacyInjector.preinit(); }
 
 	private final MoBIE moBIE;
diff --git a/src/main/java/org/embl/mobie/viewer/ui/UserInterface.java b/src/main/java/org/embl/mobie/viewer/ui/UserInterface.java
index 1a770478b..4bcf7b58d 100644
--- a/src/main/java/org/embl/mobie/viewer/ui/UserInterface.java
+++ b/src/main/java/org/embl/mobie/viewer/ui/UserInterface.java
@@ -90,7 +90,6 @@ private JFrame createAndShowFrame( JPanel selectionPanel, JPanel displaySettings
 		splitPane.setOrientation( JSplitPane.VERTICAL_SPLIT );
 		final int actionPanelHeight = userInterfaceHelper.getActionPanelHeight();
 
-
 		splitPane.setDividerLocation( actionPanelHeight );
 		splitPane.setTopComponent( selectionPanel );
 		splitPane.setBottomComponent( displaySettingsPanel );
diff --git a/src/main/java/org/embl/mobie/viewer/ui/UserInterfaceHelper.java b/src/main/java/org/embl/mobie/viewer/ui/UserInterfaceHelper.java
index 76a02a5cb..42b4f7d17 100644
--- a/src/main/java/org/embl/mobie/viewer/ui/UserInterfaceHelper.java
+++ b/src/main/java/org/embl/mobie/viewer/ui/UserInterfaceHelper.java
@@ -36,6 +36,7 @@
 import bdv.viewer.SourceAndConverter;
 import de.embl.cba.bdv.utils.BrightnessUpdateListener;
 import org.embl.mobie.viewer.*;
+import org.embl.mobie.viewer.bdv.SourceNamesRenderer;
 import org.embl.mobie.viewer.display.AbstractSourceDisplay;
 import org.embl.mobie.viewer.display.RegionDisplay;
 import org.embl.mobie.viewer.plot.ScatterPlotViewer;
@@ -289,7 +290,7 @@ public JPanel createSelectionPanel()
 
 		panel.add( new JSeparator( SwingConstants.HORIZONTAL ) );
 		panel.add( createMoveToLocationPanel( moBIE.getDataset().defaultLocation )  );
-		panel.add( createRemoveAllViewsPanel( moBIE ) );
+		panel.add( createClearAndSourceNamesOverlayPanel( moBIE ) );
 
 		return panel;
 	}
@@ -472,16 +473,11 @@ public Set<String> getGroupings() {
 		return groupingsToViews.keySet();
 	}
 
-	private JPanel createRemoveAllViewsPanel( MoBIE moBIE )
+	private JPanel createClearAndSourceNamesOverlayPanel( MoBIE moBIE )
 	{
-		JPanel panel = new JPanel();
-		panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
-		panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
-		panel.add(Box.createHorizontalGlue());
-		panel.setAlignmentX(0.0F);
+		final JPanel panel = SwingUtils.horizontalLayoutPanel();
 
 		final JButton button = SwingHelper.createButton( "clear", new Dimension( 80, TEXT_FIELD_HEIGHT ) );
-		button.setAlignmentX(Component.CENTER_ALIGNMENT);
 		button.addActionListener( e ->
 		{
 			SwingUtilities.invokeLater( () ->
@@ -493,6 +489,14 @@ private JPanel createRemoveAllViewsPanel( MoBIE moBIE )
 			} );
 		} );
 
+		JCheckBox checkBox = new JCheckBox( "overlay names" );
+		checkBox.setSelected( moBIE.initiallyShowSourceNames );
+		checkBox.addActionListener( e -> new Thread( () ->
+		{
+			moBIE.getViewManager().getSliceViewer().getSourceNameRenderer().setActive( checkBox.isSelected() );
+		}).start() );
+
+		panel.add( checkBox );
 		panel.add( button );
 		return panel;
 	}
@@ -531,7 +535,7 @@ private JPanel createViewSelectionPanel(MoBIE moBIE, String panelName, Map< Stri
 
 	public JPanel createMoveToLocationPanel( ViewerTransform transform )
 	{
-		final JPanel horizontalLayoutPanel = SwingUtils.horizontalLayoutPanel();
+		final JPanel panel = SwingUtils.horizontalLayoutPanel();
 		final JButton button = SwingHelper.createButton( MOVE );
 		final JTextField jTextField = new JTextField( ViewerTransform.toString( transform ) );
 		jTextField.setPreferredSize( new Dimension( SwingHelper.COMBOBOX_WIDTH - 3, TEXT_FIELD_HEIGHT ) );
@@ -542,11 +546,11 @@ public JPanel createMoveToLocationPanel( ViewerTransform transform )
 			SliceViewLocationChanger.changeLocation( this.moBIE.getViewManager().getSliceViewer().getBdvHandle(), viewerTransform );
 		} );
 
-		horizontalLayoutPanel.add( SwingHelper.getJLabel( "location" ) );
-		horizontalLayoutPanel.add( jTextField );
-		horizontalLayoutPanel.add( button );
+		panel.add( SwingHelper.getJLabel( "location" ) );
+		panel.add( jTextField );
+		panel.add( button );
 
-		return horizontalLayoutPanel;
+		return panel;
 	}
 
 	public JPanel createInfoPanel( String projectLocation, String publicationURL )
diff --git a/src/main/java/org/embl/mobie/viewer/view/ViewManager.java b/src/main/java/org/embl/mobie/viewer/view/ViewManager.java
index d22f05746..b2e991048 100644
--- a/src/main/java/org/embl/mobie/viewer/view/ViewManager.java
+++ b/src/main/java/org/embl/mobie/viewer/view/ViewManager.java
@@ -276,6 +276,9 @@ public synchronized void show( View view )
 			final SourceDisplay sourceDisplay = currentSourceDisplays.get( currentSourceDisplays.size() - 1);
 			new ViewerTransformAdjuster( sliceViewer.getBdvHandle(), ((AbstractSourceDisplay) sourceDisplay).sourceNameToSourceAndConverter.values().iterator().next() ).run();
 		}
+
+		// trigger rendering of source name overlay
+		getSliceViewer().getSourceNameRenderer().transformChanged( sliceViewer.getBdvHandle().getViewerPanel().state().getViewerTransform() );
 	}
 
 	public void openAndTransformSources( View view )
@@ -313,25 +316,6 @@ public void openAndTransformSources( View view )
 		moBIE.addSourceAndConverters( sourceNameToSourceAndConverters );
 	}
 
-	public void adjustViewerTransform( View view )
-	{
-		final BdvHandle bdvHandle = sliceViewer.getBdvHandle();
-
-		if ( view.getViewerTransform() != null )
-		{
-			SliceViewLocationChanger.changeLocation( bdvHandle, view.getViewerTransform() );
-		}
-		else
-		{
-			if ( view.isExclusive() || currentSourceDisplays.size() == 1 )
-			{
-				// TODO: rethink what should happen here...
-				final SourceDisplay sourceDisplay = currentSourceDisplays.get( currentSourceDisplays.size() > 0 ? currentSourceDisplays.size() - 1 : 0 );
-				new ViewerTransformAdjuster( bdvHandle, ((AbstractSourceDisplay) sourceDisplay).sourceNameToSourceAndConverter.values().iterator().next() ).run();
-			}
-		}
-	}
-
 	public Set< String > fetchSources( View view )
 	{
 		final Set< String > sources = new HashSet<>();


Test patch:
diff --git a/src/test/java/develop/DevelopNormalisedViewerTransforms.java b/src/test/java/develop/DevelopNormalisedViewerTransforms.java
index d8b7e6c3d..8b9106bd2 100644
--- a/src/test/java/develop/DevelopNormalisedViewerTransforms.java
+++ b/src/test/java/develop/DevelopNormalisedViewerTransforms.java
@@ -48,7 +48,7 @@ public static void main( String[] args )
 
 		try {
 			final MoBIE moBIE = new MoBIE("https://github.com/mobie-org/covid-em-datasets",
-					MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvN5S3 ) );
+					MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvN5S3 ) );
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
diff --git a/src/test/java/projects/OmeZarrS3V4Opener.java b/src/test/java/projects/OmeZarrS3V4Opener.java
index 55a5b3b13..a18bcbc93 100644
--- a/src/test/java/projects/OmeZarrS3V4Opener.java
+++ b/src/test/java/projects/OmeZarrS3V4Opener.java
@@ -43,6 +43,6 @@ public static void main(String[] args) throws IOException {
     public static void showYX() throws IOException {
         final ImageJ imageJ = new ImageJ();
         imageJ.ui().showUI();
-        final MoBIE moBIE = new MoBIE("https://s3.embl.de/i2k-2020/ngff-example-data/v0.4/yx.ome.zarr", MoBIESettings.settings().imageDataFormat( ImageDataFormat.OmeZarrS3));
+        final MoBIE moBIE = new MoBIE("https://s3.embl.de/i2k-2020/ngff-example-data/v0.4/yx.ome.zarr", MoBIESettings.settings().addImageDataFormat( ImageDataFormat.OmeZarrS3));
     }
 }
diff --git a/src/test/java/projects/OmeZarrV4FSOpener.java b/src/test/java/projects/OmeZarrV4FSOpener.java
index ca8a0d98e..c754c2cba 100644
--- a/src/test/java/projects/OmeZarrV4FSOpener.java
+++ b/src/test/java/projects/OmeZarrV4FSOpener.java
@@ -43,6 +43,6 @@ public static void main(String[] args) throws IOException {
     public static void showYX() throws IOException {
         final ImageJ imageJ = new ImageJ();
         imageJ.ui().showUI();
-        new MoBIE("/home/katerina/Documents/embl/mnt/kreshuk2/kreshuk/pape/Work/mobie/ngff/ome-ngff-prototypes/single_image/v0.4/yx.ome.zarr", MoBIESettings.settings().imageDataFormat( ImageDataFormat.OmeZarr));
+        new MoBIE("/home/katerina/Documents/embl/mnt/kreshuk2/kreshuk/pape/Work/mobie/ngff/ome-ngff-prototypes/single_image/v0.4/yx.ome.zarr", MoBIESettings.settings().addImageDataFormat( ImageDataFormat.OmeZarr));
     }
 }
diff --git a/src/test/java/projects/OpenLocalAutophagosomesEM.java b/src/test/java/projects/OpenLocalAutophagosomesEM.java
index 4c6764e95..c44dc842a 100644
--- a/src/test/java/projects/OpenLocalAutophagosomesEM.java
+++ b/src/test/java/projects/OpenLocalAutophagosomesEM.java
@@ -42,7 +42,7 @@ public static void main( String[] args )
 		new ImageJ().ui().showUI();
         try {
             new MoBIE("/g/kreshuk/pape/work/my_projects/autophagosoms-clem/data",
-                    MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvN5 ) );
+                    MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvN5 ) );
         } catch (IOException e) {
             e.printStackTrace();
         }
diff --git a/src/test/java/projects/OpenLocalBdvOmeZarr.java b/src/test/java/projects/OpenLocalBdvOmeZarr.java
index 381facc2d..83a0ba2ed 100644
--- a/src/test/java/projects/OpenLocalBdvOmeZarr.java
+++ b/src/test/java/projects/OpenLocalBdvOmeZarr.java
@@ -40,6 +40,6 @@ public static void main( String[] args ) throws IOException
     {
         final ImageJ imageJ = new ImageJ();
         imageJ.ui().showUI();
-        final MoBIE moBIE = new MoBIE("/home/katerina/Documents/embl/mnt/kreshuk/pape/Work/mobie/covid-em-datasets/ngff-example/data", MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvOmeZarr));
+        final MoBIE moBIE = new MoBIE("/home/katerina/Documents/embl/mnt/kreshuk/pape/Work/mobie/covid-em-datasets/ngff-example/data", MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvOmeZarr));
     }
 }
diff --git a/src/test/java/projects/OpenLocalConstantinNoTables.java b/src/test/java/projects/OpenLocalConstantinNoTables.java
index f9dc172c4..e8879bbce 100644
--- a/src/test/java/projects/OpenLocalConstantinNoTables.java
+++ b/src/test/java/projects/OpenLocalConstantinNoTables.java
@@ -41,6 +41,6 @@ public static void main( String[] args ) throws IOException
 	{
 		final ImageJ imageJ = new ImageJ();
 		imageJ.ui().showUI();
-		final MoBIE moBIE = new MoBIE("/Volumes/emcf/pape/jil", MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvN5 ));
+		final MoBIE moBIE = new MoBIE("/Volumes/emcf/pape/jil", MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvN5 ));
 	}
 }
diff --git a/src/test/java/projects/OpenLocalCovidEMCF.java b/src/test/java/projects/OpenLocalCovidEMCF.java
index 7297c29e1..ca182dbc9 100644
--- a/src/test/java/projects/OpenLocalCovidEMCF.java
+++ b/src/test/java/projects/OpenLocalCovidEMCF.java
@@ -43,7 +43,7 @@ public static void main( String[] args )
 		imageJ.ui().showUI();
 		try {
 			new MoBIE("/Volumes/emcf/common/5792_Sars-Cov-2/covid-em/data",
-					MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvN5 ) );
+					MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvN5 ) );
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
diff --git a/src/test/java/projects/OpenLocalCovidPlate.java b/src/test/java/projects/OpenLocalCovidPlate.java
index 8379b73ae..90c2eb7ca 100644
--- a/src/test/java/projects/OpenLocalCovidPlate.java
+++ b/src/test/java/projects/OpenLocalCovidPlate.java
@@ -43,7 +43,7 @@ public static void main( String[] args )
 		imageJ.ui().showUI();
 
 		try {
-			new MoBIE("/g/kreshuk/pape/Work/mobie/covid-if-project/data", MoBIESettings.settings().imageDataFormat( ImageDataFormat.OmeZarr ) );
+			new MoBIE("/g/kreshuk/pape/Work/mobie/covid-if-project/data", MoBIESettings.settings().addImageDataFormat( ImageDataFormat.OmeZarr ) );
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
diff --git a/src/test/java/projects/OpenLocalCovidTomos.java b/src/test/java/projects/OpenLocalCovidTomos.java
index 1611654ff..6eefc5058 100644
--- a/src/test/java/projects/OpenLocalCovidTomos.java
+++ b/src/test/java/projects/OpenLocalCovidTomos.java
@@ -42,7 +42,7 @@ public static void main( String[] args )
 		final ImageJ imageJ = new ImageJ();
 		imageJ.ui().showUI();
 		try {
-			new MoBIE("/Volumes/kreshuk/pape/Work/mobie/covid-tomo-datasets", MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvN5 ) );
+			new MoBIE("/Volumes/kreshuk/pape/Work/mobie/covid-tomo-datasets", MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvN5 ) );
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
diff --git a/src/test/java/projects/OpenLocalGiuliaMartinCLEM.java b/src/test/java/projects/OpenLocalGiuliaMartinCLEM.java
index 655ee255d..f1564992b 100644
--- a/src/test/java/projects/OpenLocalGiuliaMartinCLEM.java
+++ b/src/test/java/projects/OpenLocalGiuliaMartinCLEM.java
@@ -41,6 +41,6 @@ public static void main( String[] args ) throws IOException
 	{
 		final ImageJ imageJ = new ImageJ();
 		imageJ.ui().showUI();
-		new MoBIE("/g/emcf/pape/clem-example-project", MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvN5 ) );
+		new MoBIE("/g/emcf/pape/clem-example-project", MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvN5 ) );
 	}
 }
diff --git a/src/test/java/projects/OpenLocalJulianNoTables.java b/src/test/java/projects/OpenLocalJulianNoTables.java
index f2db8878d..7a1884040 100644
--- a/src/test/java/projects/OpenLocalJulianNoTables.java
+++ b/src/test/java/projects/OpenLocalJulianNoTables.java
@@ -41,6 +41,6 @@ public static void main( String[] args ) throws IOException
 	{
 		final ImageJ imageJ = new ImageJ();
 		imageJ.ui().showUI();
-		final MoBIE moBIE = new MoBIE("/Volumes/emcf/hennies/for_constantin/mobie_no_table_test/", MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvN5 ));
+		final MoBIE moBIE = new MoBIE("/Volumes/emcf/hennies/for_constantin/mobie_no_table_test/", MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvN5 ));
 	}
 }
diff --git a/src/test/java/projects/OpenLocalKarel.java b/src/test/java/projects/OpenLocalKarel.java
new file mode 100644
index 000000000..bea8dead5
--- /dev/null
+++ b/src/test/java/projects/OpenLocalKarel.java
@@ -0,0 +1,45 @@
+/*-
+ * #%L
+ * Fiji viewer for MoBIE projects
+ * %%
+ * Copyright (C) 2018 - 2022 EMBL
+ * %%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * #L%
+ */
+package projects;
+
+import net.imagej.ImageJ;
+import org.embl.mobie.io.ImageDataFormat;
+import org.embl.mobie.viewer.MoBIE;
+import org.embl.mobie.viewer.MoBIESettings;
+
+import java.io.IOException;
+
+public class OpenLocalKarel
+{
+    public static void main(String[] args) throws IOException {
+        final ImageJ imageJ = new ImageJ();
+        imageJ.ui().showUI();
+        new MoBIE( "/Volumes/schwab/Karel/MOBIE/MOBIE1_bc" );
+    }
+}
diff --git a/src/test/java/projects/OpenLocalMarianne.java b/src/test/java/projects/OpenLocalMarianne.java
new file mode 100644
index 000000000..635605171
--- /dev/null
+++ b/src/test/java/projects/OpenLocalMarianne.java
@@ -0,0 +1,43 @@
+/*-
+ * #%L
+ * Fiji viewer for MoBIE projects
+ * %%
+ * Copyright (C) 2018 - 2022 EMBL
+ * %%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * #L%
+ */
+package projects;
+
+import net.imagej.ImageJ;
+import org.embl.mobie.viewer.MoBIE;
+
+import java.io.IOException;
+
+public class OpenLocalMarianne
+{
+    public static void main(String[] args) throws IOException {
+        final ImageJ imageJ = new ImageJ();
+        imageJ.ui().showUI();
+        new MoBIE( "/Volumes/schwab/Beckwith_MSB/Microscopy_data/SBEM_data/220509_MSB26_sample2_liveCellCLEM/220509_MSB26_sample2_MoBIE" );
+    }
+}
diff --git a/src/test/java/projects/OpenLocalOmeZarr.java b/src/test/java/projects/OpenLocalOmeZarr.java
index ef9d0edae..909f7a0df 100644
--- a/src/test/java/projects/OpenLocalOmeZarr.java
+++ b/src/test/java/projects/OpenLocalOmeZarr.java
@@ -39,6 +39,6 @@ public class OpenLocalOmeZarr {
     public static void main(String[] args) throws IOException {
         final ImageJ imageJ = new ImageJ();
         imageJ.ui().showUI();
-        new MoBIE( "/g/kreshuk/pape/Work/mobie/covid-if-project/data", MoBIESettings.settings().imageDataFormat( ImageDataFormat.OmeZarr ) );
+        new MoBIE( "/g/kreshuk/pape/Work/mobie/covid-if-project/data", MoBIESettings.settings().addImageDataFormat( ImageDataFormat.OmeZarr ) );
     }
 }
diff --git a/src/test/java/projects/OpenLocalPlankton.java b/src/test/java/projects/OpenLocalPlankton.java
index 78571063c..b51a32a7b 100644
--- a/src/test/java/projects/OpenLocalPlankton.java
+++ b/src/test/java/projects/OpenLocalPlankton.java
@@ -42,7 +42,7 @@ public static void main( String[] args )
 		new ImageJ().ui().showUI();
 		try {
 			new MoBIE("/Volumes/emcf/pape/plankton-fibsem-project",
-					MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvN5 ).dataset( "galdieria" ) );
+					MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvN5 ).dataset( "galdieria" ) );
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
diff --git a/src/test/java/projects/OpenLocalPlatynereis.java b/src/test/java/projects/OpenLocalPlatynereis.java
index c1a36f521..e986c95e6 100644
--- a/src/test/java/projects/OpenLocalPlatynereis.java
+++ b/src/test/java/projects/OpenLocalPlatynereis.java
@@ -43,7 +43,7 @@ public static void main( String[] args )
 		imageJ.ui().showUI();
 		try {
 			new MoBIE("/g/arendt/EM_6dpf_segmentation/platy-browser-data/data/",
-					MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvN5 ) );
+					MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvN5 ) );
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
diff --git a/src/test/java/projects/OpenLocalTest.java b/src/test/java/projects/OpenLocalTest.java
index ceb3080bd..d9b43571f 100644
--- a/src/test/java/projects/OpenLocalTest.java
+++ b/src/test/java/projects/OpenLocalTest.java
@@ -41,6 +41,6 @@ public static void main( String[] args ) throws IOException
 	{
 		final ImageJ imageJ = new ImageJ();
 		imageJ.ui().showUI();
-		new MoBIE("/Users/tischer/Desktop/mobie/MartinFloat", MoBIESettings.settings().imageDataFormat( ImageDataFormat.OmeZarr ));
+		new MoBIE("/Users/tischer/Desktop/mobie/MartinFloat", MoBIESettings.settings().addImageDataFormat( ImageDataFormat.OmeZarr ));
 	}
 }
diff --git a/src/test/java/projects/OpenLocalTestData.java b/src/test/java/projects/OpenLocalTestData.java
index aaa19a79d..5b3bf3ab3 100644
--- a/src/test/java/projects/OpenLocalTestData.java
+++ b/src/test/java/projects/OpenLocalTestData.java
@@ -40,6 +40,6 @@ public class OpenLocalTestData
 	public static void main( String[] args ) throws IOException
 	{
 		final ImageJ imageJ = new ImageJ();
-		final MoBIE moBIE = new MoBIE("/g/emcf/pape/mobie-test-projects", MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvN5 ));
+		final MoBIE moBIE = new MoBIE("/g/emcf/pape/mobie-test-projects", MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvN5 ));
 	}
 }
diff --git a/src/test/java/projects/OpenLocalTobias.java b/src/test/java/projects/OpenLocalTobias.java
index b0d9e3ecd..48ca67d02 100644
--- a/src/test/java/projects/OpenLocalTobias.java
+++ b/src/test/java/projects/OpenLocalTobias.java
@@ -43,7 +43,7 @@ public static void main( String[] args )
 		imageJ.ui().showUI();
 		try {
 			new MoBIE("/g/schwab/Tobias/MoBIE",
-					MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvN5 ) );
+					MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvN5 ) );
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
diff --git a/src/test/java/projects/OpenRemoteArabidopsis.java b/src/test/java/projects/OpenRemoteArabidopsis.java
index 2e21209b3..b0f190893 100644
--- a/src/test/java/projects/OpenRemoteArabidopsis.java
+++ b/src/test/java/projects/OpenRemoteArabidopsis.java
@@ -41,6 +41,6 @@ public static void main( String[] args ) throws IOException
 	{
 		final ImageJ imageJ = new ImageJ();
 		imageJ.ui().showUI();
-		new MoBIE("https://github.com/mobie/arabidopsis-root-lm-datasets", MoBIESettings.settings().gitProjectBranch( "main" ).imageDataFormat( ImageDataFormat.BdvN5S3 ) );
+		new MoBIE("https://github.com/mobie/arabidopsis-root-lm-datasets", MoBIESettings.settings().gitProjectBranch( "main" ).addImageDataFormat( ImageDataFormat.BdvN5S3 ) );
 	}
 }
diff --git a/src/test/java/projects/OpenRemoteAutophagosomesCLEM.java b/src/test/java/projects/OpenRemoteAutophagosomesCLEM.java
index 79bd646de..7238f9606 100644
--- a/src/test/java/projects/OpenRemoteAutophagosomesCLEM.java
+++ b/src/test/java/projects/OpenRemoteAutophagosomesCLEM.java
@@ -43,7 +43,7 @@ public static void main( String[] args )
 		imageJ.ui().showUI();
 		try {
 			new MoBIE("https://github.com/mobie-org/autophagosomes-clem-datasets",
-					MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvN5S3 ) );
+					MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvN5S3 ) );
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
diff --git a/src/test/java/projects/OpenRemoteBdvOmeZarr.java b/src/test/java/projects/OpenRemoteBdvOmeZarr.java
index 406b19727..d6f6d8031 100644
--- a/src/test/java/projects/OpenRemoteBdvOmeZarr.java
+++ b/src/test/java/projects/OpenRemoteBdvOmeZarr.java
@@ -39,6 +39,6 @@ public class OpenRemoteBdvOmeZarr {
     public static void main(String[] args) throws IOException {
         final ImageJ imageJ = new ImageJ();
         imageJ.ui().showUI();
-        new MoBIE("https://s3.embl.de/i2k-2020/project-bdv-ome-zarr", MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvOmeZarr));
+        new MoBIE("https://s3.embl.de/i2k-2020/project-bdv-ome-zarr", MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvOmeZarr));
     }
 }
diff --git a/src/test/java/projects/OpenRemoteCOMULIS.java b/src/test/java/projects/OpenRemoteCOMULIS.java
index 25534f2f0..29e0c2709 100644
--- a/src/test/java/projects/OpenRemoteCOMULIS.java
+++ b/src/test/java/projects/OpenRemoteCOMULIS.java
@@ -41,6 +41,6 @@ public static void main( String[] args ) throws IOException
 	{
 		final ImageJ imageJ = new ImageJ();
 		imageJ.ui().showUI();
-		new MoBIE("https://s3.embl.de/comulis", MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvOmeZarrS3 ).s3AccessAndSecretKey( new String[]{"UYP3FNN3V5F0P86DR2O3","3EL7Czzg0vVwx2L4v27GQiX0Ct1GkMHS+tbcJR3D"} ) );
+		new MoBIE("https://s3.embl.de/comulis", MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvOmeZarrS3 ).s3AccessAndSecretKey( new String[]{"UYP3FNN3V5F0P86DR2O3","3EL7Czzg0vVwx2L4v27GQiX0Ct1GkMHS+tbcJR3D"} ) );
 	}
 }
diff --git a/src/test/java/projects/OpenRemoteCentriolesBranch.java b/src/test/java/projects/OpenRemoteCentriolesBranch.java
index 169a694b2..ef60507bb 100644
--- a/src/test/java/projects/OpenRemoteCentriolesBranch.java
+++ b/src/test/java/projects/OpenRemoteCentriolesBranch.java
@@ -44,7 +44,7 @@ public static void main( String[] args )
 
 		try {
 			new MoBIE("https://github.com/mobie/centrioles-tomo-datasets",
-					MoBIESettings.settings().gitProjectBranch( "grid-test-tomo" ).imageDataFormat( ImageDataFormat.BdvN5S3 ) );
+					MoBIESettings.settings().gitProjectBranch( "grid-test-tomo" ).addImageDataFormat( ImageDataFormat.BdvN5S3 ) );
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
diff --git a/src/test/java/projects/OpenRemoteCovidTomogramsBranch.java b/src/test/java/projects/OpenRemoteCovidTomogramsBranch.java
index e1df3e9a0..265625612 100644
--- a/src/test/java/projects/OpenRemoteCovidTomogramsBranch.java
+++ b/src/test/java/projects/OpenRemoteCovidTomogramsBranch.java
@@ -44,7 +44,7 @@ public static void main( String[] args )
 
 		try {
 			new MoBIE("https://github.com/mobie/covid-tomo-datasets",
-					MoBIESettings.settings().gitProjectBranch( "new-spec" ).imageDataFormat( ImageDataFormat.BdvN5S3 ) );
+					MoBIESettings.settings().gitProjectBranch( "new-spec" ).addImageDataFormat( ImageDataFormat.BdvN5S3 ) );
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
diff --git a/src/test/java/projects/OpenRemoteOmeZarr.java b/src/test/java/projects/OpenRemoteOmeZarr.java
index 22f1e2c73..8ce020169 100644
--- a/src/test/java/projects/OpenRemoteOmeZarr.java
+++ b/src/test/java/projects/OpenRemoteOmeZarr.java
@@ -41,7 +41,7 @@ public static void main(String[] args) throws IOException
     {
         final ImageJ imageJ = new ImageJ();
         imageJ.ui().showUI();
-        new MoBIE("https://s3.embl.de/i2k-2020/project-ome-zarr", MoBIESettings.settings().gitProjectBranch( "master" ).imageDataFormat( ImageDataFormat.OmeZarrS3));
+        new MoBIE("https://s3.embl.de/i2k-2020/project-ome-zarr", MoBIESettings.settings().gitProjectBranch( "master" ).addImageDataFormat( ImageDataFormat.OmeZarrS3));
     }
 }
 
diff --git a/src/test/java/projects/OpenRemoteOpenOrganelle.java b/src/test/java/projects/OpenRemoteOpenOrganelle.java
index bbef35d52..dc22bda95 100644
--- a/src/test/java/projects/OpenRemoteOpenOrganelle.java
+++ b/src/test/java/projects/OpenRemoteOpenOrganelle.java
@@ -42,7 +42,7 @@ public static void main( String[] args )
         final ImageJ imageJ = new ImageJ();
         imageJ.ui().showUI();
         try {
-            new MoBIE("https://github.com/mobie/open-organelle-test", MoBIESettings.settings().imageDataFormat( ImageDataFormat.OpenOrganelleS3) );
+            new MoBIE("https://github.com/mobie/open-organelle-test", MoBIESettings.settings().addImageDataFormat( ImageDataFormat.OpenOrganelleS3) );
         } catch (IOException e) {
             e.printStackTrace();
         }
diff --git a/src/test/java/projects/OpenRemoteTomograms.java b/src/test/java/projects/OpenRemoteTomograms.java
index 58edd6f26..5cbb77e9b 100644
--- a/src/test/java/projects/OpenRemoteTomograms.java
+++ b/src/test/java/projects/OpenRemoteTomograms.java
@@ -44,7 +44,7 @@ public static void main( String[] args )
 
 		try {
 			new MoBIE("https://github.com/mobie/covid-tomo-datasets",
-					MoBIESettings.settings().imageDataFormat( ImageDataFormat.BdvN5S3 ) );
+					MoBIESettings.settings().addImageDataFormat( ImageDataFormat.BdvN5S3 ) );
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
diff --git a/src/test/java/projects/OpenRemoteZebrafish.java b/src/test/java/projects/OpenRemoteZebrafish.java
index cd0a7f5c5..6a83ed750 100644
--- a/src/test/java/projects/OpenRemoteZebrafish.java
+++ b/src/test/java/projects/OpenRemoteZebrafish.java
@@ -41,6 +41,6 @@ public static void main( String[] args ) throws IOException
 	{
 		final ImageJ imageJ = new ImageJ();
 		imageJ.ui().showUI();
-		new MoBIE("https://github.com/mobie/zebrafish-lm-datasets", MoBIESettings.settings().gitProjectBranch( "main" ).imageDataFormat( ImageDataFormat.BdvN5S3 ) );
+		new MoBIE("https://github.com/mobie/zebrafish-lm-datasets", MoBIESettings.settings().gitProjectBranch( "main" ).addImageDataFormat( ImageDataFormat.BdvN5S3 ) );
 	}
 }