Skip to content

Instantly share code, notes, and snippets.

Kevin Mader kmader

  • Magic Leap
  • Zurich, Switzerland
View GitHub Profile
@kmader
kmader / CellWorkflow.zip
Last active Aug 29, 2015 — forked from kmader/batchimage.condor
The basic condor setup for a job processing a simple cell image using KNIME
@kmader
kmader / A ImageJ Analysis.ijm
Last active Aug 29, 2015 — forked from kmader/A analysis.ijm
Code for Birkedal to do slice by slice analysis
View A ImageJ Analysis.ijm
// taken from https://gist.github.com/kmader/10871528
// Load the data in
imageStackDirectory=getDirectory("Select the folder where the images should loaded from");
run("Image Sequence...", "open="+imageStackDirectory+" sort use");
// crop the image
makeRectangle(1089, 993, 675, 702);
run("Crop");
// clear the meaningless pixel sizes and set them to 0
run("Properties...", "unit=pixel pixel_width=1 pixel_height=1 voxel_depth=1 global");
// set which metrics to record for each analysis
@kmader
kmader / batchimage.condor
Last active Aug 29, 2015 — forked from kmader/mandelbrot.condor
A condor script for filtering and thresholding a given image using a number of different parameters
View batchimage.condor
##################################################################
##
## Run a parameter sweep with threshold and filter using condor
## Filename: batchimage.condor
##
##################################################################
universe = vanilla
getenv = True # MATLAB needs local environment
@kmader
kmader / ellipsoid_analysis.m
Last active Aug 29, 2015 — forked from kmader/Matlab Shape Analysis Function
A full shape analysis for 3D images segmented in matlab in the format used by bwlabeln or watershed
View ellipsoid_analysis.m
% this function (will) performs the ellipsoid based shape analysis on a 3D image
% the input is a labeled image probably from the bwlabel function
% the output is an array formatted like such
% labelId, volume, centerX, centerY, centerZ, extentsX, extentsY, extentsZ, pca1X, pca1Y, pca1Z, score1, score2, score3
function [out_table]=ellipsoid_analysis(in_image,out_file)
% create an array the same size as the image of x,y, and z points. This way we can calculate
% center of volume and other parameters by using multiplication
[xgrid,ygrid,zgrid]=meshgrid(1:size(in_image,1),1:size(in_image,2),1:size(in_image,3));
num_of_obj=max(in_image(:));
You can’t perform that action at this time.