File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Tests for the imcflibs.imagej.processing module."""
22
3- from imcflibs .imagej .processing import rolling_ball_options
3+ from imcflibs .imagej .processing import (
4+ filter_options ,
5+ rolling_ball_options ,
6+ threshold_options ,
7+ )
48
59
610def test_rolling_ball_options ():
711 """Test the rolling_ball_options function."""
12+
813 options = rolling_ball_options (42.23 )
914 assert options == "rolling=42.23"
15+
16+
17+ def test_rolling_ball_options_with_flags ():
18+ """Test `rolling_ball_options()` string concatenation with all flags."""
19+
20+ options = rolling_ball_options (
21+ 12 ,
22+ light_background = True ,
23+ sliding = True ,
24+ disable = True ,
25+ do_3d = True ,
26+ )
27+ assert options == "rolling=12 light sliding disable stack"
28+
29+
30+ def test_filter_options ():
31+ """Test `filter_options()` string concatenation."""
32+
33+ command , options = filter_options ("Mean" , 5 , do_3d = True )
34+ assert command == "Mean 3D..."
35+ assert options == "radius=5 stack"
36+
37+
38+ def test_threshold_options ():
39+ """Test `threshold_options()` string concatenation."""
40+
41+ auto_threshold , convert_to_binary = threshold_options ("Otsu" , do_3d = True )
42+ assert auto_threshold == "Otsu dark stack"
43+ assert convert_to_binary == "method=Otsu background=Dark black"
You can’t perform that action at this time.
0 commit comments