From 24ab929d608901024babb41b937e702f7200ae67 Mon Sep 17 00:00:00 2001 From: Stephan Preibisch Date: Wed, 8 May 2024 15:28:48 -0400 Subject: [PATCH] small simplifications for split loaders (this needs more work) --- .../SplitMultiResolutionSetupImgLoader.java | 4 ++-- .../splitting/SplitViewerSetupImgLoader.java | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/splitting/SplitMultiResolutionSetupImgLoader.java b/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/splitting/SplitMultiResolutionSetupImgLoader.java index fe2a3d86..a74cad5a 100644 --- a/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/splitting/SplitMultiResolutionSetupImgLoader.java +++ b/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/splitting/SplitMultiResolutionSetupImgLoader.java @@ -65,13 +65,13 @@ public SplitMultiResolutionSetupImgLoader( final MultiResolutionSetupImgLoader< this.sizes = new Dimensions[ levels ]; this.scaledIntervals = new Interval[ levels ]; this.mipmapResolutions = underlyingSetupImgLoader.getMipmapResolutions(); - this.mipmapTransforms = new AffineTransform3D[ levels ]; + this.mipmapTransforms = underlyingSetupImgLoader.getMipmapTransforms();//new AffineTransform3D[ levels ]; this.isUpdated = new boolean[ levels ]; for ( int l = 0; l < levels; ++l ) this.isUpdated[ l ] = false; - SplitViewerSetupImgLoader.setUpMultiRes( levels, n, interval, mipmapResolutions, mipmapTransforms, sizes, scaledIntervals, underlyingSetupImgLoader.getMipmapTransforms() ); + SplitViewerSetupImgLoader.setUpMultiRes( levels, n, interval, mipmapResolutions, /*mipmapTransforms, */sizes, scaledIntervals/*, underlyingSetupImgLoader.getMipmapTransforms()*/ ); } @Override diff --git a/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/splitting/SplitViewerSetupImgLoader.java b/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/splitting/SplitViewerSetupImgLoader.java index 2641a7a2..138098eb 100644 --- a/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/splitting/SplitViewerSetupImgLoader.java +++ b/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/splitting/SplitViewerSetupImgLoader.java @@ -81,13 +81,13 @@ public SplitViewerSetupImgLoader( final ViewerSetupImgLoader< UnsignedShortType, this.sizes = new Dimensions[ levels ]; this.scaledIntervals = new Interval[ levels ]; this.mipmapResolutions = underlyingSetupImgLoader.getMipmapResolutions(); - this.mipmapTransforms = new AffineTransform3D[ levels ]; + this.mipmapTransforms = underlyingSetupImgLoader.getMipmapTransforms();//new AffineTransform3D[ levels ]; this.isUpdated = new boolean[ levels ]; for ( int l = 0; l < levels; ++l ) this.isUpdated[ l ] = false; - setUpMultiRes( levels, n, interval, mipmapResolutions, mipmapTransforms, sizes, scaledIntervals, underlyingSetupImgLoader.getMipmapTransforms() ); + setUpMultiRes( levels, n, interval, mipmapResolutions, /*mipmapTransforms,*/ sizes, scaledIntervals/*, underlyingSetupImgLoader.getMipmapTransforms()*/ ); } protected static final void setUpMultiRes( @@ -95,10 +95,11 @@ protected static final void setUpMultiRes( final int n, final Interval interval, final double[][] mipmapResolutions, - final AffineTransform3D[] mipmapTransforms, + //final AffineTransform3D[] mipmapTransforms, final Dimensions[] sizes, - final Interval[] scaledIntervals, - final AffineTransform3D[] oldmipmapTransforms ) + final Interval[] scaledIntervals + //final AffineTransform3D[] oldmipmapTransforms + ) { // precompute intervals and new mipmaptransforms (because of rounding of interval borders) for ( int level = 0; level < levels; ++level ) @@ -124,6 +125,7 @@ protected static final void setUpMultiRes( sizes[ level ] = new FinalDimensions( size ); scaledIntervals[ level ] = new FinalInterval( minL, maxL ); + /* final AffineTransform3D mipMapTransform = oldmipmapTransforms[ level ].copy(); // the additional downsampling (performed below) @@ -132,9 +134,12 @@ protected static final void setUpMultiRes( 1.0, 0.0, 0.0, (minL[ 0 ] - min[ 0 ]), 0.0, 1.0, 0.0, (minL[ 1 ] - min[ 1 ]), 0.0, 0.0, 1.0, (minL[ 2 ] - min[ 2 ]) ); - + + System.out.println( additonalTranslation ); + mipMapTransform.concatenate( additonalTranslation ); mipmapTransforms[ level ] = mipMapTransform; + */ } }