Skip to content

Instantly share code, notes, and snippets.

View hanslovsky's full-sized avatar

Philipp Hanslovsky hanslovsky

View GitHub Profile
@hanslovsky
hanslovsky / select-pairwise-images.md
Created April 2, 2015 21:41
Good practices for selecting pairs of images by index in Spark

Assume you have an indexed Spark RDD of N images and you would like to sparsely select pairs, i.e. the number of selected pairs is much smaller than all possible pairs N^2. One way to do it, is to create a cartesian of the RDD with itself and then filter the pairs by some criterion, e.g. limit the difference between pairwise indices:

selection = images
    .cartesian( images )
    .filter( /* some criterion */ )
    ;

However, this needs to create an intermediate RDD with N^2 elements and on the way their requires a lot of cross-talk between

@hanslovsky
hanslovsky / benchmark.ipynb
Created September 29, 2016 20:19
Parallel distance transform watershed (imglib2)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hanslovsky
hanslovsky / trove-vs-map-benchmark.ipynb
Last active January 31, 2017 20:44
Comparison of collection and mediation of shifts in z-spacing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hanslovsky
hanslovsky / wipeout-experiment.ipynb
Last active February 1, 2017 17:00
Z-Position Correction Matrix Wipeoiut
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hanslovsky
hanslovsky / ViewsFailureTest2.java
Last active March 10, 2017 20:52
Potential Bug in DiamondShape
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import net.imglib2.Cursor;
import net.imglib2.Interval;
import net.imglib2.Point;
import net.imglib2.RandomAccess;
import net.imglib2.RandomAccessible;
import net.imglib2.RandomAccessibleInterval;
import net.imglib2.algorithm.neighborhood.DiamondShape;
@hanslovsky
hanslovsky / talk.pdf
Last active May 11, 2017 15:03
imglyb talk slides
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hanslovsky
hanslovsky / Problems in jnius_proxy.pxi and jnius_conversion.pxi .md
Last active June 21, 2017 16:23
Minimal failing example for PyJNIus on windows

I assume now that these lines in jnius/jnius_proxy.pxi and these lines cause the issue:

cdef jobject py_invoke0(JNIEnv *j_env, jobject j_this, jobject j_proxy, jobject
        j_method, jobjectArray args) except * with gil:

    from .reflect import get_signature, Method
    cdef jfieldID ptrField
    cdef jlong jptr
@hanslovsky
hanslovsky / imglyb.md
Last active June 26, 2017 13:32
ImageJ Learnathon Dresden

Install imglyb Through Conda

If you are running Linux or OSX you can install imglyb through conda:

# install conda through your package manager or from
# https://conda.io/docs/download.html
conda create -n imglyb -c hanslovsky imglib2-imglyb imglyb-examples python=3.6
source activate imglyb

# run examples (Linux)
python -m imglyb-examples.butterfly
@hanslovsky
hanslovsky / pomegranade.md
Created June 23, 2017 18:20
Pomegranate trying to cluster image data

Not sure how this works but this might point you in the right direction @kephale