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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a28d422
 
 
 
 
 
 
40d081b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a28d422
 
 
 
 
 
 
40d081b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a28d422
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
# Basic Napari Function Tests - Action Level
# These tests evaluate individual server functions with simple, single-function calls
# Each test focuses on testing one specific function with appropriate parameters
# We suggest using https://www.ebi.ac.uk/bioimage-archive/galleries/S-BIAD7.html IM1 as dataset_001
# We suggest using https://uk1s3.embassy.ebi.ac.uk/bia-integrator-data/pages/S-BIAD573.html IM1 as dataset_002
#
# Taxonomy Level: Task (small-scale visualization task involving a few operations)
# Each task is marked with a comment indicating the end of the task and the task name

# ============================================================
# TASK 1: Napari - Load & Layer Management
# ============================================================

# Test: open_file - Load a multi-dimensional image file (T, Z, Y, X, C)
- vars:
    question: |
      Load the file "data/dataset_001/dataset_001.tiff" into the viewer.
      Respond with <1> if the file was successfully loaded, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: delete layers - Delete all loaded layers from the viewer
- vars:
    question: |
      Delete the all currently loaded layers.
      Respond with <1> if all layers were successfully deleted, or <0> if the operation failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true
    
# Test: open_file - Load a single image file
- vars:
    question: |
      Load the file "data/dataset_002/dataset_002.tif" into the viewer.
      Respond with <1> if the file was successfully loaded, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: list_layers - Get information about loaded layers
- vars:
    question: |
      Retrieve information about all currently loaded layers in the viewer.
      Respond with <1> if you successfully retrieved layer information, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# END OF TASK 1: Napari - Load & Layer Management
# Operations: Load multi-dimensional file, delete layers, load single image file, retrieve layer information

# ============================================================
# TASK 2: Napari - 3D/4D Navigation
# ============================================================

# Test: Z-stack Navigation - Scroll through different depths
- vars:
    question: |
      Navigate through the z-stack of the loaded image. Use set_z_slice to jump to at least z-slice 0 to examine structures at different depths. 
      Take a screenshot at each z-slice to verify navigation. 
      Respond with <1> if you successfully navigated through different z-slices and could see structural changes, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true


# Test: Time Series Navigation - Navigate through time points
- vars:
    question: |
      If the data has time dimensions, use set_timestep to navigate through different time points.
      Take screenshots at different time points to show temporal changes.
      If no time dimension exists, simulate time navigation by adjusting the current view and taking multiple screenshots.
      Respond with <1> if you successfully navigated through time points or simulated time navigation, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# END OF TASK 2: Napari - 3D/4D Navigation
# Operations: Z-stack navigation, time series navigation

# ============================================================
# TASK 3: Napari - Color & Opacity
# ============================================================

# Test: set_colormap - Change layer colormap
- vars:
    question: |
      Change the colormap of the active image layer (dataset_002_ch1) to 'viridis'.
      Respond with <1> if the colormap was successfully changed, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: set_opacity - Adjust layer transparency
- vars:
    question: |
      Set the opacity of the active layer (dataset_002_ch1) to 0.5 (50% transparent).
      Respond with <1> if the opacity was successfully changed, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: set_blending - Change layer blending mode
- vars:
    question: |
      Change the blending mode of the active layer to 'additive'.
      Respond with <1> if the blending mode was successfully changed, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# END OF TASK 3: Napari - Color & Opacity
# Operations: Set colormap, adjust opacity, change blending mode

# ============================================================
# TASK 4: Napari - Contrast Adjustment
# ============================================================

# Test: auto_contrast - Auto-adjust contrast
- vars:
    question: |
      Automatically adjust the contrast of the active image layer.
      Respond with <1> if the contrast was successfully auto-adjusted, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: set_contrast_limits - Set specific contrast limits
- vars:
    question: |
      Set the contrast limits of the active layer to min=0.1 and max=0.9.
      Respond with <1> if the contrast limits were successfully set, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: set_gamma - Adjust gamma correction
- vars:
    question: |
      Set the gamma correction of the active layer to 1.5.
      Respond with <1> if the gamma was successfully adjusted, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: set_interpolation - Change interpolation mode - doesn't work
- vars:
    question: |
      Change the interpolation mode of the active layer to 'linear'.
      Respond with <1> if the interpolation mode was successfully changed, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# END OF TASK 4: Napari - Contrast Adjustment
# Operations: Auto-adjust contrast, set specific contrast limits, adjust gamma correction, change interpolation mode

# ============================================================
# TASK 5: Napari - Camera Control
# ============================================================

# Test: toggle_view - Switch between 2D and 3D view
- vars:
    question: |
      Switch the viewer to 3D mode.
      Respond with <1> if the view was successfully switched to 3D, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: get_dims_info - Get dimension information
- vars:
    question: |
      Get information about the viewer's current dimension settings.
      Respond with <1> if you successfully retrieved dimension information, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: get_camera - Get current camera settings
- vars:
    question: |
      Retrieve the current camera settings of the viewer.
      Respond with <1> if you successfully retrieved camera settings, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: reset_camera - Reset camera to default view
- vars:
    question: |
      Reset the camera to the default view.
      Respond with <1> if the camera was successfully reset, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: set_camera - Adjust camera settings
- vars:
    question: |
      Set the camera zoom to 2.0.
      Respond with <1> if the camera zoom was successfully set, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# END OF TASK 5: Napari - Camera Control
# Operations: Switch 2D/3D view, get dimension info, get camera settings, reset camera, adjust camera zoom

# ============================================================
# TASK 6: Napari - Visibility & Screenshot
# ============================================================

# Test: set_layer_visibility - Toggle layer visibility
- vars:
    question: |
      Hide the active layer (set visible to false).
      Respond with <1> if the layer visibility was successfully changed, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: set_layer_visibility - Show layer again
- vars:
    question: |
      Show the active layer again (set visible to true).
      Respond with <1> if the layer visibility was successfully changed, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: screenshot - Take a screenshot
- vars:
    question: |
      Take a screenshot of the current view.
      Respond with <1> if the screenshot was successfully taken, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# END OF TASK 6: Napari - Visibility & Screenshot
# Operations: Hide layer, show layer, take screenshot

# ============================================================
# TASK 7: Napari - Annotations
# ============================================================

# # Test: get_layer_statistics - Get layer statistics
# - vars:
#     question: |
#       Retrieve basic statistics (min, max, mean, std) for the active layer.
#       Respond with <1> if you successfully retrieved layer statistics, or <0> if it failed. Only respond with <1> or <0>.
#   assert:
#     - type: contains-all
#       value: "<1>"
#     - type: not-contains
#       value: "<0>"
#   options:
#     cache: false
#     runSerially: true

# # Test: add_points - Add point annotations - doesn't work
# - vars:
#     question: |
#       Add two point markers at coordinates [[100, 100], [200, 200]] with the name "test_points".
#       Respond with <1> if the points were successfully added, or <0> if it failed. Only respond with <1> or <0>.
#   assert:
#     - type: contains-all
#       value: "<1>"
#     - type: not-contains
#       value: "<0>"
#   options:
#     cache: false
#     runSerially: true

# Test: add_shapes - Add shape annotations
- vars:
    question: |
      Add a rectangle shape with coordinates [[[50, 50], [150, 50], [150, 150], [50, 150]]] and name "test_rectangle".
      Respond with <1> if the shape was successfully added, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# END OF TASK 7: Napari - Annotations
# Operations: Add shape annotations

# ============================================================
# TASK 8: Napari - Scale Bar & Export
# ============================================================

# # Test: measure_distance - Measure distance between points - doesn't work 
# - vars:
#     question: |
#       Measure the distance between point [100, 100] and point [200, 200].
#       Respond with <1> if the distance was successfully measured, or <0> if it failed. Only respond with <1> or <0>.
#   assert:
#     - type: contains-all
#       value: "<1>"
#     - type: not-contains
#       value: "<0>"
#   options:
#     cache: false
#    runSerially: true

# Test: set_scale_bar - Show scale bar
- vars:
    question: |
      Show the scale bar with unit 'um'.
      Respond with <1> if the scale bar was successfully shown, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# # Test: set_axis_labels - Set axis labels - doesn't work
# - vars:
#     question: |
#       Set axis labels to ['y', 'x'] for the 2D data.
#       Respond with <1> if the axis labels were successfully set, or <0> if it failed. Only respond with <1> or <0>.
#   assert:
#     - type: contains-all
#       value: "<1>"
#     - type: not-contains
#       value: "<0>"
#   options:
#     cache: false
#     runSerially: true

# Test: screenshot - Save screenshot to file
- vars:
    question: |
      Save a screenshot.
      Respond with <1> if the screenshot was successfully exported, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# END OF TASK 8: Napari - Scale Bar & Export
# Operations: Show scale bar with units, save screenshot to file

# ============================================================
# TASK 9: Napari - Export & Cleanup
# ============================================================

# Test: save_layers - Save layer to file
- vars:
    question: |
      Save the active layer to the file "test_layer.tif".
      Respond with <1> if the layer was successfully saved, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: remove_layer - Remove a layer
- vars:
    question: |
      Remove the layer named "test_rectangle".
      Respond with <1> if the layer was successfully removed, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# END OF TASK 9: Napari - Export & Cleanup
# Operations: Save layer to file, remove layer

# ============================================================
# TASK 10: Napari - Error Handling
# ============================================================

# Test: Error handling - Try to load non-existent file
- vars:
    question: |
      Try to load the non-existent file "nonexistent.tif" and handle the error gracefully.
      Respond with <1> if the error was handled gracefully (no crash), or <0> if it crashed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: Error handling - Try to remove non-existent layer
- vars:
    question: |
      Try to remove a layer that doesn't exist named "nonexistent_layer" and handle the error gracefully.
      Respond with <1> if the error was handled gracefully (no crash), or <0> if it crashed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# END OF TASK 10: Napari - Error Handling
# Operations: Handle non-existent file, handle non-existent layer removal

# ============================================================
# TASK 11: Napari - 3D Rendering
# ============================================================

# Test: 3D View and Iso-surface Rendering
- vars:
    question: |
      Enable iso-surface rendering for the loaded layer.
      Take a screenshot to verify the 3D iso-surface rendering.
      Respond with <1> if the 3D iso-surface rendering was successfully set up, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# Test: Cleanup - Remove remaining test layers
- vars:
    question: |
      Remove the layer named "test_rectangle" to clean up test annotations.
      Respond with <1> if the layer was successfully removed, or <0> if it failed. Only respond with <1> or <0>.
  assert:
    - type: contains-all
      value: "<1>"
    - type: not-contains
      value: "<0>"
  options:
    cache: false
    runSerially: true

# END OF TASK 11: Napari - 3D Rendering
# Operations: Enable iso-surface rendering in 3D, remove test layers for cleanup