When a 3D timelapse data is loaded into napari, and some operations are applied with the Assistant, and the 'Generate Code -> Export Jupyter Notebook with Napari' is used, the newly generated notebook throws errors because it tries to apply the functions to a 4D image.
Then, apply voronoi-otsu-labeling and click on 'Generate Code -> Export Jupyter Notebook with Napari'.
The new notebook will throw an error for cle.voronoi_otsu_labeling.
Versions
python 3.9
napari 0.4.17
napari-assistant 0.4.4
Possible solution
An option could be to store the current_timepoint when generating code and feeding the functions with image[current_timepoint]. Also, commenting that a for loop should be used to have the results for all timepoints would be a good hint.
Hi everyone,
When a 3D timelapse data is loaded into napari, and some operations are applied with the Assistant, and the 'Generate Code -> Export Jupyter Notebook with Napari' is used, the newly generated notebook throws errors because it tries to apply the functions to a 4D image.
Minimal Working Example
Then, apply voronoi-otsu-labeling and click on 'Generate Code -> Export Jupyter Notebook with Napari'. The new notebook will throw an error for
cle.voronoi_otsu_labeling
.Versions
Possible solution
An option could be to store the
current_timepoint
when generating code and feeding the functions withimage[current_timepoint]
. Also, commenting that a for loop should be used to have the results for all timepoints would be a good hint.