Coder Social home page Coder Social logo

fabrylab / clickpoints Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 4.0 85.88 MB

Click Points is a program written in the Python programming language, which serves on the one hand as an image viewer and on the other hand as an data display and annotation tool. Every frame can be annotated by a description, marked points/tracks, or marked areas (paint brush). This helps to view image data, do manual evaluation of data, help to create semi-automatic evaluation or display the results of automatic image evaluation.

Home Page: https://clickpoints.readthedocs.io/

License: GNU General Public License v3.0

Python 97.41% HTML 0.41% Batchfile 0.07% NSIS 2.12%

clickpoints's People

Contributors

alexanderwinterl avatar andreasbauergit avatar christophmark avatar davidbhr avatar delfkah avatar foxsr avatar morefigs avatar rgerum avatar tinacz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

clickpoints's Issues

CP crash on launch

Regression from version 1.9.5

potentially related with file loader changes

Starting CP from cmd line results in repeated error messages:

C:\Users\Fox>clickpoints
args ['C:\ProgramData\Anaconda3\Scripts\clickpoints']
ClickPoints 1.9.6
Using Python 3.7.4 final 64bit
Using PyQt5 5.14.1
LoadConfig ['C:\ProgramData\Anaconda3\Scripts\clickpoints'] False
use custom openslide variant with tifffile
Searching ImageIO Plugins ...
ffmpeg found from imageio
Loading url
Traceback (most recent call last):
File "c:\software\clickpoints\clickpoints\modules\Timeline.py", line 1055, in ImagesAddedMain
self.frameSlider.setRange(0, self.get_frame_count() - 1)
File "c:\software\clickpoints\clickpoints\modules\Timeline.py", line 1043, in get_frame_count
return self.data_file.get_image_count()
AttributeError: 'NoneType' object has no attribute 'get_image_count'
LoadingFinishedEvent <clickpoints.modules.FolderEditor.FolderEditor object at 0x000002A01BF39D38>
Traceback (most recent call last):
File "c:\software\clickpoints\clickpoints\Core.py", line 201, in
self.start_timer = QtCore.QTimer.singleShot(1, lambda: self.loadUrl(config.srcpath))
File "c:\software\clickpoints\clickpoints\Core.py", line 238, in loadUrl
self.data_file = loadUrl(url, self.data_file, window=self, use_natsort=use_natsort, reset=reset, loop=self.app.loop, callback_finished=loadingFinished)
File "c:\software\clickpoints\clickpoints\includes\loader.py", line 152, in loadUrl
callback_finished(data_file)
File "c:\software\clickpoints\clickpoints\Core.py", line 232, in loadingFinished
BroadCastEvent(self.modules, "LoadingFinishedEvent")
File "c:\software\clickpoints\clickpoints\includes\Tools.py", line 80, in BroadCastEvent
getattr(module, function)(*args, **kwargs)
File "c:\software\clickpoints\clickpoints\modules\Timeline.py", line 1077, in LoadingFinishedEvent
if self.data_file.getOption("datetimeline_show"):
AttributeError: 'NoneType' object has no attribute 'getOption'
Traceback (most recent call last):
File "c:\software\clickpoints\clickpoints\Core.py", line 256, in LoadTimer
if self.data_file.image is None and self.data_file.get_image_count() and self.first_frame is not None:
AttributeError: 'NoneType' object has no attribute 'image'
Task exception was never retrieved
future: <Task finished coro=<ClickPointsWindow.load_frame() done, defined at c:\software\clickpoints\clickpoints\Core.py:313> exception=AttributeError("'NoneType' object has no attribute 'get_image_count'")>
Traceback (most recent call last):
File "c:\software\clickpoints\clickpoints\Core.py", line 315, in load_frame
if self.data_file.get_image_count() == 0:
AttributeError: 'NoneType' object has no attribute 'get_image_count'
Traceback (most recent call last):
File "c:\software\clickpoints\clickpoints\Core.py", line 256, in LoadTimer
if self.data_file.image is None and self.data_file.get_image_count() and self.first_frame is not None:
AttributeError: 'NoneType' object has no attribute 'image'
Traceback (most recent call last):
File "c:\software\clickpoints\clickpoints\Core.py", line 256, in LoadTimer
if self.data_file.image is None and self.data_file.get_image_count() and self.first_frame is not None:
AttributeError: 'NoneType' object has no attribute 'image'`

the last error is repeated endlessly

same error for fresh install

import pyTFM plugin fails

On Python 3.10 (Windows 10, miniconda3)

import TFM_addon.TFM_addon
Traceback (most recent call last):
  File "C:\Users\alex\miniconda3\envs\pytfm\lib\site-packages\clickpoints\modules\ScriptLauncher.py", line 420, in add_script
    self.script_launcher.activateScript(self.selected_script)
  File "C:\Users\alex\miniconda3\envs\pytfm\lib\site-packages\clickpoints\modules\ScriptLauncher.py", line 501, in activateScript
    if script.activate(self, silent=silent):
  File "C:\Users\alex\miniconda3\envs\pytfm\lib\site-packages\clickpoints\modules\ScriptLauncher.py", line 230, in activate
    raise err
  File "C:\Users\alex\miniconda3\envs\pytfm\lib\site-packages\clickpoints\modules\ScriptLauncher.py", line 224, in activate
    self.addon_module = import_module(folder + "." + basefilename)
  File "C:\Users\alex\miniconda3\envs\pytfm\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\alex\miniconda3\envs\pytfm\lib\site-packages\pyTFM\TFM_addon\TFM_addon.py", line 4, in <module>
    from pyTFM.TFM_functions_for_clickpoints import *  # must be on top because of some matplotlib backend issues
  File "C:\Users\alex\miniconda3\envs\pytfm\lib\site-packages\pyTFM\TFM_functions_for_clickpoints.py", line 10, in <module>
    from pyTFM.frame_shift_correction import *
  File "C:\Users\alex\miniconda3\envs\pytfm\lib\site-packages\pyTFM\frame_shift_correction.py", line 12, in <module>
    from skimage.feature import register_translation
ImportError: cannot import name 'register_translation' from 'skimage.feature' (C:\Users\alex\miniconda3\envs\pytfm\lib\site-packages\skimage\feature\__init__.py)

Video codecs

It seems that with the default setting (.avi and libx264) going below 10 fps returns a single image instead of the video, which ist not the case when using mp4.

Maybe using the mp4 instead of avi would be more robust ?

If file path to bin where clickpoints is installed has a space, fails to launch

In ClickPoints.bat it reads as follows:

@echo off
C:\Users\MECHANO3BIOLOGY Lab\AppData\Local\Programs\Python\Python311\Scripts\clickpoints.exe %1
IF %ERRORLEVEL% NEQ 0 pause

However since the use portion of the path has a space this fails to execute. Simple fix is to just put double quotes around the path in the bat files as follows:

@echo off
"C:\Users\MECHANO3BIOLOGY Lab\AppData\Local\Programs\Python\Python311\Scripts\clickpoints.exe" %1
IF %ERRORLEVEL% NEQ 0 pause

However, this is only a solution for running ClickPoints.bat directly. This issue means that using command clickpoints register will not run

opening mixed 8bit 16bit images & contrast enhancement module

Random Bug I stumbled across yesterday:

If you open a folder of mixed depth images (e.g. microscope images 16bit + min/maxindex 8bit) by clicking on a 8bit image, displaying the 16bit images will fail:
-> error looking up the bit depth in the LUT -> 20345 out of range 256

If you open the folder by clicking on a 16bit image it works fine (to be confirmed, at least no exception)

Error in `getMask` with `imageio>2.10.3`

I get the following error when calling getMask:

    db_mask = db.getMask(image=db.getImage(frame=0)).data
  File "C:\Anaconda3\envs\research\lib\site-packages\clickpoints\DataFile.py", line 3427, in getMask
    return query[0]
  File "C:\Anaconda3\envs\research\lib\site-packages\peewee.py", line 2008, in __getitem__
    self._cursor_wrapper.fill_cache(index)
  File "C:\Anaconda3\envs\research\lib\site-packages\peewee.py", line 4353, in fill_cache
    iterator.next()
  File "C:\Anaconda3\envs\research\lib\site-packages\peewee.py", line 4408, in next
    self.cursor_wrapper.iterate()
  File "C:\Anaconda3\envs\research\lib\site-packages\peewee.py", line 4328, in iterate
    result = self.process_row(row)
  File "C:\Anaconda3\envs\research\lib\site-packages\peewee.py", line 7650, in process_row
    value = self.converters[idx](value)
  File "C:\Anaconda3\envs\research\lib\site-packages\clickpoints\DataFile.py", line 73, in python_value
    return imageio.imread(stream, format=".bool")
  File "C:\Anaconda3\envs\research\lib\site-packages\imageio\core\functions.py", line 159, in imread
    with imopen(uri, "ri", plugin=format) as file:
  File "C:\Anaconda3\envs\research\lib\site-packages\imageio\core\imopen.py", line 179, in imopen
    raise err_type(err_msg) from err_from
RuntimeError: `.bool` can not handle the given uri.

The error is resolved if I downgrade to imageio==2.10.3. This might be related to this issue, although it should already be resolved in the newest version: imageio/imageio#703

Config file import doesn't work in 1.9.7

With version 1.9.7 I can neither use exported clickpoints config files that are stored in a top level directory nor import config files with Options -> Import. The latter case gives the error: FileNotFoundError: [Errno 2] No such file or directory: ''

Worked in 1.9.3

Kymograph

The kymograph seems to be mirrored

Autocontrast on 14bit Images

Activating auto contrast mode does not have any effect on 14bit tiff images.
The histogram display in the contrast tool does not seem to work for non 8bit images.

Furthermore, could we add a percentile based auto contrast button, in addition to update / reset button (with cfg setting for the percentile values) ?

A65_testimage.zip

Video timestep option

For generating videos: Would be nice to have an option to set the timestep between single images which then displays the corresponding time in the video :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.