Giter Club home page Giter Club logo

scifio-imageio's Introduction

developer chat

SCIFIO (SCientific Image Format Input & Output) is an extensible Java framework for reading and writing images, particularly N-dimensional scientific images.

This core package supports parsing pixels and metadata for a collection of open formats. Additional formats can be supported simply by downloading SCIFIO plugins and including them in your project.

Purpose

SCIFIO's primary purpose is to provide a clear convention for supporting image input and output. By lowering the barrier for adding new image formats, all SCIFIO-backed software will grow more versatile and powerful.

Supported formats

The SCIFIO core includes support for:

  • APNG
  • AVI
  • BMP
  • DICOM
  • EPS
  • FITS
  • GIF
  • ICS
  • JPEG
  • JPEG2000
  • MNG
  • Micro-Manager
  • NRRD
  • PCX
  • PGM
  • QuickTime
  • TIFF
  • Zipped images

Additionally, Bio-Formats is available as a SCIFIO plugin for supporting more than a hundred additional proprietary formats.

For users

ImageJ2 and Fiji use SCIFIO for image I/O.

For developers

Several software libraries use SCIFIO for image I/O:

  • SCIFIO has built-in support for opening and saving ImgLib2 data structures (see the io.scif.img package).
  • We have updated Bio-Formats to also support SCIFIO plugins, backwards compatibly with existing code.
  • ITK has an ImageIO module for reading and writing images using SCIFIO.

Developer documentation:

More information

For more information, see the SCIFIO FAQ and SCIFIO web site.

Getting help

SCIFIO uses the Image.sc Forum for support. Start a new topic tagged with scifio.

Contributing to SCIFIO

SCIFIO is an open project and anyone is very welcome to submit pull requests to the SCIFIO repository.

With SCIFIO's focus on extensibility, you typically will not need to make upstream changes to get your formats into users' hands. However, if you are interested in submitting a pull request, that's great! All we ask is that you check:

mvn clean test

from the top level.

If you're adding a new feature, it would be fantastic if you could write a unit test for it! Simply base it on JUnit to have it run by the SCIFIO test suite.

scifio-imageio's People

Contributors

blowekamp avatar brianhelba avatar codeling avatar ctrueden avatar dzenanz avatar fbudin69500 avatar glehmann avatar hflynn avatar hinerm avatar hjmjohnson avatar imichka avatar jcfr avatar mabruce avatar melissalinkert avatar mseng10 avatar sbesson avatar tbirdso avatar thewtex avatar xiaoxiaoliu avatar zachary-williamson avatar

Stargazers

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

Watchers

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

scifio-imageio's Issues

Document ImageIO Usage

Generalize ImageIO

There's no reason this has to be ITK specific. We should create a general C++ SCIFIO API that pipes to a JVM, which can then be consumed by the ITK imageIO.

SCIFIOTestDriver fails to process converted OME-TIFFs

Reported on ome-users by Michael Meuli:

I've converted my .lif file with

./bfconvert /path/to/wt-dead-A.lif output_series_%s.ome.tiff

and it produces the expected files (20 multi-channel-z-stacks), which I can open with Fiji. The problem is that

./SCIFIOTestDriver itkSCIFIOImageIOTest \
    /path/to/output_series_0.ome.tiff /path/to/scifiotest.ome.tiff

(and my little program) throws an exception. Whereas multi-channel-z-series.ome.tif works.

I guess the problem is the dimension order which seems not to be XYZCT as with multi-channel-z-series.ome.tif, but something like XYCZT.

Spacing image information in TIFF and PNG format

It seems that the image spacing information is not saved when using SCIFIO to save these formats.
I have written a small reader and writer that use SCIFIO, for test purposes:
https://github.com/fbudin69500/scifio-spacing-test

When using the default PNG and TIFF writers, the spacing information is saved in the image.
Is this a known issue? I looked in the bioformat library and I had the impression that the spacing was not handled [1] [2].

[1] https://github.com/openmicroscopy/bioformats/blob/v5.0.0/docs/sphinx/formats/png-metadata.txt
[2] https://github.com/openmicroscopy/bioformats/blob/v5.0.0/docs/sphinx/formats/tiff-metadata.txt

Additionally, the spacing information does not seem to be passed from scifio-imageio to bioformat:
https://github.com/scifio/scifio-itk-bridge/blob/master/src/main/java/io/scif/itk/SCIFIOITKBridge.java#L538-L550

@thewtex @ctrueden
Do you think I am doing anything wrong or that this issue would be easy to address?

Possible use of readers with null id

Reported by Michael Meuli:

Problem encoutered while reading image file : single-channel.ome.tif

itk::ExceptionObject (0x81520e0)
Location: "unknown"
File: /home/michael/Colocalization/ITK-4.5.1-build/Modules/Remote/SCIFIO
/src/itkSCIFIOImageIO.cxx
Line: 180
Description: itk::ERROR: SCIFIOImageIO(0x8150fb0): SCIFIOImageIO
exited abnormally. Exception in thread "main"
java.lang.IllegalStateException: ImageReader.getSeries: Current file
should not be null; call setId(String) first
at loci.formats.FormatTools.assertId(FormatTools.java:724)
at loci.formats.ImageReader.getReader(ImageReader.java:200)
at loci.formats.ImageReader.getSeries(ImageReader.java:441)
at loci.formats.ReaderWrapper.getSeries(ReaderWrapper.java:343)
at loci.scifio.itk.SCIFIOITKBridge.executeCommand(SCIFIOITKBridge.java:116)
at loci.scifio.itk.SCIFIOITKBridge.executeCommand(SCIFIOITKBridge.java:108)
at loci.scifio.itk.SCIFIOITKBridge.waitForInput(SCIFIOITKBridge.java:83)
at loci.scifio.itk.SCIFIOITKBridge.executeCommand(SCIFIOITKBridge.java:161)
at loci.scifio.itk.SCIFIOITKBridge.main(SCIFIOITKBridge.java:693)

There could be an issue where the reader can be constructed with a null id, and then its getSeries method checked. Should probably at least check if the current file is null before checking the series...

Create Video framework IO

The current SCIFIOImageIO, as an ImageIOBase, can not properly supported mixed-size multi-series datasets. The itk::VectorImage is intended only for equally sized multi-series datasets.

The video framework should provide a more complete solution for multi-series datasets, which will require the construction of a SCIFIO video IO.

Update bundled JVM

Update bundled JVM to a newer version that will bring security and performance improvements and work with the latest bioformats library.

@ctrueden any suggestions on what to use?

Download site no longer available

Object
SHA512=0f278b8a9be5364d001f4fcd93c65d8bbd2fc4ac3bce8101e9fbb19a2999a36ece09002d18bced064a619c7193679586e5f35f437895580a6a22398613fb8efc
not found at:

https://insightsoftwareconsortium.github.io/ITKTestingData/SHA512/0f278b8a9be5364d001f4fcd93c65d8bbd2fc4ac3bce8101e9fbb19a2999a36ece09002d18bced064a619c7193679586e5f35f437895580a6a22398613fb8efc ("HTTP response code said error")
https://data.kitware.com:443/api/v1/file/hashsum/SHA512/0f278b8a9be5364d001f4fcd93c65d8bbd2fc4ac3bce8101e9fbb19a2999a36ece09002d18bced064a619c7193679586e5f35f437895580a6a22398613fb8efc/download ("Timeout was reached")
https://itk.org/files/ExternalData/SHA512/0f278b8a9be5364d001f4fcd93c65d8bbd2fc4ac3bce8101e9fbb19a2999a36ece09002d18bced064a619c7193679586e5f35f437895580a6a22398613fb8efc ("HTTP response code said error")
https://slicer.kitware.com/midas3/api/rest?method=midas.bitstream.download&checksum=0f278b8a9be5364d001f4fcd93c65d8bbd2fc4ac3bce8101e9fbb19a2999a36ece09002d18bced064a619c7193679586e5f35f437895580a6a22398613fb8efc&algorithm=SHA512 (wrong hash SHA512=639526ba1271b833beeb026311a3d40d2b50b8480ce8e938e87ea0dfc9c84e76867be09043f9b15fc5b21d003580c6169f1ba59b2202686b80258d8993ab7a09)
file( DOWNLOAD
    "https://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=${jreTarballMD5}&name=${outputFile}&algorithm=MD5"
    "${outputFile}"
    EXPECTED_HASH MD5=${jreTarballMD5} SHOW_PROGRESS
    )

Investigate endianness issue (nrrd)

from Kedar:

I have shared a nrrd file with you on google docs. When I read it with the ITK-SCIFIO
reader it switches the bit ordering LittleEndian/BigEndian whereas if I read it in Fiji or
build ITK without SCIFIO it is read properly. To test this you can use the ITK reader
example and write the image out as a tiff while building with/without SCIFIO.

Respect series restraints during initialization

It seems that when initializating, even if the series for reading is restricted, we still initializate using all the series, which can cause OutOfMemoryErrors anyway. It would be nice if we could try to avoid this.

How to solve java.lang.ClassNotFoundException for ITK programs using SCIFIOImageIO

I got ITK-4.12.2 compiled with Module_SCIFIO = ON and BUILD_TESTING = ON. bin/SCIFIOTestDriver is there but if I try to execute it it fails with:

reader->GetUseStreaming(): 1
done checking streaming usage
ITK test driver caught an ITK exception:

itk::ExceptionObject (0x55fd2ddc0b50)
Location: "unknown" 
File: /opt/compilation/ITK_build/Modules/Remote/SCIFIO/src/itkSCIFIOImageIO.cxx
Line: 180
Description: itk::ERROR: SCIFIOImageIO(0x55fd2ddb2970): SCIFIOImageIO exited abnormally. Exception in thread "main" java.lang.NoClassDefFoundError: io/scif/itk/SCIFIOITKBridge
Caused by: java.lang.ClassNotFoundException: io.scif.itk.SCIFIOITKBridge
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: io.scif.itk.SCIFIOITKBridge.  Program will exit.

After installation, there is /opt/itk-4.12.2/lib/jars/scifio-itk-bridge.jar but setting CLASSPATH=/opt/itk-4.12.2/lib/jars/ does not help nor ITK_AUTOLOAD_PATH. How should ITK-programs be told where to look for SCIFIOITKBridge?

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.