Closed schutyb closed 1 year ago
Hi @schutyb ,
I could not reproduce this behavior, for me this seems to work fine. Below is the Minimal Working Example (MWE) I did to try to reproduce it.
I cloned this repo and created a new environment with:
mamba create -n napari-hsi-env python=3.9
mamba activate napari-hsi-env
mamba install napari pyqt
mamba install napari-clusters-plotter
And then installed the local version of napari-hsi-phasor
.
This yielded an environment with these packages:
After that, from this environment, I ran this code:
import napari
from napari_hsi_phasor._widget import phasor_plot
data_path = r"D:\Datasets\Bruno Schuty\SP_paramesium_561_y_633_R2.lsm"
viewer = napari.Viewer()
viewer.open(data_path, plugin='napari')
widget = phasor_plot()
viewer.window.add_dock_widget(widget, area='right')
napari.run()
After clicking on the 'Run' button, the phasor showed up and I could manually select clusters without errors. The only detail is that I had to slide the slider to the left in order to see the label results. This is because the input data is not in the standardized shape as I did for the napari-flim-phasor-plotter. It may also be related to different napari versions, as there were some changes after 0.4.18. Here is how it looked to me:
Could you check if this example works for you? Or in which context the error shows up.
Thanks @zoccoler for the detailed answer and the MWE, it's working perfectly now. I wan't using a mamba venv and I had some diferent dependencies, maybe that generate the error.
Hi @zoccoler I was getting an error when manualy segment the cluster using napari-cluster-plotter. I created the layer to fill the plotter in the _widget.py file (as in napari-flim-phasor-plotter). Its seems that the data is numpy.float64 and I found that manual_clustering_method(self.ind_mask) from napari-cluster-plotter takes int type. If you can see it let me know if there is a way to change the layer format or if I'm missing something.