flika-org / flika

An interactive image processing program for biologists written in Python.
http://flika-org.github.io/
MIT License
22 stars 1 forks source link

Problem with the functions (eg. Subtract/ Ratio) #61

Closed kousikkun closed 7 months ago

kousikkun commented 7 months ago

I am unable to use the the basic functions for some reason on Ipython. - I already did "from flika import *" . Its giving 'ratio' 'subtract' as undefined. I am not sure if I am missing something. Thanks!

kyleellefsen commented 7 months ago

Hi @kousikkun, if you launch from within IPython, you need to also run import flika and then use the long name of the function. For subtract and ratio, these are flika.process.subtract and flika.process.ratio. The short names only work if you launch flika from a non-IPython terminal and you open the Script Editor. If you'd still like to use the shortened names, you can run in IPython:

from flika.process import *
generate_random_image()
gaussian_blur(sigma=2)

For instance, I followed these steps and was able to use ratio().

kousikkun commented 7 months ago

Hello! Thanks it works fine.

Best,

Kousik