Giter Site home page Giter Site logo

tiffutil's Introduction

TIFF Utils

Build Status codecov

A collection of useful scripts for handling .tif stacks.

Installation

The scripts are designed to be installed with setup.py. Detailed instructions can be found in the official documentation. To quickly install from the source, run:

pip3 install --user git+https://github.com/kwohlfahrt/tiffutil.git

Add the --upgrade flag to update to the latest version. Plotting support must be explicitly enabled, as this requires matplotlib:

pip3 install --user git+https://github.com/kwohlfahrt/tiffutil.git[plot]

Dependencies

Python 3, Numpy and tifffile. All are available from PyPI and can be installed as described in the pip documentation.

Usage

The entry point tiffutil is installed. This should be followed by the command to be used, e.g. crop, unstack, smooth or project. For further details, consult the help provided for each command (e.g. tiffutil project --help).

Some examples are shown below.

Unstack

This command unstacks TIFF files where multiple channels are interleaved. For example:

tiffutil unstack stack.tif DAPI.tif CENPA.tif

splits the file stack.tif into DAPI.tif and CENPA.tif, with even-numbered (starting at 0) frames in DAPI.tif and odd-numbered frames in CENPA.tif. Any number of output images is permitted.

Project

This command projects multiple TIFF images into a single frame, optionally with a running-median filter. Custom start and end frames are also possible. It only loads the frames currently being processed, so is useful in memory-constrained situations. For example:

tiffutil project --projection max --end 4000 in001.tif in002.tif out.tif

projects the first 4000 frames of a video (split over two files) into out.tif using a maximum intensity projection.

Smooth

The smooth function runs a rolling-ball smoothing pass over each image in a stack of images. The smoothed image approximates the background. Pass the --correct option to subtract the background instead of extracting it.

tiffutil smooth --radius 2.0 in001.tif in002.tif out.tif

Note: 3D (or nD) smoothing would be straightforward to add, please file a bug if this is a feature you would like.

tiffutil's People

Watchers

James Cloos avatar Kai Wohlfahrt avatar  avatar

Forkers

thelauelab

tiffutil's Issues

bad installation. need help.

sorry. I don't have too much idea of manjaro arm ( I am used to debian distros) and pip and pip3 works horrible on arm. I assume because there is no platform packages, because whenever Ive tried it on the past I dont have another choice than go back installing the python libs from the repo.
whatever. the problem its the next, I finish installing this project with python install setup.py but...

when Ive try to execute it:


[pilab@pilab ~]$ tiffutil
Traceback (most recent call last):
  File "/usr/bin/tiffutil", line 11, in <module>
    load_entry_point('tiffutil==0.1.2', 'console_scripts', 'tiffutil')()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/lib/python3.7/site-packages/tiffutil-0.1.2-py3.7.egg/tiffutil/main.py", line 15, in <module>
  File "/usr/lib/python3.7/importlib/__init__.py", line 122, in import_module
    raise TypeError(msg.format(name))
TypeError: the 'package' argument is required to perform a relative import for '.project'
[pilab@pilab ~]$

I've couldn't find this python module on the repo like other python modules.
weird, there is not much reference and I need to pack a program with electron-build

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.