fun.imagej.img

concat-imgs

(concat-imgs imgs)
Concatenate images along dimension+1. All images
are assumed to be of the same size.

confusion-img

(confusion-img target pred)
Return an img that encodes the confusion matrix at each pixel.

confusion-matrix

(confusion-matrix target pred)
Return the confusion matrix from 2 images. The first image is taken to be the target and the second is the prediction.

copy

(copy img)
Create a copy of an img.

create-img-like

(create-img-like img tpe)(create-img-like img)
Create an Img like the input.

difference

(difference img1 img2)
Take the difference between two images.

difference!

dimension-split

(dimension-split rai d)
Split an image along the hyperslices of a dimension.
Returns a View

dimensions

(dimensions input)
Return the number of pixels in each dimension for something
with Dimensions.

draw-maxima

(draw-maxima input maxima)
Draw maxima into an image.

elmul

(elmul img1 img2)
Subtract the second image from the first (destructive).

elmul!

fill-boundary

(fill-boundary img bx by bz tx ty tz fill-value)
Fill boundary pixels with the given value.
(bx,by,bz) - 'bottom' point. these are the small values. exclusive
(tx,ty,tz) - 'top' point. these are the big values. exclusive
locations outside these points are assigned fill-value

fill-boundary!

filter-vals

(filter-vals f img1)
Create a Bit Img that according to a function f, which should return true/false.

find-maxima

(find-maxima input)(find-maxima input shp radius)
Find maxima

get-depth

(get-depth img)
Return the depth of the image.

get-height

(get-height img)
Return the height of the img.

get-size-dimension

(get-size-dimension img d)
Return the size along the specified dimension.

get-type

(get-type img)
Return the class type of an image.

get-val

(get-val img position)
Return the value at a given position.

get-width

(get-width img)
Return the width of the img.

gradient

(gradient input dimension)
Calculate the gradient with respect to a dimension using
the central difference method.

hessian-matrix

(hessian-matrix gradients)
Calculate the Hessian matrix, where gradients is a stack of images (presumably gradients).

hyperslice

(hyperslice rai d pos)
Return a n-1 dimensional slice through dimension d at position p.

map-img

(map-img f img1)(map-img f img1 img2)(map-img f img1 img2 & imgs)
Walk all images (as cursors) applying f at each step.
f is a function that operates on cursors in the same order as imgs
If you have an ImagePlus, then use funimage.conversion
Note: this uses threads to avoid some blocking issues.

map-img!

map-localize-img

(map-localize-img f img1)(map-localize-img f img1 img2)(map-localize-img f img1 img2 & imgs)
Walk all images (as cursors) applying f at each step.
f is a function that operates on cursors in the same order as imgs
If you have an ImagePlus, then use funimage.conversion
Note: this uses threads to avoid some blocking issues.

map-localize-img!

neighborhood-map-to-center

(neighborhood-map-to-center f radius source dest)
Do a neighborhood walk over an imglib2 img.
Rectangle only

neighborhood-map-to-center!

normalize

(normalize input)
Normalize an image using its minimum and maximum

num-dimensions

(num-dimensions input)
Return the number of dimensions of a EuclideanSpace.

periodic-neighborhood-map-to-center

(periodic-neighborhood-map-to-center f radius source dest)
Do a neighborhood walk over an imglib2 img.
Rectangle only

periodic-neighborhood-map-to-center!

point-distance

(point-distance p1 p2)
Return the distance between two Points

realpoint-distance

(realpoint-distance p1 p2)
Return the distance between two realpoints

replace

(replace img1 img2)
Replace img1 with img2

replace!

replace-subimg

(replace-subimg img replacement start-position)
Replace a subimage of a larger image with a smaller one.

replace-subimg!

replace-subimg-with-opacity

(replace-subimg-with-opacity img replacement start-position opacity)
Replace a subimage of a larger image with a smaller one if the replacement is greater than the provided opacity value.

replace-subimg-with-opacity!

resize

(resize img scale)
Resize an img.

scale

(scale img scalar)
Scale the image.

scale!

set-val

(set-val img position new-val)
Set the value at a given position.

show

(show img)
Display an Img.

subtract

(subtract img1 img2)
Subtract the second image from the first (destructive).

subtract!

sum

(sum img)
Take the sum of all pixel values in an image.

tensor-eigen-values

(tensor-eigen-values tensor)
Return the eigenvalues of rank 2 tensors.

threshold

(threshold img threshold)
Binarize an image about a threshold

threshold!