From 96b80102233b74b2d7d2ecddb8ffef032e9551e2 Mon Sep 17 00:00:00 2001 From: Nicolas Chiaruttini Date: Wed, 7 Feb 2024 16:35:14 +0100 Subject: [PATCH] Adapts to changes related to https://forum.image.sc/t/updated-ngff-support-in-fiji-hdf5-n5-zarr-ome-ngff/91705 SNAPSHOT parent pom - build will fail --- pom.xml | 13 +- ...ileSource.java => WrapVolatileSource.java} | 8 +- ...nsformAs3DRealTransformRunTimeAdapter.java | 57 ++ ...ed2DTransformAs3DRealTransformAdapter.java | 7 +- .../register/BigWarpLauncher.java | 5 +- .../transform/SourceResampler.java | 4 +- src/test/resources/bdvplaygroundstate.json | 614 +++++++++--------- src/test/src/sc/fiji/bdvpg/BigWarp2DTest.java | 2 +- 8 files changed, 387 insertions(+), 323 deletions(-) rename src/main/java/bdv/util/{VolatileSource.java => WrapVolatileSource.java} (94%) create mode 100644 src/main/java/net/imglib2/realtransform/InvertibleWrapped2DTransformAs3DRealTransformRunTimeAdapter.java diff --git a/pom.xml b/pom.xml index 1b0ebe68..148d09ec 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.scijava pom-scijava - 37.0.0 + 37.1.0-SNAPSHOT @@ -162,11 +162,6 @@ ${bigvolumeviewer.version} - - sc.fiji - bigwarp_fiji - - net.imglib2 imglib2 @@ -186,6 +181,12 @@ test + + sc.fiji + bigwarp_fiji + 9.1.0 + + net.imagej imagej diff --git a/src/main/java/bdv/util/VolatileSource.java b/src/main/java/bdv/util/WrapVolatileSource.java similarity index 94% rename from src/main/java/bdv/util/VolatileSource.java rename to src/main/java/bdv/util/WrapVolatileSource.java index b25abdfe..fe06a659 100644 --- a/src/main/java/bdv/util/VolatileSource.java +++ b/src/main/java/bdv/util/WrapVolatileSource.java @@ -55,7 +55,7 @@ import java.util.concurrent.ConcurrentHashMap; /** - * A {@link VolatileSource} simply wraps and cache volatileviews of a + * A {@link WrapVolatileSource} simply wraps and cache volatileviews of a * {@link Source} which can be made Volatile thanks to * {@link VolatileViews#wrapAsVolatile} That's not always possible! A * {@link SharedQueue} can be passed as an argument in the constructor to @@ -66,7 +66,7 @@ * @param {@link Volatile} type */ -public class VolatileSource, V extends Volatile & NumericType> +public class WrapVolatileSource, V extends Volatile & NumericType> implements Source { @@ -80,12 +80,12 @@ public class VolatileSource, V extends Volatile & Nu final ConcurrentHashMap>> cachedRAIs = new ConcurrentHashMap<>(); - public VolatileSource(final Source source) { + public WrapVolatileSource(final Source source) { this.originSource = source; queue = new SharedQueue(2); } - public VolatileSource(final Source originSource, final SharedQueue queue) { + public WrapVolatileSource(final Source originSource, final SharedQueue queue) { this.originSource = originSource; this.queue = queue; } diff --git a/src/main/java/net/imglib2/realtransform/InvertibleWrapped2DTransformAs3DRealTransformRunTimeAdapter.java b/src/main/java/net/imglib2/realtransform/InvertibleWrapped2DTransformAs3DRealTransformRunTimeAdapter.java new file mode 100644 index 00000000..817b3591 --- /dev/null +++ b/src/main/java/net/imglib2/realtransform/InvertibleWrapped2DTransformAs3DRealTransformRunTimeAdapter.java @@ -0,0 +1,57 @@ +/*- + * #%L + * BigDataViewer-Playground + * %% + * Copyright (C) 2019 - 2023 Nicolas Chiaruttini, EPFL - Robert Haase, MPI CBG - Christian Tischer, 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 net.imglib2.realtransform; + +import org.scijava.plugin.Plugin; +import sc.fiji.persist.IClassRuntimeAdapter; + +/** + * Adapter of an 2D transformed wrapped as 3D + */ + +@Plugin(type = IClassRuntimeAdapter.class) +public class InvertibleWrapped2DTransformAs3DRealTransformRunTimeAdapter implements + IClassRuntimeAdapter +{ + @Override + public Class getBaseClass() { + return RealTransform.class; + } + + @Override + public Class getRunTimeClass() { + return InvertibleWrapped2DTransformAs3D.class; + } + + @Override + public boolean useCustomAdapter() { + return false; + } +} diff --git a/src/main/java/net/imglib2/realtransform/Wrapped2DTransformAs3DRealTransformAdapter.java b/src/main/java/net/imglib2/realtransform/Wrapped2DTransformAs3DRealTransformAdapter.java index 117619f1..bc5dd9ae 100644 --- a/src/main/java/net/imglib2/realtransform/Wrapped2DTransformAs3DRealTransformAdapter.java +++ b/src/main/java/net/imglib2/realtransform/Wrapped2DTransformAs3DRealTransformAdapter.java @@ -63,12 +63,11 @@ public Wrapped2DTransformAs3D deserialize(JsonElement jsonElement, Type type, "wrappedTransform"), RealTransform.class); if (!(rt instanceof InvertibleRealTransform)) { - logger.error( - "Wrapped transform not invertible -> deserialization impossible..."); - return null; + + return new Wrapped2DTransformAs3D(rt); } - return new Wrapped2DTransformAs3D((InvertibleRealTransform) rt); + return new InvertibleWrapped2DTransformAs3D((InvertibleRealTransform) rt); } @Override diff --git a/src/main/java/sc/fiji/bdvpg/sourceandconverter/register/BigWarpLauncher.java b/src/main/java/sc/fiji/bdvpg/sourceandconverter/register/BigWarpLauncher.java index bf95137b..4a82e36d 100644 --- a/src/main/java/sc/fiji/bdvpg/sourceandconverter/register/BigWarpLauncher.java +++ b/src/main/java/sc/fiji/bdvpg/sourceandconverter/register/BigWarpLauncher.java @@ -35,6 +35,7 @@ import bdv.util.ViewerPanelHandle; import bdv.viewer.SourceAndConverter; import bigwarp.BigWarp; +import bigwarp.BigWarpData; import mpicbg.spim.data.SpimDataException; import java.util.ArrayList; @@ -50,7 +51,7 @@ public class BigWarpLauncher implements Runnable { - final BigWarp.BigWarpData bwData; + final BigWarpData bwData; BigWarp bigWarp; @@ -116,7 +117,7 @@ public BigWarpLauncher(List> movingSources, allConverterSetups.forEach(setup -> displaysettings.put(setup, new double[] { setup.getDisplayRangeMin(), setup.getDisplayRangeMax() })); - bwData = new BigWarp.BigWarpData(allSources, allConverterSetups, null, + bwData = new BigWarpData(allSources, allConverterSetups, null, mvSrcIndices, fxSrcIndices); } diff --git a/src/main/java/sc/fiji/bdvpg/sourceandconverter/transform/SourceResampler.java b/src/main/java/sc/fiji/bdvpg/sourceandconverter/transform/SourceResampler.java index 6080894d..ad0dfd88 100644 --- a/src/main/java/sc/fiji/bdvpg/sourceandconverter/transform/SourceResampler.java +++ b/src/main/java/sc/fiji/bdvpg/sourceandconverter/transform/SourceResampler.java @@ -30,7 +30,7 @@ package sc.fiji.bdvpg.sourceandconverter.transform; import bdv.util.ResampledSource; -import bdv.util.VolatileSource; +import bdv.util.WrapVolatileSource; import bdv.viewer.Source; import bdv.viewer.SourceAndConverter; import net.imglib2.Volatile; @@ -91,7 +91,7 @@ public SourceAndConverter apply(SourceAndConverter src) { SourceAndConverter> vsac; Source> vsrcResampled; if (cache) { - vsrcResampled = new VolatileSource<>(srcRsampled); + vsrcResampled = new WrapVolatileSource<>(srcRsampled); } else { vsrcResampled = new ResampledSource(src.asVolatile().getSpimSource(), diff --git a/src/test/resources/bdvplaygroundstate.json b/src/test/resources/bdvplaygroundstate.json index c80fc310..36eef199 100644 --- a/src/test/resources/bdvplaygroundstate.json +++ b/src/test/resources/bdvplaygroundstate.json @@ -14,7 +14,7 @@ "name": "upsampled", "mipmaps_reused": false, "defaultMipmapLevel": 0, - "origin_source_id": 34, + "origin_source_id": 43, "model_source_id": 15 }, "string_metadata": {} @@ -34,91 +34,8 @@ "name": "resampled", "mipmaps_reused": false, "defaultMipmapLevel": 0, - "origin_source_id": 18, - "model_source_id": 34 - }, - "string_metadata": {} - }, - { - "source_name": "mri-stack_xfm_0", - "source_class": "bdv.img.WarpedSource", - "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 2, - "color": 65535, - "converter_setup_min": 0.033052792654934965, - "converter_setup_max": 147.05187452180567, - "sac": { - "realtransform": { - "type": "WrappedIterativeInvertibleRealTransform", - "wrappedTransform": { - "type": "ThinplateSplineTransform", - "srcPts": [ - [ - 48.10642972599996, - 137.513570274, - 135.09716107, - 46.898225123999964, - 22.73413308399995, - 153.2202301, - 161.677662314, - 22.73413308399995 - ], - [ - 51.19156529799997, - 47.56695149199996, - 179.26125310999998, - 180.469457712, - 51.19156529799997, - 49.98336069599998, - 186.510480722, - 191.34329913 - ], - [ - -2.997892414000053, - -2.997892414000053, - -2.997892414000053, - -2.997892414000053, - 262.807120026, - 262.807120026, - 262.807120026, - 262.807120026 - ] - ], - "tgtPts": [ - [ - 49.31463432800045, - 137.51357027399985, - 137.5135702740003, - 38.44079291000003, - 153.22023010000024, - 160.46945771200052, - 31.191565298000512, - 32.39976989999984 - ], - [ - 56.024383706000094, - 45.15054228800079, - 172.0120254980005, - 178.053048508, - 49.98336069599971, - 181.6776623139993, - 176.84484390599977, - 52.39976989999997 - ], - [ - -2.997892414000063, - -2.997892414000063, - -2.997892414000063, - -2.997892414000063, - 262.807120026, - 262.807120026, - 262.807120026, - 262.807120026 - ] - ] - } - }, - "wrapped_source_id": 36 + "origin_source_id": 19, + "model_source_id": 43 }, "string_metadata": {} }, @@ -126,7 +43,7 @@ "source_name": "mri-stack_Transformed_mri-stack", "source_class": "bdv.img.WarpedSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 3, + "source_id": 2, "color": -1, "converter_setup_min": 0.014078041315990818, "converter_setup_max": 80.01958684009182, @@ -201,7 +118,7 @@ ] } }, - "wrapped_source_id": 29 + "wrapped_source_id": 36 }, "string_metadata": {} }, @@ -209,53 +126,56 @@ "source_name": "mri-stack_Transformed_mri-stack", "source_class": "bdv.img.WarpedSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 4, + "source_id": 3, "color": -1, "converter_setup_min": 0.014078041315990818, "converter_setup_max": 80.01958684009182, "sac": { "realtransform": { - "type": "Wrapped2DTransformAs3D", + "type": "WrappedIterativeInvertibleRealTransform", "wrappedTransform": { - "type": "WrappedIterativeInvertibleRealTransform", + "type": "Wrapped2DTransformAs3D", "wrappedTransform": { - "type": "ThinplateSplineTransform", - "srcPts": [ - [ - 0.586500005865, - 6.752850067528501, - 7.245000072450001, - 1.0, - 3.5973000359730003 - ], - [ - -0.3228000032280005, - 1.2115500121154996, - 4.6855500468555, - 4.5, - 1.1247000112469996 - ] - ], - "tgtPts": [ - [ - -1.942890293094024E-16, - 6.0, - 6.461300994119225, - 1.1102230246251565E-16, - 3.0 + "type": "WrappedIterativeInvertibleRealTransform", + "wrappedTransform": { + "type": "ThinplateSplineTransform", + "srcPts": [ + [ + 0.586500005865, + 6.752850067528501, + 7.245000072450001, + 1.0, + 3.5973000359730003 + ], + [ + -0.3228000032280005, + 1.2115500121154996, + 4.6855500468555, + 4.5, + 1.1247000112469996 + ] ], - [ - -2.220446049250313E-15, - 4.440892098500626E-16, - 4.266775559289091, - 3.9999999999999987, - 2.0 + "tgtPts": [ + [ + -1.942890293094024E-16, + 6.0, + 6.461300994119225, + 1.1102230246251565E-16, + 3.0 + ], + [ + -2.220446049250313E-15, + 4.440892098500626E-16, + 4.266775559289091, + 3.9999999999999987, + 2.0 + ] ] - ] + } } } }, - "wrapped_source_id": 29 + "wrapped_source_id": 36 }, "string_metadata": {} }, @@ -263,7 +183,7 @@ "source_name": "mri-stack_Transformed_mri-stack", "source_class": "bdv.img.WarpedSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 5, + "source_id": 4, "color": -1, "converter_setup_min": 0.014078041315990818, "converter_setup_max": 80.01958684009182, @@ -285,7 +205,7 @@ 0.0 ] }, - "wrapped_source_id": 29 + "wrapped_source_id": 36 }, "string_metadata": {} }, @@ -293,103 +213,106 @@ "source_name": "mri-stack_Transformed_mri-stack", "source_class": "bdv.img.WarpedSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 6, + "source_id": 5, "color": -1, "converter_setup_min": 0.014078041315990818, "converter_setup_max": 80.01958684009182, "sac": { "realtransform": { - "type": "RealTransformSequence", - "size": 2, - "realTransform_0": { - "type": "AffineTransform3D", - "affinetransform3d": [ - 1.0, - 0.0, - 0.0, - -150.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0 - ] - }, - "realTransform_1": { - "type": "WrappedIterativeInvertibleRealTransform", - "wrappedTransform": { - "type": "ThinplateSplineTransform", - "srcPts": [ - [ - 48.10642972599996, - 137.513570274, - 135.09716107, - 46.898225123999964, - 22.73413308399995, - 153.2202301, - 161.677662314, - 22.73413308399995 - ], - [ - 51.19156529799997, - 47.56695149199996, - 179.26125310999998, - 180.469457712, - 51.19156529799997, - 49.98336069599998, - 186.510480722, - 191.34329913 - ], - [ - -2.997892414000053, - -2.997892414000053, - -2.997892414000053, - -2.997892414000053, - 262.807120026, - 262.807120026, - 262.807120026, - 262.807120026 - ] - ], - "tgtPts": [ - [ - 49.31463432800045, - 137.51357027399985, - 137.5135702740003, - 38.44079291000003, - 153.22023010000024, - 160.46945771200052, - 31.191565298000512, - 32.39976989999984 - ], - [ - 56.024383706000094, - 45.15054228800079, - 172.0120254980005, - 178.053048508, - 49.98336069599971, - 181.6776623139993, - 176.84484390599977, - 52.39976989999997 + "type": "WrappedIterativeInvertibleRealTransform", + "wrappedTransform": { + "type": "RealTransformSequence", + "size": 2, + "realTransform_0": { + "type": "AffineTransform3D", + "affinetransform3d": [ + 1.0, + 0.0, + 0.0, + -150.0, + 0.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 1.0, + 0.0 + ] + }, + "realTransform_1": { + "type": "WrappedIterativeInvertibleRealTransform", + "wrappedTransform": { + "type": "ThinplateSplineTransform", + "srcPts": [ + [ + 48.10642972599996, + 137.513570274, + 135.09716107, + 46.898225123999964, + 22.73413308399995, + 153.2202301, + 161.677662314, + 22.73413308399995 + ], + [ + 51.19156529799997, + 47.56695149199996, + 179.26125310999998, + 180.469457712, + 51.19156529799997, + 49.98336069599998, + 186.510480722, + 191.34329913 + ], + [ + -2.997892414000053, + -2.997892414000053, + -2.997892414000053, + -2.997892414000053, + 262.807120026, + 262.807120026, + 262.807120026, + 262.807120026 + ] ], - [ - -2.997892414000063, - -2.997892414000063, - -2.997892414000063, - -2.997892414000063, - 262.807120026, - 262.807120026, - 262.807120026, - 262.807120026 + "tgtPts": [ + [ + 49.31463432800045, + 137.51357027399985, + 137.5135702740003, + 38.44079291000003, + 153.22023010000024, + 160.46945771200052, + 31.191565298000512, + 32.39976989999984 + ], + [ + 56.024383706000094, + 45.15054228800079, + 172.0120254980005, + 178.053048508, + 49.98336069599971, + 181.6776623139993, + 176.84484390599977, + 52.39976989999997 + ], + [ + -2.997892414000063, + -2.997892414000063, + -2.997892414000063, + -2.997892414000063, + 262.807120026, + 262.807120026, + 262.807120026, + 262.807120026 + ] ] - ] + } } } }, - "wrapped_source_id": 29 + "wrapped_source_id": 36 }, "string_metadata": {} }, @@ -397,7 +320,7 @@ "source_name": "mri-stack_Transformed_mri-stack", "source_class": "bdv.img.WarpedSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 7, + "source_id": 6, "color": -1, "converter_setup_min": 0.014078041315990818, "converter_setup_max": 80.01958684009182, @@ -510,7 +433,90 @@ } } }, - "wrapped_source_id": 29 + "wrapped_source_id": 36 + }, + "string_metadata": {} + }, + { + "source_name": "mri-stack", + "source_class": "bdv.img.WarpedSource", + "converter_class": "class net.imglib2.display.Instances$Imp", + "source_id": 7, + "color": 65535, + "converter_setup_min": 0.033052792654934965, + "converter_setup_max": 147.05187452180567, + "sac": { + "realtransform": { + "type": "WrappedIterativeInvertibleRealTransform", + "wrappedTransform": { + "type": "ThinplateSplineTransform", + "srcPts": [ + [ + 48.10642972599996, + 137.513570274, + 135.09716107, + 46.898225123999964, + 22.73413308399995, + 153.2202301, + 161.677662314, + 22.73413308399995 + ], + [ + 51.19156529799997, + 47.56695149199996, + 179.26125310999998, + 180.469457712, + 51.19156529799997, + 49.98336069599998, + 186.510480722, + 191.34329913 + ], + [ + -2.997892414000053, + -2.997892414000053, + -2.997892414000053, + -2.997892414000053, + 262.807120026, + 262.807120026, + 262.807120026, + 262.807120026 + ] + ], + "tgtPts": [ + [ + 49.31463432800045, + 137.51357027399985, + 137.5135702740003, + 38.44079291000003, + 153.22023010000024, + 160.46945771200052, + 31.191565298000512, + 32.39976989999984 + ], + [ + 56.024383706000094, + 45.15054228800079, + 172.0120254980005, + 178.053048508, + 49.98336069599971, + 181.6776623139993, + 176.84484390599977, + 52.39976989999997 + ], + [ + -2.997892414000063, + -2.997892414000063, + -2.997892414000063, + -2.997892414000063, + 262.807120026, + 262.807120026, + 262.807120026, + 262.807120026 + ] + ] + } + }, + "wrapped_source_id": 30 }, "string_metadata": {} }, @@ -526,12 +532,12 @@ "affinetransform_fixed": { "type": "AffineTransform3D", "affinetransform3d": [ - 0.40724247873649605, - -0.350944664577545, + 0.41763403757554357, + -0.4721647444539477, 0.0, 0.0, - 0.449600569454885, - 0.5217245589601788, + 0.4857813631046524, + 0.42967806138718356, 0.0, 0.0, 0.0, @@ -540,7 +546,7 @@ 0.0 ] }, - "wrapped_source_id": 43 + "wrapped_source_id": 28 }, "string_metadata": {} }, @@ -556,12 +562,12 @@ "affinetransform_fixed": { "type": "AffineTransform3D", "affinetransform3d": [ - 0.6554986954899293, - -0.08793865103668025, + 0.43215302289310337, + -0.3679807058466737, 0.0, 0.0, - 0.07194589092719157, - 0.5362879358811593, + 0.4484539744859978, + 0.526660060224194, 0.0, 200.0, 0.0, @@ -570,7 +576,7 @@ 0.0 ] }, - "wrapped_source_id": 43 + "wrapped_source_id": 28 }, "string_metadata": {} }, @@ -586,12 +592,12 @@ "affinetransform_fixed": { "type": "AffineTransform3D", "affinetransform3d": [ - 0.4884912246754022, - -0.5436041489569989, + 0.7159119994330282, + -0.022923595785999087, 0.0, 200.0, - 0.5469479864944429, - 0.49149604959610155, + 0.022466123338061743, + 0.7016249731765114, 0.0, 0.0, 0.0, @@ -600,7 +606,7 @@ 0.0 ] }, - "wrapped_source_id": 43 + "wrapped_source_id": 28 }, "string_metadata": {} }, @@ -616,12 +622,12 @@ "affinetransform_fixed": { "type": "AffineTransform3D", "affinetransform3d": [ - 0.3372662901785498, - -0.4062113270744023, + 0.42810450792982446, + -0.27641549806368326, 0.0, 200.0, - 0.4800935087753769, - 0.3986086695554332, + 0.2751419213565663, + 0.4261320283354076, 0.0, 200.0, 0.0, @@ -630,7 +636,7 @@ 0.0 ] }, - "wrapped_source_id": 43 + "wrapped_source_id": 28 }, "string_metadata": {} }, @@ -649,7 +655,7 @@ "name": "downsampled-with-mipmap", "mipmaps_reused": true, "defaultMipmapLevel": 0, - "origin_source_id": 34, + "origin_source_id": 43, "model_source_id": 20 }, "string_metadata": {} @@ -669,13 +675,13 @@ "name": "downsampled", "mipmaps_reused": false, "defaultMipmapLevel": 0, - "origin_source_id": 34, + "origin_source_id": 43, "model_source_id": 21 }, "string_metadata": {} }, { - "source_name": "demoSlice.tif channel 1_xfm_0", + "source_name": "demoSlice.tif channel 1", "source_class": "bdv.img.WarpedSource", "converter_class": "class net.imglib2.display.Instances$Imp", "source_id": 14, @@ -684,7 +690,7 @@ "converter_setup_max": 131.07039020657996, "sac": { "realtransform": { - "type": "Wrapped2DTransformAs3D", + "type": "InvertibleWrapped2DTransformAs3D", "wrappedTransform": { "type": "WrappedIterativeInvertibleRealTransform", "wrappedTransform": { @@ -766,11 +772,12 @@ }, "string_metadata": {} }, + null, { "source_name": "Mandelbrot Set", "source_class": "bdv.tools.transformation.TransformedSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 18, + "source_id": 19, "color": -1, "converter_setup_min": 0.0, "converter_setup_max": 800.0, @@ -792,7 +799,7 @@ 0.0 ] }, - "wrapped_source_id": 19 + "wrapped_source_id": 18 }, "string_metadata": {} }, @@ -801,7 +808,7 @@ "source_name": "Mandelbrot Set", "source_class": "bdv.tools.transformation.TransformedSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 18, + "source_id": 19, "color": -1, "converter_setup_min": 0.0, "converter_setup_max": 800.0, @@ -823,11 +830,10 @@ 0.0 ] }, - "wrapped_source_id": 19 + "wrapped_source_id": 18 }, "string_metadata": {} }, - null, { "source_name": "DownSampled", "source_class": "bdv.util.EmptySource", @@ -940,13 +946,13 @@ "source_name": "mri-stack", "source_class": "bdv.SpimSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 29, + "source_id": 28, "color": -1, - "converter_setup_min": 0.014078041315990818, - "converter_setup_max": 80.01958684009182, + "converter_setup_min": 0.033052792654934965, + "converter_setup_max": 147.05187452180567, "sac": { "spimdata": { - "datalocation": "src/test/resources/mri-stack-multilevel.xml" + "datalocation": "src/test/resources/mri-stack.xml" }, "viewsetup": 0 }, @@ -956,13 +962,13 @@ "source_name": "mri-stack", "source_class": "bdv.SpimSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 29, + "source_id": 28, "color": -1, - "converter_setup_min": 0.014078041315990818, - "converter_setup_max": 80.01958684009182, + "converter_setup_min": 0.033052792654934965, + "converter_setup_max": 147.05187452180567, "sac": { "spimdata": { - "datalocation": "src/test/resources/mri-stack-multilevel.xml" + "datalocation": "src/test/resources/mri-stack.xml" }, "viewsetup": 0 }, @@ -972,13 +978,13 @@ "source_name": "mri-stack", "source_class": "bdv.SpimSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 29, + "source_id": 28, "color": -1, - "converter_setup_min": 0.014078041315990818, - "converter_setup_max": 80.01958684009182, + "converter_setup_min": 0.033052792654934965, + "converter_setup_max": 147.05187452180567, "sac": { "spimdata": { - "datalocation": "src/test/resources/mri-stack-multilevel.xml" + "datalocation": "src/test/resources/mri-stack.xml" }, "viewsetup": 0 }, @@ -988,13 +994,13 @@ "source_name": "mri-stack", "source_class": "bdv.SpimSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 29, + "source_id": 28, "color": -1, - "converter_setup_min": 0.014078041315990818, - "converter_setup_max": 80.01958684009182, + "converter_setup_min": 0.033052792654934965, + "converter_setup_max": 147.05187452180567, "sac": { "spimdata": { - "datalocation": "src/test/resources/mri-stack-multilevel.xml" + "datalocation": "src/test/resources/mri-stack.xml" }, "viewsetup": 0 }, @@ -1004,13 +1010,13 @@ "source_name": "mri-stack", "source_class": "bdv.SpimSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 29, + "source_id": 28, "color": -1, - "converter_setup_min": 0.014078041315990818, - "converter_setup_max": 80.01958684009182, + "converter_setup_min": 0.033052792654934965, + "converter_setup_max": 147.05187452180567, "sac": { "spimdata": { - "datalocation": "src/test/resources/mri-stack-multilevel.xml" + "datalocation": "src/test/resources/mri-stack.xml" }, "viewsetup": 0 }, @@ -1020,13 +1026,13 @@ "source_name": "mri-stack", "source_class": "bdv.SpimSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 29, - "color": -1, - "converter_setup_min": 0.014078041315990818, - "converter_setup_max": 80.01958684009182, + "source_id": 30, + "color": 65535, + "converter_setup_min": 0.033052792654934965, + "converter_setup_max": 147.05187452180567, "sac": { "spimdata": { - "datalocation": "src/test/resources/mri-stack-multilevel.xml" + "datalocation": "src/test/resources/mri-stack.xml" }, "viewsetup": 0 }, @@ -1036,13 +1042,13 @@ "source_name": "mri-stack", "source_class": "bdv.SpimSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 34, - "color": -1, - "converter_setup_min": 0.014078041315990818, - "converter_setup_max": 80.01958684009182, + "source_id": 30, + "color": 65535, + "converter_setup_min": 0.033052792654934965, + "converter_setup_max": 147.05187452180567, "sac": { "spimdata": { - "datalocation": "src/test/resources/mri-stack-multilevel.xml" + "datalocation": "src/test/resources/mri-stack.xml" }, "viewsetup": 0 }, @@ -1052,7 +1058,7 @@ "source_name": "mri-stack", "source_class": "bdv.SpimSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 34, + "source_id": 36, "color": -1, "converter_setup_min": 0.014078041315990818, "converter_setup_max": 80.01958684009182, @@ -1068,7 +1074,7 @@ "source_name": "mri-stack", "source_class": "bdv.SpimSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 34, + "source_id": 36, "color": -1, "converter_setup_min": 0.014078041315990818, "converter_setup_max": 80.01958684009182, @@ -1084,7 +1090,7 @@ "source_name": "mri-stack", "source_class": "bdv.SpimSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 34, + "source_id": 36, "color": -1, "converter_setup_min": 0.014078041315990818, "converter_setup_max": 80.01958684009182, @@ -1100,7 +1106,7 @@ "source_name": "mri-stack", "source_class": "bdv.SpimSource", "converter_class": "class net.imglib2.display.Instances$Imp", - "source_id": 34, + "source_id": 36, "color": -1, "converter_setup_min": 0.014078041315990818, "converter_setup_max": 80.01958684009182, @@ -1117,12 +1123,12 @@ "source_class": "bdv.SpimSource", "converter_class": "class net.imglib2.display.Instances$Imp", "source_id": 36, - "color": 65535, - "converter_setup_min": 0.033052792654934965, - "converter_setup_max": 147.05187452180567, + "color": -1, + "converter_setup_min": 0.014078041315990818, + "converter_setup_max": 80.01958684009182, "sac": { "spimdata": { - "datalocation": "src/test/resources/mri-stack.xml" + "datalocation": "src/test/resources/mri-stack-multilevel.xml" }, "viewsetup": 0 }, @@ -1133,12 +1139,12 @@ "source_class": "bdv.SpimSource", "converter_class": "class net.imglib2.display.Instances$Imp", "source_id": 36, - "color": 65535, - "converter_setup_min": 0.033052792654934965, - "converter_setup_max": 147.05187452180567, + "color": -1, + "converter_setup_min": 0.014078041315990818, + "converter_setup_max": 80.01958684009182, "sac": { "spimdata": { - "datalocation": "src/test/resources/mri-stack.xml" + "datalocation": "src/test/resources/mri-stack-multilevel.xml" }, "viewsetup": 0 }, @@ -1150,8 +1156,8 @@ "converter_class": "class net.imglib2.display.Instances$Imp", "source_id": 37, "color": -1, - "converter_setup_min": 10.0, - "converter_setup_max": 180.0, + "converter_setup_min": 0.033052792654934965, + "converter_setup_max": 147.05187452180567, "sac": { "spimdata": { "datalocation": "src/test/resources/mri-stack.xml" @@ -1166,8 +1172,8 @@ "converter_class": "class net.imglib2.display.Instances$Imp", "source_id": 38, "color": -1, - "converter_setup_min": 10.0, - "converter_setup_max": 250.0, + "converter_setup_min": 0.03902065799540933, + "converter_setup_max": 131.07039020657996, "sac": { "spimdata": { "datalocation": "src/test/resources/demoSlice.xml" @@ -1182,11 +1188,11 @@ "converter_class": "class net.imglib2.display.Instances$Imp", "source_id": 43, "color": -1, - "converter_setup_min": 0.033052792654934965, - "converter_setup_max": 147.05187452180567, + "converter_setup_min": 0.014078041315990818, + "converter_setup_max": 80.01958684009182, "sac": { "spimdata": { - "datalocation": "src/test/resources/mri-stack.xml" + "datalocation": "src/test/resources/mri-stack-multilevel.xml" }, "viewsetup": 0 }, @@ -1198,11 +1204,11 @@ "converter_class": "class net.imglib2.display.Instances$Imp", "source_id": 43, "color": -1, - "converter_setup_min": 0.033052792654934965, - "converter_setup_max": 147.05187452180567, + "converter_setup_min": 0.014078041315990818, + "converter_setup_max": 80.01958684009182, "sac": { "spimdata": { - "datalocation": "src/test/resources/mri-stack.xml" + "datalocation": "src/test/resources/mri-stack-multilevel.xml" }, "viewsetup": 0 }, @@ -1214,11 +1220,11 @@ "converter_class": "class net.imglib2.display.Instances$Imp", "source_id": 43, "color": -1, - "converter_setup_min": 0.033052792654934965, - "converter_setup_max": 147.05187452180567, + "converter_setup_min": 0.014078041315990818, + "converter_setup_max": 80.01958684009182, "sac": { "spimdata": { - "datalocation": "src/test/resources/mri-stack.xml" + "datalocation": "src/test/resources/mri-stack-multilevel.xml" }, "viewsetup": 0 }, @@ -1230,11 +1236,11 @@ "converter_class": "class net.imglib2.display.Instances$Imp", "source_id": 43, "color": -1, - "converter_setup_min": 0.033052792654934965, - "converter_setup_max": 147.05187452180567, + "converter_setup_min": 0.014078041315990818, + "converter_setup_max": 80.01958684009182, "sac": { "spimdata": { - "datalocation": "src/test/resources/mri-stack.xml" + "datalocation": "src/test/resources/mri-stack-multilevel.xml" }, "viewsetup": 0 }, @@ -1246,11 +1252,11 @@ "converter_class": "class net.imglib2.display.Instances$Imp", "source_id": 43, "color": -1, - "converter_setup_min": 0.033052792654934965, - "converter_setup_max": 147.05187452180567, + "converter_setup_min": 0.014078041315990818, + "converter_setup_max": 80.01958684009182, "sac": { "spimdata": { - "datalocation": "src/test/resources/mri-stack.xml" + "datalocation": "src/test/resources/mri-stack-multilevel.xml" }, "viewsetup": 0 }, diff --git a/src/test/src/sc/fiji/bdvpg/BigWarp2DTest.java b/src/test/src/sc/fiji/bdvpg/BigWarp2DTest.java index 4e21a1c1..6b969cfb 100644 --- a/src/test/src/sc/fiji/bdvpg/BigWarp2DTest.java +++ b/src/test/src/sc/fiji/bdvpg/BigWarp2DTest.java @@ -31,7 +31,7 @@ import bdv.util.RandomAccessibleIntervalSource; import bdv.viewer.Source; import bigwarp.BigWarp; -import bigwarp.BigWarp.BigWarpData; +import bigwarp.BigWarpData; import bigwarp.BigWarpInit; import ij.IJ; import ij.ImagePlus;