kasasxav / napari-sim-lattice

Reconstruction of structured illumination microscopy (SIM) images using 2D grid patterns and the classical algorithm from Mats Gustaffson et al.
MIT License
4 stars 0 forks source link

how to install it on the napari platform? #1

Open cindy12-gao opened 10 months ago

cindy12-gao commented 10 months ago

Hi~may its a simple question, but I still want to ask how to install it by the napari? I counldnt find the plugins on the napari hub website but i can find another plugin napari-file-watcher on it. so how to use the function via the napari interface and how to install it? thank you

cindy12-gao commented 10 months ago

hi~ I have installed it successfully, but the parameters of reconstruction doesn`t have annotation. Could you please explain it? hope for your answer~

11111
wow-cat commented 9 months ago

Have you solved this problem? I do not know how to run the code either

kasasxav commented 9 months ago

Hey,

So sorry @cindy12-gao for taking some time to answer, did you figure it out?

This software is for reconstructing SIM data that has been taken with a 2D lattice pattern (vertical and horizontal lines superimposed), and as it is done now we move the sample across the patterns in order to take the sequence of images. Is that the case for you too? Otherwise you would have to slightly change the code, the function "align_data" shouldn't be there.

Then the parameters: pixel_size is the pixel size of the camera in nanometers periodicity is then the period of the sinusoidal pattern (both horizontal and vertical) na is the numerical apperture of your objective wvl is the wavelength of illumination (this and the na is to generate the OTF of the microscope). pad px is in case you want to pad your images by adding zeros in the borders, and this number relates to how many zeros you add (you can leave it 0) w is the regularization factor (SIM reconstruction with Wiener filter). rad is the value for the apodization

cd and t are some extra factors to sligthly change the result in the frequency space but not significant, I always leave them to 1 (actually I wanted to remove them at some point). These I multiply in the denominator of the final formula.

Offset is not used for anything anymore, so I will remove it. Sorry this is a code I did for my PhD and since people didn't use it I didn't improve it. I think you probably should look at the code and try to adapt it to your application :)

kasasxav commented 9 months ago

You can install it by going in the folder and running "pip install -e ." and then run napari, the plugin will be installed then. @wow-cat

cindy12-gao commented 9 months ago

Yeah, we're using data from the same principle of SIM, and we use zeiss elyra 7 to image. I`ll try the parameter later, thank you for your reply.

wow-cat commented 9 months ago

Thanks for your information. I have successfully installed this plugin. @kasasxav

kasasxav commented 9 months ago

I'm not sure it will work with the elyra data. We both call it lattice SIM but the data I use is with a sinosoidal pattern in two dimensions, and they seem to use an array of spots. You can try though and otherwise adjust it. This reconstruction here I'm doing is the classic SIM one with Wiener filtering but applied to 2D patterns using translation, instead of 1D and using rotation.

I don't know what algorithm Zeiss uses.