File tree Expand file tree Collapse file tree
src/test/java/fiji/plugin/appose/cellpose Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515import ij .ImagePlus ;
1616import ij .WindowManager ;
1717import ij .gui .NewImage ;
18+ import ij .process .ImageStatistics ;
1819
1920import static org .junit .jupiter .api .Assertions .*;
2021
@@ -100,6 +101,10 @@ public void defaultRunCP3() throws Exception
100101 final ImagePlus [] outputCP3 = Cellpose .cellpose3 ( imp , paramsCP3 );
101102 // Get the label image results
102103 final ImagePlus labelsCP3 = outputCP3 [ 0 ];
104+ // Check the image statistics if it looks like a successfull run
105+ ImageStatistics stats = labelsCP3 .getStatistics ();
106+ assertFalse ( stats .max <= 0 , "CP3: No labels were found in blob image, with default parameters" );
107+ assertTrue ( stats .max > 50 , "CP3: Not enough labels were found in blob image, with default parameters" );
103108 }
104109 catch (Exception e )
105110 {
You can’t perform that action at this time.
0 commit comments