Skip to content

Instantly share code, notes, and snippets.

from ij import ImagePlus, IJ
from emblcmci import BleachCorrection
url = "/home/miura/yeastNucleus2DT.tif"
imp = ImagePlus(url)
print imp.getStackSize()
bc = BleachCorrection()
### simple rtio method
from ij import IJ
from ij3d import Image3DUniverse, Content
flyurl = "http://imagej.nih.gov/ij/images/flybrain.zip"
imp = IJ.openImage(flyurl)
univ = Image3DUniverse()
univ.show()
c = univ.addVoltex(imp)
from ij import ImagePlus, ImageStack
{
"WFE_output_params_file": "wfe_module_params_1.json",
"3d_image_stack" : "/input/Skeleton.tif",
"prune_cycle_method": "shortest branch",
"prune_ends": false
}
@miura
miura / settings.local.php
Last active October 26, 2021 07:19
template settings local file for bise.
<?php
/** database settings
**/
//$databases['default']['default'] = [
// 'database' => getenv('MYSQL_DATABASE'),
// 'driver' => 'mysql',
// 'host' => getenv('MYSQL_HOSTNAME'),
// 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
// @ImagePlus(label="Skeleton image", description="Binary image skeletonized with Skeletonize3D") image
// @double(label="Length threshold", description="Minimum branch length to keep") threshold
// @OUTPUT ImagePlus prunedImage
// https://forum.image.sc/t/skeletonize-remove-or-prune-short-end-segments/4704
import sc.fiji.analyzeSkeleton.AnalyzeSkeleton_;
import sc.fiji.analyzeSkeleton.Edge;
import sc.fiji.analyzeSkeleton.Point;
import ij.IJ;
@miura
miura / ImageJ Macro.plist
Created October 21, 2012 15:26
ImageJ macro syntax highlighting definition for CotEditor
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>charactersArray</key>
<array>
<dict>
<key>beginString</key>
<string>'</string>
<key>endString</key>
// ImageJ macro
//*** change the window title here, depending on your input image.
OriginalTitle = "BloodVessels_small.tif";
// following window titles are always same.
LabelMask = "FastFiltered_Tubeness_LabelMask.tif";
tagged = "FastFiltered_Tubeness_LabelMask_Skeleton_tagged_skeleton.tif";
VisualisationDilation = 2;
Nthreads = 4;
\lstdefinelanguage{IJM}{%
language = Java,
morekeywords = {var, macro, return, function, get, set, is,
abs, acos, Array, asin, atan, atan2, autoUpdate, beep, bitDepth, calibrate, call, changeValues, charCodeAt, close, cos, d2s, debug, Dialog, doCommand, doWand, drawLine, drawOval, drawRect, drawString, dump, endsWith, eval, exec, exit, exp, File, fill, fillOval, fillRect, Fit, floodFill, floor, fromCharCode, getArgument, getBoolean, getBoundingRect, getCursorLoc, getDateAndTime, getDimensions, getDirectory, getDir, getDisplayedArea, getFileList, getFontList, getHeight, getHistogram, getImageID, getImageInfo, getInfo, getLine, getList, getLocationAndSize, getLut, getMetadata, getMinAndMax, getNumber, getPixel, getPixelSize, getProfile, getRawStatistics, getResult, getResultString, getResultLabel, getSelectionBounds, getSelectionCoordinates, getSliceNumber, getStatistics, getString, getStringWidth, getThreshold, getTime, getTitle, getValue, getVoxelSize, getVersion, getWidth, getZoom, IJ, imageCalcul
//20200909 Kota Miura
// temporal colorcode fix
testpath = "/Users/miura/Desktop/tmp/rewritemacro/Temporal-Color_Code.ijm";
ijmpath = testpath;
ijpluginDir = getDir("plugins");
thefile = ijpluginDir + "Scripts/Image/Hyperstacks/Temporal-Color_Code.ijm";
ijmpath = thefile;
@miura
miura / IJ macro course codes
Last active May 9, 2019 10:22
IJ macro course codes
//variables
a = 1;
b = 2;
c = a + b;
print("\\Clear");
print( c );
print(a, "+", b, "=", c);
//variables, exercise, an example answer
a = 1;