Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fix #67

Merged
merged 2 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ def get_argument(self, checkboxes):
if checkbox.GetValue():
label = checkbox.GetLabel()
args += option_values[label] + ','
if args == "":
return "-1"

return args[:-1]

def get_command(self):
Expand Down
23 changes: 19 additions & 4 deletions test/gui/test_b0shim_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_st_plugin_b0shim_dyn_lsq_mse():
options = {'optimizer-method': 'Least Squares',
'optimizer-criteria': 'Mean Squared Error',
'slices': 'Auto detect',
'scanner-coil-order': '0',
'scanner-coil-order': 'f0',
'output-file-format-scanner': 'Slicewise per Channel',
'output-file-format-coil': 'Slicewise per Channel',
'fatsat': 'Auto detect',
Expand All @@ -46,6 +46,21 @@ def test_st_plugin_b0shim_dyn_lsq_mae():
def _test_st_plugin_b0shim_dyn(view, overlayList, displayCtx, options=options):
__test_st_plugin_b0shim_dyn(view, overlayList, displayCtx, options=options)
run_with_orthopanel(_test_st_plugin_b0shim_dyn)


def test_st_plugin_b0shim_dyn_lsq_mse_coil_only():
options = {'optimizer-method': 'Least Squares',
'optimizer-criteria': 'Mean Absolute Error',
'slices': 'Auto detect',
'scanner-coil-order': '',
'output-file-format-scanner': 'Slicewise per Channel',
'output-file-format-coil': 'Slicewise per Channel',
'output-value-format': 'delta'
}

def _test_st_plugin_b0shim_dyn(view, overlayList, displayCtx, options=options):
__test_st_plugin_b0shim_dyn(view, overlayList, displayCtx, options=options)
run_with_orthopanel(_test_st_plugin_b0shim_dyn)


def test_st_plugin_b0shim_dyn_pi():
Expand All @@ -60,8 +75,8 @@ def test_st_plugin_b0shim_dyn_pi():
def _test_st_plugin_b0shim_dyn(view, overlayList, displayCtx, options=options):
__test_st_plugin_b0shim_dyn(view, overlayList, displayCtx, options=options)
run_with_orthopanel(_test_st_plugin_b0shim_dyn)


def test_st_plugin_b0shim_dyn_qp():
options = {'optimizer-method': 'Quad Prog',
'optimizer-criteria': 'Mean Squared Error',
Expand Down Expand Up @@ -133,7 +148,7 @@ def __test_st_plugin_b0shim_dyn(view, overlayList, displayCtx, options):
get_all_children(b0shim_tab.sizer_run, list_widgets)
for widget in list_widgets:
if isinstance(widget, wx.CheckBox) and widget.IsShown():
if widget.GetName() == 'check':
if widget.Label in options['scanner-coil-order']:
assert set_checkbox(widget)

# Select the dropdowns that are nested
Expand Down
Loading