File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
main/java/qupath/ext/align/core
test/java/qupath/ext/align/core Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -253,8 +253,11 @@ private static AffineTransform alignWithPoints(
253253 case AFFINE -> opencv_calib3d .estimateAffine2D (baseMat , matToAlign );
254254 case RIGID -> opencv_calib3d .estimateAffinePartial2D (baseMat , matToAlign );
255255 };
256- Indexer indexer = matTransform .createIndexer ()
256+ Indexer indexer = matTransform .ptr () == null ? null : matTransform . createIndexer ()
257257 ) {
258+ if (indexer == null ) {
259+ throw new NullPointerException ("Failed to estimate the transformation." );
260+ }
258261 return matToTransform (indexer , 1.0 );
259262 }
260263 }
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ void Check_Intensity_Auto_Alignment_On_Translated_Image_With_Downsample(AutoAlig
149149 downsample
150150 );
151151
152- assertAffineAlmostEquals (expectedTransform , transform , .2 );
152+ assertAffineAlmostEquals (expectedTransform , transform , .5 );
153153
154154 baseImageData .close ();
155155 baseServer .close ();
You can’t perform that action at this time.
0 commit comments