Skip to content

Commit

Permalink
fix: behavior of modifySpatialTransform
Browse files Browse the repository at this point in the history
* passed parameters should be applied after "current" transform
  • Loading branch information
bogovicj committed Apr 12, 2024
1 parent 7b31f0d commit 4049873
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ public N5CosemMetadata modifySpatialTransform(final String newPath, final Affine
final int tformN = relativeTransformation.numDimensions();

final AffineTransform newTransform = new AffineTransform( nd );
newTransform.preConcatenate(relativeTransformation);
newTransform.preConcatenate(spatialTransform());
newTransform.preConcatenate(relativeTransformation);

final double[] newScale = new double[nd];
final double[] newTranslation = new double[nd];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ else if (nd == 2)
transform = relativeTransformation;

final AffineTransform3D newTransform = new AffineTransform3D();
newTransform.preConcatenate(transform);
newTransform.preConcatenate(spatialTransform());
newTransform.preConcatenate(transform);


final double[] newScale = new double[nd];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ public NgffSingleScaleAxesMetadata modifySpatialTransform(final String newPath,

final int nd = this.axes.length;
final AffineTransform newTransform = new AffineTransform(nd);
newTransform.preConcatenate(relativeTransformation);
newTransform.preConcatenate(spatialTransform());
newTransform.preConcatenate(relativeTransformation);

final double[] newScale = new double[nd];
final double[] newTranslation = new double[nd];
Expand Down

0 comments on commit 4049873

Please sign in to comment.