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
#@ UIService ui | |
#@ DatasetService ds | |
/* | |
* Happy Pi Day 2022 | |
* | |
* This visualizes the bifurcation diagram for the "standard circle map" | |
* https://en.wikipedia.org/wiki/Arnold_tongue#Standard_circle_map | |
* | |
* (and its parameters are expressed in terms of pi) |
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
// This script was created for Anna Hamacher, as per an internal discussion on the ImageSC forum | |
// that stemmed from https://forum.image.sc/t/viewing-slide-scans-from-operetta-perkin-elmer-cls-as-overview-montage-images/52942/13?u=oburri | |
// Code by Olivier Burri, EPFL - SV - PTECH - BIOP | |
// Edited by Anna Hamacher | |
// Last edition: July 2022 | |
#@ File dir (label="Images Folder", style="directory") | |
#@Integer downsample (label="Downsample Factor", value=1) | |
#@String z_projection_method (label = "Projection Type", choices = {"No Projection", "Average Intensity", "Max Intensity", "Min Intensity", "Sum Slices", "Standard Deviation", "Median"} ) | |
#@File outputDir (label="Output directory", style="directory") |
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
/** | |
* Calculate 1D Full Width at half Maximum of a single line or a series of lines added to the ROI Manager | |
* Created by Olivier Burri and Romain Guiet, BioImaging & Optics Platform (BIOP) | |
* Last Update: 2020.10.21 | |
* | |
* Due to the simple nature of this code, no copyright applies | |
* | |
* Installation | |
* ------------ | |
* From within Fiji Please use "Plugins > Macros > Install" and select this file |
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
/* | |
// ABOUT | |
Exports Annotations for StarDist (Or other Deep Learning frameworks) | |
// INPUTS | |
You need rectangular annotations that have classes "Training" and "Validation" | |
After you have placed these annotations, lock them and start drawing the objects inside | |
// OUTPUTS | |
---------- |
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(label="Please select an UserName-Lab", style="directory") selected_dir | |
#@String() projectName | |
/* | |
* Macro to create a folder accordingly to BIOP template. | |
* | |
* | |
* | |
* git need to be installed |
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 to read 'timestamps' and 'events' from CZI files. | |
path = File.openDialog("Select CZI File"); | |
s = File.openAsRawString(path, File.length(path)); | |
o = indexOf(s,"CZTIMS"); | |
o=o+0xcc; | |
n = parseInt(read32bAt(o)); | |
timestamps = newArray(n); |
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
import ij.* | |
import ij.plugin.Duplicator | |
import ij.io.FileSaver | |
/** | |
* | |
* Here is a groovy script which: | |
* - Gets information about the current ImagePlus File (via imp.getOriginalFileInfo()), | |
* - Retrieves its directory | |
* - Creates an output subfolder |
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
"""Converting from ImagePlus to ImgPlus. | |
When an ImagePlus is made available by ImageJ 1.x, | |
you can pass it to ImgLib2 as an Img via ImageJFunctions.wrap(imp) | |
http://javadoc.scijava.org/ImgLib2/net/imglib2/img/display/imagej/ImageJFunctions.html | |
""" | |
from ij import IJ | |
from net.imglib2.img import ImagePlusAdapter | |
image = IJ.openImage() # opens a file picker, or you can add the filename string as an argument. | |
output = ImagePlusAdapter.wrapImgPlus(image) # |
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
/* | |
* Complex Format EXPORT MACRO | |
* By Olivier Burri @ EPFL - SV - PTECH - BIOP | |
* Given a folder, extracts all series inside all multi-file files with given extension in new folders | |
* Last edit: 13.02.2017 | |
*/ | |
////////////////////// SET PARAMETERS ////////////////////// | |
//////////////////////////////////////////////////////////// |
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
import java.io.IOException; | |
import java.nio.file.FileVisitResult; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.SimpleFileVisitor; | |
import java.nio.file.attribute.BasicFileAttributes; | |
class TempDirectory { | |
final Path path; |
NewerOlder