Skip to content

Commit

Permalink
fix: Apply_BigWarp_Xfm groovy script and ApplyBigWarpPluging
Browse files Browse the repository at this point in the history
* wrap loaded Sources with WarpedSource
  • Loading branch information
bogovicj committed Sep 11, 2024
1 parent babb44c commit bf674fb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
15 changes: 10 additions & 5 deletions scripts/Apply_Bigwarp_Xfm.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import java.io.File;
import java.io.IOException;
import bdv.ij.ApplyBigwarpPlugin;
import bdv.viewer.Interpolation;
import bigwarp.BigWarpInit;
import bigwarp.landmarks.LandmarkTableModel;
import net.imglib2.realtransform.BoundingBoxEstimation;
import ij.IJ;
Expand Down Expand Up @@ -40,10 +41,14 @@ if( interpType.equals( "Nearest Neighbor" ))
bboxEst = new BoundingBoxEstimation();

emptyWriteOpts = new ApplyBigwarpPlugin.WriteDestinationOptions( "", "", null, null );
warpedIpList = ApplyBigwarpPlugin.apply(
movingIp, targetIp, ltm, transformType,
"Target", "", bboxEst, "Target",
null, null, null,
interp, isVirtual, nThreads, true, emptyWriteOpts );

bwData = BigWarpInit.createBigWarpDataFromImages(movingIp, targetIp);
bwData.wrapMovingSources();
bboxEst = new BoundingBoxEstimation(BoundingBoxEstimation.Method.CORNERS);

warpedIpList = ApplyBigwarpPlugin.apply(
bwData, ltm, transformType, "Target", "", bboxEst,
"Target", null, null, null,
interp, isVirtual, nThreads, true, emptyWriteOpts);

warpedIpList.get(0).show();
1 change: 1 addition & 0 deletions src/main/java/bdv/ij/ApplyBigwarpPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,7 @@ public static List<ImagePlus> apply(
final WriteDestinationOptions writeOpts) {

final BigWarpData<?> bwData = BigWarpInit.createBigWarpDataFromImages(movingIp, targetIp);
bwData.wrapMovingSources();
return apply(bwData, landmarks, tranformTypeOption, fieldOfViewOption, fieldOfViewPointFilter, bboxEst,
resolutionOption, resolutionSpec, fovSpec, offsetSpec,
interp, isVirtual, nThreads, wait, writeOpts);
Expand Down

0 comments on commit bf674fb

Please sign in to comment.