Skip to content

Instantly share code, notes, and snippets.

View lacan's full-sized avatar
🤝

Olivier Burri lacan

🤝
View GitHub Profile
@lacan
lacan / new_results_table.ijm
Last active June 16, 2017 10:20
Make a new table with only the bounding box and label informations #ImageJ #Fiji #Macro
/*
* Make a new table with only the bounding box and label informations
* Olivier BURRI, November 2016
* Provided as-is, based on a request on the ImageJ List
* http://forum.imagej.net/t/creating-and-saving-a-custom-table-from-results/3285?u=oburri
*/
nR = nResults;
label = newArray(nR);
x1 = newArray(nR);
@lacan
lacan / batchColoc.m
Last active June 16, 2017 10:39
Matlab Batch Coloc For Many Channels #Matlab #EasyXT #Coloc #Imaris
% Get EasyXT at:
% https://github.com/lacan/EasyXT
% The very first time you run it, use
% X = EasyXT('setup')
% To tell the XTension where the Imaris Executable file is.
% Disclaimer
% This code is provided as-is and hopefully will be of some use to people
% Olivier BURRI, Romain GUIET @ BIOP (EPFL - BioImaging & Optics Platform), July 2015
@lacan
lacan / get_Distances.ijm
Created August 10, 2017 11:10
[Compute Distance Based on Edges] Determine Length of a rather homogeneous structure using Find Edges on graylevel image #Macro #ImageJ #Fiji
/*
* Determine Length of a rather homogeneous structure using Find Edges on graylevel image
*
* using an iterative approach to end up having exactly two peaks on the
* maximum finder.
*
* By Olivier Burri
* BioImaging And Optics Platform.
*
* In response to http://forum.imagej.net/t/how-calculate-the-pixels-distance/6478?u=oburri
@lacan
lacan / simpleKNN.py
Last active March 16, 2018 20:56
2D K Nearest Neighbors Python script when we have a point selection in ImageJ #Fiji #Python #ImageJ
#@ImagePlus imp
#@Integer(label="Number of Neighbors") k
#@Boolean(label="Give Each Neighbor's Distance") is_show_each
'''
Simple 2D KNN script
Olivier Burri, BioImaging & Optics Platform
Ecole Polytechnique Fédérale de Lausanne
July 12th 2016
@lacan
lacan / batchChannelMath.m
Last active July 27, 2018 16:48
Imaris Batch Channel Math with EasyXT #Imaris #EasyXT #Matlab
% Example of looping through a folder to process a series of images.
% In this case, perform channel math.
% For convenience, this example uses EasyXT, but feel free to adapt it as needed.
% Get EasyXT Here: http://lacan.github.io/EasyXT/
% The ChannelMath method is borrowed from the XTension with the same name, made by Bitplane.
folder_name = uigetdir();
listing = dir(folder_name);
@lacan
lacan / Stitch_Correction.bsh
Last active November 30, 2018 11:45
[Stitching with Flatfield Correction] Takes a folder as input and processed all multiseries files there using a provided flatfield file #Beanshell #Stitching #Fiji #ImageJ
//@File(label="Multiposition Files Directory",style="directory") image_directory
//@String(value="Select a file for flat field correction or write none", visibility="MESSAGE") textFF
//@File(label="Flatfield Correction File", value="none") ff_file
//@int(label="Downsample Factor", style = "slider", min = "1", max = "16", stepSize = "1") downsample
//@Boolean(label="Compute Overlap") is_compute
//@String(label="Macro Mode",choices={"Fuse and display","Write to disk"}) output_type
//@LogService log
import ij.IJ;
import loci.formats.ImageReader;
@lacan
lacan / find_delaunay_neighbors_distance_demo.ijm
Last active December 8, 2018 10:00
[Neighbors from Delaunay] Find Average Neighbor Distance From Delaunay Triangulation Demo #ImageJ #Fiji #Macro
/**
* Demo of using Delaunay triangulation to find average inter-neighbor distances
* In reply to ImageJ forum post:
* http://forum.imagej.net/t/measuring-distance-to-neigbours/10712
*
* Olivier Burri, EPFL BIOP (BioImaging And Optics Platform)
* May 1st 2018
*
* Provided as-is under Creative Commons Attribution 4.0 International License
* https://creativecommons.org/licenses/by/4.0/
@lacan
lacan / points_to_curve_distance.ijm
Last active March 29, 2019 01:13
Points To Curve Distance using Distance Map imageJ Macro #ImageJ #Macro #Fiji
/*
* Distance of points to freehand line
* using distance transform
* Inspired by work from 2011 For Dr. Giuseppe Lo Sasso
*
* Olivier BURRI November 2016
* Provided as an example for a post on the ImageJ Forum
* http://forum.imagej.net/t/quantifying-distance-of-multiple-points-from-a-freehand-line/3287
*/
@lacan
lacan / lutToIntensity.ijm
Last active July 24, 2019 01:12
Reconvert color coded image to intensity based on color scale. #ImageJ #Fiji #Macro
/*
* Reconvert color LUT to intensity
* Olivier BURRI
* BioImaging and Optics Platform BIOP, EPFL
* In reply to an ImageJ Forum Post http://forum.imagej.net/t/split-colored-height-map-of-moon-in-greyscale-images/
* Provided As-Is
*/
// Before running this macro, make sure that you have an image called LUT with the color scalebar separately
@lacan
lacan / BigStitcher_Flip_Axes.groovy
Last active October 28, 2019 08:02
[BigStitcher Flip Axes] Implements the Flip Axes Command from BigStitcher in a Macro Recordable Way #SPIM #BigStitcher #Fiji #Groovy
/**
* Implements the Flip Axes Command from BigStitcher
*
* Recommendation is to place this file in
* [FIJI Folder]/plugins/Scripts/Plugins/BigStitcher/Custom Scripts
*
* By Olivier Burri for Kai Schleicher,
* https://forum.image.sc/t/bigstitcher-flip-axes-in-headless-mode/30557?u=oburri
* BSD 3 License
*