Skip to content

Commit a35eed2

Browse files
committed
test:run default parameter cp3
1 parent 6d73cc0 commit a35eed2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/test/java/fiji/plugin/appose/cellpose/TestCellPoseAppose.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import ij.ImagePlus;
1616
import ij.WindowManager;
1717
import ij.gui.NewImage;
18+
import ij.process.ImageStatistics;
1819

1920
import 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
{

0 commit comments

Comments
 (0)