This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ImageJ macro written by Dominic Waithe. (c) 2017. | |
//To be used on three channels of an image file. | |
//Output: | |
//prints to log for each cell something like this: Cell Number: 270 Foci Count CH1: 7 Foci Count CH2: 4 particles within distance 5 | |
//outputs image | |
//Parameters for the code | |
//DAPI channel. Used to find the areas. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ImageJ macro written by Dominic Waithe for Caroline Scott. 2017. | |
//This macro uses the Hough circlular transform to count the number of cells present. | |
//Works very well, but artefacts on sample will lower accuracy. | |
///Parameters | |
//Radii to focus the hough-transform on | |
r_start = 6; //radii minimum size | |
r_stop = 8; //radii maximum size. | |
edge_mag = 70; //Threshold for edge magnitude, the lower this value the more of the edges will be captured. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 2D Gaussian fitting example with rough feature identification. | |
////////////////////////////////////////////// | |
// Written by Dominic Waithe. University of Oxford. Follow on Twitter at @dwaithe. Or https://github.com/dwaithe | |
// Copyright (c) 2016 Dominic Waithe. See license at bottom of file. | |
//// Details: | |
// Fiji/ImageJ. Just make sure its up-to-date. Tested on v 1.49. | |
// This script includes a rough feature detection and then fine 2D Gaussian algorithm to fit Gaussians within patches regions. | |
// This macro is special because the ImageJ/Fiji curve fitting API only supports 1-D curve. I get around this by... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//File converter code. Converts lsm files to ome.tiff from and input folder to and output folder. | |
//Written by Dominic Waithe for Heinrich Klose (2017). | |
//You need to change these values to your folders of choice. | |
input_dir = "set/path/to/input/folder"; | |
output_dir = "set/path/to/output/folder"; | |
//Processing code begins: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Macro written by Dominic Waithe for Victoria Zilles, Erdinc Sezgin and Falk Schneider. | |
//Measure FWHM at multiple points along a user-defined line | |
//Fits intensity profile using Gaussian Fitting | |
//Outputs data from STED and CONFOCAL in log. | |
//Dominic Waithe 2016, University of Oxford. | |
//Find the coordinates of the selection. | |
getSelectionCoordinates(xr, yr); | |
//Add the coordinates to the roi manager. | |
roiManager("Add"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.ndimage import map_coordinates | |
import numpy as np | |
def rigid_transform_3d(input_im, alpha,beta,gamma,xt,yt,zt,order=2): | |
""" | |
Function which performs a rigid-body transformation on volumetric intensity data: | |
-- example usuage -- | |
%pylab inline #in jupyter or ipython include this for the visualisation. | |
inw = np.zeros((30,35,50)) |