Giter Club home page Giter Club logo

imquick's Introduction

ImQuick

A lightweight scientific image viewer written in Python.

Version


There are several amazing image viewing and editing appliations geared towards the scientific community. However, many of these packages suffer from slow startup times and a lack of integration into the system shell. For researchers it can be frustrating to have to launch these very feature-rich applications just to view a file or determine signal strength. Windows includes it's own image previewer, but this lacks some key features which are helpful to visualise and understand raw scientific data.

ImQuick has therefore been designed as a lightweight viewer with some of those useful tools built-in. Viewing an image needs to be fast and painless. The priorities for this project are therefore in startup speed, OS integration and minimal dependencies/bulk. To that end ImQuick is explicitly not an image editor, consider it as a viewer only.

Installation

Run the setup.exe file from the releases page. Only Windows is currently supported (sorry!).

Key Features

image

When installed, image files can be loaded into the viewer using the 'ImQuick' option added to the right-click context menu for image files. You can also drag images onto an existing ImQuick window, or set the program as the default viewer if you like. The UI also has buttons for cycling through images in a directory.

Pan/Zoom can be performed with the mouse and mousewheel, or the dedicated icons. You'll also find icons to view the image at actual size, and to fit the current image to the window.

Contrast adjustment can be performed by opening the contrast dialog using the dedicated button. The sliders in this window set the minimum and maximum intensity to display. The main window also features an 'auto contrast' button to automatically set these scales based on data present in the image itself.

Hovering over a pixel on the image will display it's x/y coordinate and intensity value in the top right corner. Colour images will display intensity in R-G-B or R-G-B-A order.

Format support

This is a tricky area. ImQuick currently supports most common image formats (e.g. .tif, .png, .jpeg). The bioimaging space is somewhat overrun with proprietary formats to the point that supporting them all in a lightweight package may be very difficult. If support for a format would be particularly valuable please do raise an issue requesting it.

Right now ImQuick can open 2D images, 3D Z-stacks and time series. Faster loading of some compressed formats is also an area being pursued.

Setup from source

These instructions are specific to Windows. Without access to a Mac building for that OS is difficult, but if you're interested in helping out please do get in touch.

First off, git clone this repository. You'll want Python 3.8+ installed and possibly a virtual env. Once that's set up, copy files from the latest tkdnd build into a tkdnd directory in the ImQuick root. This is an extension which adds drag and drop support to the Tkinter GUI toolkit.

To make matters more complicated, you'll also need the tkinterdnd Python wrapper module from here. It's not available on PyPi, so you'll need to copy this into the site-packages folder of your environment to install manually.

With that done, pip install -e . in the repository directory should install all the other dependencies. You can run ImQuick.py to start.

Packaging

ImQuick is currently packaged for Windows using Nuitka and Inno Setup.

Use the following command from the main directory:

python -m nuitka --mingw64 --standalone --plugin-enable=tk-inter --plugin-enable=numpy --include-data-file=resources/*=resources/ --include-data-file=tkdnd/*=tkdnd/ --windows-icon-from-ico=resources\ImQuick.ico --windows-disable-console --python-flag=no_site ImQuick.py 

The tkdnd data parameter may need to be pointed to your python\tcl folder, or you can place a copy of tkdnd in the main folder to ease packaging.

This will generate the required files in \ImQuick.dist. Execute imquick.iss using Inno Setup to pack the .exe into an installer.

imquick's People

Contributors

davidstirling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rmd13

imquick's Issues

Linux support

What is preventing this from running on Linux?

I've tried this on ubuntu:

sudo apt install tkdnd
pip install imageio tkinterdnd2

I changed import TkinterDnD2 as tkDnD to import tkinterdnd2 as tkDnD (not sure why the case is different)

I had to comment out self.iconbitmap(resource_directory(ICON_FILE)) (not sure why but it gave the error

  File "./imquick.py", line 861, in <module>
    app = ImQuick(root, file_in)
  File "./imquick.py", line 56, in __init__
    self.iconbitmap(resource_directory(ICON_FILE))
  File "/usr/lib/python3.8/tkinter/__init__.py", line 2080, in wm_iconbitmap
    return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
_tkinter.TclError: bitmap "resources/ImQuick.ico" not defined

even though that file definitely exists).

After that it seems to work ok.

Standard setting of interpolation method

Hej,

When I open my images it standard uses the nearest interpolation method, which gives me a grained image. When I use one of the other methods, my images look better. However, I need to do this every time I open an image. I was wondering if there is a way for the program to remember another interpolation method?

Cheers,
Maarten

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.