Skip to content

Instantly share code, notes, and snippets.

View lacan's full-sized avatar
🤝

Olivier Burri lacan

🤝
View GitHub Profile
@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 / ColocExamples.m
Last active October 22, 2020 09:26
Using the Coloc Function in EasyXT #Imaris #EasyXT #Coloc #Matlab #BIOP
% 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 / 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 / regularity_Index.ijm
Last active October 28, 2021 23:04
Measures the regularity index from an ImageJ Voronoi diagram #ImageJ #Fiji #Macro
/**
* Regularity Index Measurement
* Author: Olivier Burri
* Contact: http://biop.epfl.ch/INFO_Facility.html#staff
* Affiliation: BioImaging & Optics Platform, EPFL School of Life Sciences
* Date: 18 August 2015
* License: CC BY http://creativecommons.org/licenses/by/4.0/
*
* Description: Measures the regularity index from an ImageJ Voronoi diagram
*
@lacan
lacan / drawCirclesAndQuadrants.ijm
Last active November 21, 2021 16:23
Draws fractions of concentric circles #ImageJ #Macro #Fiji
/*
* By Olivier Burri, BioImaging & Optics Platform EPFL
* June 2016
* Provided as-is from a request on the ImageJ Forum
* http://forum.imagej.net/t/dividing-circle-into-8-equal-areas/1995
*/
var count = 0; // Variable to know which circle we are working on
// If you install this macro, it will be mapped to the F2 Key
@lacan
lacan / bissect.ijm
Last active April 16, 2021 18:50
Generates a curve that bissects a previously drawn segment #ImageJ #Macro
/*
* Simple bissection tool. By Olivier Burri at the BioImaging and Optics Platform
* Provided as-is based on a request of the ImageJ Forum: http://forum.imagej.net/t/how-do-you-measure-the-angle-of-curvature-of-a-claw
*
* Mouse listening code based on imageJ example
* https://imagej.nih.gov/ij/macros//GetCursorLocDemo.txt
*
* To install, use 'Plugins > Macros > Install...' and select this file
*
* To run, create a line selection and press F2.
@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 / Pseudo_3D_Gaussian_Fit_Using_Reslice.ijm
Last active October 22, 2020 09:27
Reslices a dataset, fits gaussians in 2D before performing a 1D fit in Z #ImageJ #Macro #Fiji #BIOP
saveDir = getDirectory("Save Directory");
image = getTitle();
run("Grouped Z Project...", "projection=[Max Intensity] group=25");
groups = getTitle();
getDimensions(gx,gy,gc,gz,gt);
setBatchMode(true);
for(g=0;g<gt;g++) {
selectImage(groups);
setSlice(g+1);
@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 / 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
*/