Skip to content

Instantly share code, notes, and snippets.

View ekatrukha's full-sized avatar
🛠️
quo

Eugene Katrukha ekatrukha

🛠️
quo
View GitHub Profile
@ekatrukha
ekatrukha / zoom_movie_ImageJ_v3_stack.ijm
Created October 24, 2024 04:47
zoom in macro for stacks
//ImageJ macro making a movie (stack) of zooming on selected rectangle (ROI)
//Eugene Katrukha katpyxa at gmail.com
requires("1.48h");
//check if there is rectangular selection
if(selectionType() ==0)
{
sTitle=getTitle();
//see if it is a timelapse or z-stack
Stack.getDimensions(widthS, heightS, channelsS, slicesS, framesS);
@ekatrukha
ekatrukha / gist:105553627f1bee01367faae153bfe5c0
Created September 20, 2024 10:26
ComDet particle radius/cell periphery distance calculation
//script needs 2 ROIs to be present in the ROI manager
//+ image itself
//+ Results table with particle coordinates
// First ROI is an outline of the cell (FREEHAND selection)
// The second ROI is a Point ROI of the cell's center
// Partice/vesicles coordinates colum names in Results table
// should start with X,Y
origID=getImageID();
getPixelSize(unit,pxW,pxH);
@ekatrukha
ekatrukha / weighted_hist.m
Created March 1, 2024 12:02
Matlab calculation of weighted histogram
inputFileName= 'wt chm';
dtin=importdata(strcat(inputFileName,'.csv'));
dBinMin=0;
dBinMax=6;
dBin = 0.1;
%first values then weights
dt=horzcat(dtin(:,2),dtin(:,1));
@ekatrukha
ekatrukha / straighten_animation_v2(20210128).ijm
Last active January 28, 2021 16:41
ImageJ macro for illustration of "Straighten" ROI function
// Providing an image and polyline, macro illustrates
// (creates a stack with animation)
// "Straighten" ROI function of ImageJ
// 2021.01.28 Eugene Katrukha / katpyxa at gmail dot com
if (nImages<1)
{
exit("This macro needs an input image. Open something");
}
if(selectionType()!=6)
@ekatrukha
ekatrukha / StarDist_Trackmate_v3_.py
Last active August 8, 2021 20:27
StarDist (or other ROIs) to Trackmate
import sys
from math import pi
from math import sqrt
from random import shuffle
from java.awt import Color
from ij import WindowManager
from ij.measure import ResultsTable
from ij.plugin.frame import RoiManager
@ekatrukha
ekatrukha / ComDet_allFiles_infolder_macro_.ijm
Created April 29, 2020 16:57
ImageJ macro for ComDet batch
//get folder with files
input = getDirectory("Input directory");
//!!!define suffix of files here
suffix = ".tif";
list = getFileList(input);
for (i = 0; i < list.length; i++)
@ekatrukha
ekatrukha / 3D_tilt_stack_v1.ijm
Created February 7, 2019 18:03
ImageJ macro making a tilted movie out of Z-stack
//ImageJ macro making a tilted movie out of stack
//uses shear transform + rotation
//Eugene Katrukha katpyxa at gmail.com
requires("1.48h");
sTitle=getTitle();
sMovieTitle=sTitle+"_tilt_movie";
setBatchMode(true);
//Dialog
@ekatrukha
ekatrukha / Temporal-Color_Code_weightedSUM.ijm
Created April 23, 2018 15:04
New version of Temporal Color Code ImageJ tool with weighted SUM projection color scheme
/*
************* Temporal-Color Coder *******************************
Color code the temporal changes.
Kota Miura ([email protected])
Centre for Molecular and Cellular Imaging, EMBL Heidelberg, Germany
If you publish a paper using this macro, please acknowledge.
@ekatrukha
ekatrukha / zoom_movie_ImageJ_v2.ijm
Last active July 13, 2022 16:19
ImageJ macro making a movie (stack) of zooming on selected rectangle (ROI)
//ImageJ macro making a movie (stack) of zooming on selected rectangle (ROI)
//Eugene Katrukha katpyxa at gmail.com
requires("1.48h");
//check if there is rectangular selection
if(selectionType() ==0)
{
sTitle=getTitle();
sMovieTitle=sTitle+"_zoom_movie";
setBatchMode(true);
@ekatrukha
ekatrukha / p5STICS.js
Last active February 12, 2017 00:27
simple interactive single-molecule "like" diffusion/flow/blinking generator using p5.js
var system;
var input, button, greeting;
var diffusion;
var nParticleTotN;
var sigma;
var nLifetime;
var velocityx;
var velocityy;
function setup() {