Git Product home page Git Product logo

kip's Introduction

kip - Common {i}mage {p}rocessing with {K}otlin

A concise DSL to perform common image processing tasks using Kotlin

Features

  • Fully typed method signatures
  • Concise and easy to read
  • Excellent tooling, interactive REPL and IDE support
  • Extension methods only, no new types
  • Sensible default parameters where possible
  • Immutable (for now)
  • Ready for jupyter

Examples

import de.mpicbg.scicomp.kip.*
import net.imglib2.type.numeric.real.FloatType


val image = bubbles()
val other = bubbles()

// image arithmetics
val imageDiff = image + other
val imageProp = image / other

// number arithmethics
val imageDiff = image - 3

// display as usual
image.show()

// save to file
image.save("my_image.png")

// open from file
val blobs = openImage<FloatType>("images/blobs32.tif")
//val image2 = openImage<FloatType>("/Users/brandl/projects/kotlin/kip/images/blobs32.tif")

// little helpers to ease some of the API pain
image.dim()

// misc operators to transform images

// default parameters which are also named parameters
val medianImage = image.median(listOf(10f,10f), shape = Shape.disk)

// method chaining
image.gauss().show()
image.gauss().median().apply{ save("some.png") }.show()


// segmentation & labeling
 val labelImage = bubbles()
    .gauss(10)
    .showThen()
    .threshold(0.3f)
    .invert()
    .showThen()
    .label()

labelImage.show()

Methods

Filters

  • Median Filter
  • Gauss Filter
  • Inversion

Segmentation

  • Threshold
  • Labeling

Still missing but on our list (drop us a ticket if needed)

  • Morphologial Ops (Erode, Dilate, Open, Close)
  • Projections
  • Scalar Arithmetics
  • Slicing
  • Watershed
  • TopHat Filter

Meanwhile you can for sure mix ops or imglib2 api directly

Next steps

  • Add remaining operators from CIP
  • Provide kscript and jupyter example notebooks
  • port some examples from here to kip

Acknowledgments

We stole most bits and pieces from CIP

Also thanks to the imglib2 gitter community.

kip's People

Contributors

holgerbrandl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kip's Issues

Describe setup process for repositories

There's no description of how to include the project. I had to fiddle around a bit to find out what Maven repositories to add. It might be a good idea to display that somewhere in the readme file.

My build.gradle.kts:

repositories {
    jcenter()
    maven("https://jitpack.io")
    maven("http://maven.imagej.net")
    maven("http://maven.imagej.net/content/repositories/releases/")
    maven("http://maven.imagej.net/content/repositories/public/")
}

dependencies {
    compile(kotlin("stdlib-jdk8"))
    compile("com.github.holgerbrandl:kip:9ee71b76b3")
}

Merge with ImageJ Ops? Or make an official ImageJ subproject?

One goal of ImageJ Ops is to provide a central, curated collection of image processing algorithms, which are easy to use from scripts. It would be very helpful to hear about where/how Ops falls short, and take steps to improve the situation. We do have plans to make Ops easier to use, and easier to extend.

Could we start a thread on the ImageJ Forum where we discuss these things, and figure out how to move the project forward for the whole community's benefit, rather than splintering it into side projects like this?

See also benoalo/CIP#4.

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.