GithubHelp home page GithubHelp logo

knime-ip / knip Goto Github PK

View Code? Open in Web Editor NEW
49.0 17.0 11.0 217.26 MB

KNIME Image Processing Extension

Home Page: https://www.knime.com/community/image-processing

Java 99.94% HTML 0.05% Shell 0.01%
knime java image processing analysis imagej imagej2 imglib2 fiji scijava

knip's Introduction

Join the chat at https://gitter.im/knime-ip/knip

KNIME Image Processing Extension

The KNIME Image Processing Extension adds new nodes to KNIME Analytics Platform to, e.g. read more than 100 different kinds of images (thanks to the Bio-Formats library), apply well-known methods for preprocessing, image segmentation, and classification. Most of the included nodes operate on multi-dimensional image data (e.g. videos, 3D images, multi-channel images or even a combination of them), which is made possible by ImgLib2. In addition, several nodes to calculate image features (e.g. zernike-, texture- or histogram features) for segmented images (e.g. a single cell) are included. These feature vectors can be used to apply machine learning methods in order to train and apply a classifier.

The KNIME Image Processing Extension currently provides about 90 nodes for (pre)processing, filtering, segmentation, feature extraction, various views, ....

For more information how to install/use KNIME Image Processing see: https://www.knime.com/community/image-processing

Example Workflows can be found at: https://hub.knime.com/knime/spaces/Examples/latest/99_Community/01_Image_Processing/

Package Organization

  • org.knime.knip.core: Logic/Algorithms/DataStructures/Views independent of KNIME
  • org.knime.knip.base: KNIME Image Processing Nodes wrapping core and providing dedicated KNIME Image Processing functionality (NodeModels etc).
  • org.knime.knip.feature: Eclipse feature for org.knime.knip.core and org.knime.knip.base
  • org.knime.knip.testing: KNIME Image Processing Testing nodes, e.g. for regressions tests.
  • org.knime.knip.testing.feature: Eclipse feature for KNIME Image Processing Testings nodes.
  • org.knime.knip.io: Image Reader/Image Writer for KNIME Image Processing.
  • org.knime.knip.update: Eclipse update site for KNIME Image Processing and depedencies.
  • org.knime.knip.tracking: TrackMate Tracking integration.

For Developers

See this repository for instructions.

knip's People

Contributors

andreasburger avatar angrauma avatar beschu avatar dietzc avatar gab1one avatar hedgehogcode avatar hornm avatar michaelzinsmaier avatar oole avatar simonschmid avatar squareys avatar stelfrich avatar thorsten-meinl-knime avatar tibuch avatar treiblesschorle avatar udosc 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  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

knip's Issues

Slice Loop Start: Fails on invalid input

SliceLoopStart fails on invalid input (just connect any table without any image) with a NullPointerException. There should certainly be a better error handling:

java.lang.NullPointerException
at org.knime.knip.base.nodes.util.slicelooper.SliceIteratorLoopStartNodeModel.execute(SliceIteratorLoopStartNodeModel.java:315)
at org.knime.core.node.NodeModel.execute(NodeModel.java:700)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:552)
at org.knime.core.node.Node.invokeNodeModelExecute(Node.java:1097)
at org.knime.core.node.Node.execute(Node.java:948)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:518)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:179)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:110)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:120)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:240)

Refactoring KNIME Image Processing

Hi @AndreasBurger @angrauma @Squareys @DanielSeebacher @gab1one,

all further changes / PR will go into https://github.com/knime-ip/knip/tree/refactoring until its merged into master. Reasons why I can't merge, yet:

ImgLib2 related:

[ ] ImgLib2 Bug with Unsynchronized Unsigned12BitType
[ ] ImgLib2 Bug with Extend/Convert imglib/imglib2#82
[ ] ImgLib2-ROI Snapshot and ImgLib2-ROI will heavily change at the hackathon
[ ] No implementation for NTreeImg BitType anymore.

KNIME Image Processing related:

[ ] Adapt Testflows to use mean of images (#87)
[ ] Create Testflows only used for serialization, deserialization
[ ] Create Testflows only used to test convertes (e.g. Inverter/Converter Node + Gauss)

Branch-Cleanup:

[ ] https://github.com/knime-ip/knip/tree/descriptors @DanielSeebacher: Is there any code which is not in imagej-ops besides the UI creation? do we need to transfer anything to the new knip-core?
[ ] https://github.com/knime-ip/knip/tree/imgsaver @gab1one: We need to wait until we have everything in place at knip-core. Can you please merge the current master into this branch?
[ ] https://github.com/knime-ip/knip/tree/scifio-imgsaver @gab1one whats this?
[ ] https://github.com/knime-ip/knip/tree/readpdfs @DanielSeebacher do you still need this?
[ ] https://github.com/knime-ip/knip/tree/knipimg can be deleted
[ ] https://github.com/knime-ip/knip/tree/InteractiveLabelingEditorBugfix @AndreasBurger
[ ] https://github.com/knime-ip/knip/tree/interactiveAnnotatorBezierTool @angrauma
[ ] https://github.com/knime-ip/knip/tree/sls-adjustdim @angrauma
[ ] https://github.com/knime-ip/knip/tree/KnimeService @Squareys I moved the org.knime.knip.scijava project to https://github.com/knime-ip/knip-scijava. Can you double check that this makes sense?

Force ImageType in ImgReader?

Should it be possible to force the ImageReader to use a specific ImageType? To clarify, the following dataset (patentbase) consists of 2000 binary images and has a size of 80,1 MB.

If this dataset is loaded using the Image Reader and saved, the workflow needs over 9GB of space on the hard disk, since every image is now uncompressed and of type UnsignedByteType. Since we know beforehand that we will only read binary images, we could tell the ImageReader to load the images as BitType, which should theoretically reduce the hard drive usage by one-eighth.

Image Reader: Metainfo only

The image reader, or a custom new node, should be able to output only the meta information of an image without reading all of it.

An alternative solution and / or side-project could be removing the need for an input image at the ImageJ Macro Node.

Table Cell Viewer: Better presentation of table and view

It would be great if the Table Cell Viewer remembered the width of the table vs cell contents.

Moreover, there seems to be a bug when trying to change the size of the table: if I first click on the image and then try to increase the table size, the ruler does not move at all.

table cell viewer2

Image Viewer: Merged view

It would be great if there was a merged + color table based view.
In Zeiss Zen blue, I can select for each of N channels which of them should be shown in an overlay.

Additionally, the black and white value (= min and max shown) and the gamma per channel can be set by adjusting the line on the histograms within the screenshots. The first and last box shaped handle of the line modifies the black and white value, respectively. The middle handle modifies them both at once like sliding a window. The second and fourth handle do not move left and right as the others, but up and down and they modify the gamma value. Moreover, the black/white value can also be changed with the vertical bar at the end of the lines for convenience.

The "best fit" works as a contrast stretcher, excluding a default of 2% black pixels and 0.01% white pixels and can be applied to the current x,y(,z)?(,t)? subvolumes.

The gamma and best fit would be an optional extra, but the merged overlay and being able to set the black/white value would help a lot!

Update: another optional, but handy feature is storing the image display settings (in Zen blue, they can even be copy+pasted with or without assigning colors, but I don't expect this to be necessary in Knime)

zen_all_channels

zen_green_and_red_with_gamma_and_black_value_changed

ImgPlus- / LabelingCell

Unify class hierarchy and introduce new cell types:

LabelingCell and ImgPlusCell share tons of code and therefore we could unify them. Additionally, several nodes (e.g. Cropper, Splitter, etc) can be used by both LabelingCell and ImgPlusCell (as these nodes are independend from the content type and work on RandomAccessibleInterval<?>).

One problem might be, that we have to be backwards compatible.

Splitter: Allow cropping of images with varying dimensions

Select: X,Y,Channel to be splitted

Input: X,Y,Channel and X,Y,Channel,Time

Currently: Error as differing dimensions

Actually: Possible, as the number of resulting objects is the same, just the dimensionality of the objects differs.

InteractiveLabelingEditor highlight bug

After switching the displayed image while highlighting is on, returning to a previously highlit image with disabled highliting shows an image without labels.

New Node: Segment Counter

Node which allows you to simply calculate the number of labels per labeling. Additionally, the user should be able to set a filter (Label/Group).

Outputs of the nodes may be the following:

(a) Labeling -> Total Segment Count (1:1)
(b) Labeling -> Segment Count per Group (1:n)

Unify Caching System

Currently we have serveral caching implementations. Actually we could unify them using only one (e.g. apache JCS). We could use a SciJava-Service here.

LabelingArithmetic: Make outtype configurable

If you e.g. merge to labelings of BitType the outtype must be > bittype as you may have three labels (labels from img A, labels from img B and empty labeling) in the resulting labeling.

Image Reader: Fail if selected column does not exist

Recommendation from Thorsten:

Zum anderen verhält er sich nicht korrekt, wenn ich eine Spalte vom
optionalen Eingang konfiguriert habe und die Spalte gibt es später nicht
mehr oder der Eingang ist gar nicht mehr verbunden. Solchen Fälle muss
der Knoten im configure überprüfen und dann fehlschlagen. Im Moment
ignoriert er das aber einfach und gibt eine leere Tabelle aus.

NullPointerException when calling .randomAccess()

I have created an ArrayImg using the ArrayImgFactory. The ArrayImg was created, it isn't null but when I call .randomAccess() a NullPointerException is thrown. Below I have added a simple class with a main method which reproduces this error.

import net.imglib2.img.array.ArrayImg;
import net.imglib2.img.array.ArrayImgFactory;
import net.imglib2.img.array.ArrayRandomAccess;
import net.imglib2.img.basictypeaccess.array.ByteArray;
import net.imglib2.type.NativeType;
import net.imglib2.type.numeric.RealType;

public class Error {

    public static <T extends RealType<T> & NativeType<T>> void main(
            String[] args) {

        // create an ArrayImg using the ArrayImgFactory
        ArrayImg<T, ByteArray> arrayImg = new ArrayImgFactory<T>()
                .createByteInstance(new long[] { 50, 50 }, 1);

        // arrayImg isn't null
        System.out.println((arrayImg != null));

        // NullPointerException is thrown here
        ArrayRandomAccess<T> randomAccess = arrayImg.randomAccess();
    }

}

The expected output is

true
Exception in thread "main" java.lang.NullPointerException
    at net.imglib2.img.array.ArrayRandomAccess.<init>(ArrayRandomAccess.java:84)
    at net.imglib2.img.array.ArrayImg.randomAccess(ArrayImg.java:109)
    at Error.main(Error.java:21)

Image Converter takes too long

Maybe instead of creating a new image we could just use some kind of Converter for the randomaccess instead of creating a new image.

Image Writer: merged channels

The image writer should support "merging" the channels the same way as I proposed for the image viewer (#56). My goal is to export them in a presentation-ready format, e.g. as PNG with a scale bar included.
Contrast adjustment would be nice, but I assume that should be done with a prefixed normalizer node or image parameter adjuster.

Update Testflows

Update Testflows:

  • Store Mean of image instead of images
  • Testflow for Don't Save Start / End Nodes
  • Testflow for SliceLoopStart / End
  • Explicit Testflows for Serialization of all kind of labelings / image factories and types

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.