Skip to content

Commit

Permalink
Merge pull request #68 from bogovicj/master
Browse files Browse the repository at this point in the history
update to imglib2-realtransform-4.0.1
  • Loading branch information
ctrueden authored May 10, 2023
2 parents 559aadf + 41d1012 commit d84d23c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin,
Jean-Yves Tinevez and Michael Zinsmaier.</license.copyrightOwners>

<imglib2.version>6.1.0</imglib2.version>
<imglib2-realtransform.version>4.0.1</imglib2-realtransform.version>

<!-- NB: Deploy releases to the SciJava Maven repository. -->
<releaseProfiles>sign,deploy-to-scijava</releaseProfiles>
Expand Down
10 changes: 6 additions & 4 deletions src/test/java/net/imglib2/roi/geom/OperatorsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
import net.imglib2.realtransform.AffineTransform;
import net.imglib2.realtransform.AffineTransform2D;
import net.imglib2.realtransform.AffineTransform3D;
import net.imglib2.realtransform.DeformationFieldTransform;
import net.imglib2.realtransform.DisplacementFieldTransform;
import net.imglib2.realtransform.InvertibleRealTransform;
import net.imglib2.realtransform.RealTransform;
import net.imglib2.roi.BoundaryType;
Expand Down Expand Up @@ -77,6 +77,7 @@
import net.imglib2.roi.geom.real.WritableSphere;
import net.imglib2.type.numeric.real.DoubleType;
import net.imglib2.util.ConstantUtils;
import net.imglib2.view.composite.RealComposite;

import java.util.function.BiConsumer;

Expand Down Expand Up @@ -805,9 +806,10 @@ public void testNonInvertibleTransform()
final Ellipsoid e = new OpenWritableEllipsoid( new double[] { 10, -6.5 }, new double[] { 2.5, 4 } );

// A 2d deformation field with identical deformations in x and y
final BiConsumer< RealLocalizable, DoubleType > f = ( p, v ) -> v.set( -10 );
final FunctionRealRandomAccessible< DoubleType > def = new FunctionRealRandomAccessible<>( 2, f, DoubleType::new );
final DeformationFieldTransform< DoubleType > transformToSource = new DeformationFieldTransform<>( def, def );
final FunctionRealRandomAccessible< RealComposite< DoubleType > > def = new FunctionRealRandomAccessible< RealComposite< DoubleType > >( 2,
( p, v ) -> { v.setPosition( -10, 0 ); v.setPosition( -10, 1 ); },
() -> DoubleType.createVector( 2 ) );
final DisplacementFieldTransform transformToSource = new DisplacementFieldTransform( def );
final RealMask rm = e.transform( transformToSource );

// Since the transform is not continuous, the boundary behavior may not
Expand Down

0 comments on commit d84d23c

Please sign in to comment.