Coder Social home page Coder Social logo

patwie / saccade Goto Github PK

View Code? Open in Web Editor NEW
41.0 5.0 1.0 993 KB

A sophisticated scientific image viewer for Linux with OpenGL support and synchronized viewports

License: GNU General Public License v3.0

C++ 79.78% Shell 2.93% CMake 12.71% Python 0.44% Cuda 1.49% Dockerfile 2.66%
cpp11 qt5 image-viewer opengl canvas scientific-visualization hdr-image cpp viewer

saccade's Introduction

Saccade (Sophisticated Image + OpticalFlow Viewer)

Build Status GitHub release

A saccade (/səˈkɑːd/ sə-KAHD) is a quick and simultaneous movement of both eyes in the same direction.

This project is the missing scientific HDR image viewer for Linux. It is OpenGL-based and aims at providing an efficient image viewer with some sophisticated functions for comparing images. When dragging and zooming an image in one viewport, all other viewports synchronously zoom and shift in the same way, so you see exactly the same patch in all images.

Features

  • OpenGL accelerated viewer using mip-mapping data structure
  • synchronize multiple viewports when dragging and zooming within one viewport
  • drag'n drop for open images
  • crop regions from image
  • keyboard short-cuts for all actions
  • set marker on a specific pixel
  • double-click on information in statusbar copies the values into the clipboard
  • filewatcher (images will be reloaded when they change)
  • interactive histogram widget which effects the image
  • supported file formats: png jpg bmp ppm tif CR2 and many more
  • helpful commands to arrange multiple windows
  • multi-threaded loading and writing

Supports the following file formats:

  • image: *.png *.jpg *.jpeg *.bmp *.ppm *.tif *.CR2 *.JPG *.JPEG, *.JPE
  • optical-flow: *.flo

Synchronized view-ports

Hereby, each viewport consists of different image-layers. Some action might affect only the active layer across all viewports (global effects), e.g., zooming and dragging, e.g. setting the crop-region:

When manipulating the histogram, the changes can be applied to only the current active layer or all layers in the current viewport (holding the SHIFT key). Further, a marker can be set precisely on a specific pixel, and all other views share the marker at exactly the same location. It uses the FreeImage library to load images from different types:

Install from binary

The related binaries for the master branch are generated automatically and statically linked to Qt5.9.2 to reduce dependencies and file-size. The pre-compile binaries are available with all dependencies and are tested in a VM with plain Ubuntu 16.04 .

Install from Source

Requirements

The requirements (Ubuntu 16.04) are currently:

  • Qt5.9
  • CMake
  • FreeImage library
  • Google Log
  • Google Flags

I plan to add CUDA for speeding up some functions.

Get dependencies and compile

The dockerfile lists all dependencies for building this project. Or follow the following guide:

Assuming you are on Ubuntu 16.04 getting all dependencies is done by

# install dependencies
sudo apt-get install libfreeimage3 libfreeimage-dev libgflags-dev libgoogle-glog-dev

The Ubuntu-packages contain an old version of Qt5. To get a recent Qt5 version (>=5.9) use the following commands (you might need to register for Qt).

cd /tmp
wget http://download.qt.io/official_releases/qt/5.9/5.9.1/qt-opensource-linux-x64-5.9.1.run
chmod +x qt-opensource-linux-x64-5.9.1.run
./qt-opensource-linux-x64-5.9.1.run

And finally just get and build this repository by

# clone this repo
git clone https://github.com/PatWie/saccade.git
cd saccade
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j4

A copy and paste version to automate the GUI installer is described in the Dockerfile.

To add the saccade application to the unity-launcher, edit the saccade.desktop file by adjust the paths:

edit saccade.desktop
cp saccade.desktop $HOME/.local/share/applications/saccade.desktop

and you find the app icon in the Ubuntu search bar. When debugging the application, it might be helpful to start it with the flag --logtostderr 1 and build it with DCMAKE_BUILD_TYPE=Debug.

Keyboard Shortcuts

These are very likely to changed in the next versions.

General shortcuts

Action Shortcut
quit entire the app Ctrl + Q
version info F1
set all viewports to same size F2
automatically arrange viewports F3
new viewport Ctrl + N

shortcuts for a single viewport (visible layer)

Action Shortcut
quit viewport Ctrl + W
add new image Ctrl + O
save current image Ctrl + S
crop rectangle Crlt + left mouse
toggle crop Ctrl + right click
save current crop Ctrl + X
next image ⇩, ⇨
delete single image Del
previous image ⇧, ⇦
fit window to image Ctrl + F
reset histogram Ctrl + H

shortcuts for local effects (all layers in single viewport)

Action Shortcut
reset histogram (all layers) Ctrl + Shift + H
delete all images Ctrl + Del
change hist. for all layers Shift + mouse (histogram)

shortcuts for global effects (synchronized across all viewports)

Action Shortcut
zoom rectangle Shift + left mouse
zoom in Ctrl + plus
zoom out Ctrl + minus
no zoom Ctrl + 0
fit to window Ctrl + 9
center image Ctrl + C
toggle marker Ctrl + M
toggle marker right click
shift image 10% right Shift + ⇨
shift image 10% left Shift + ⇦
shift image 10% down Shift + ⇩
shift image 10% up Shift + ⇧
next image in all viewports Ctrl + ⇩, Ctrl + ⇨
prev. image in all viewports Ctrl + ⇧, Ctrl + ⇦

saccade's People

Contributors

patwie avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

xjtueducation

saccade's Issues

Add Photoshop like rulers

The current mouse or marker position from the statusbar are helpful, but a displayed ruler like in Photoshop gives the same information in a more clear way.

Reset Canvas when empty

Zooming and position should be default when removing all layers and there are no other connected viewports with layers

Support HDR

This requires:

  • histogram widget with sliders to adjust the range
  • histogram computation within QThread (using CUDA?)
  • testing image formats

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.