Skip to content

Instantly share code, notes, and snippets.

View 3D rendering of the results of Tumor Blood Vessels: 3D Tubular Network Analysis
// 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;
View ImageJ macro syntax highlighting in LaTex
\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
View tempcolorcodeFix.ijm
//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;
View pruning.bsh
// @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 / IJ macro course codes
Last active May 9, 2019
IJ macro course codes
View 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;
@miura
miura / settings.local.php
Last active May 10, 2018
template settings local file for bise.
View settings.local.php
<?php
/** database settings
**/
//$databases['default']['default'] = [
// 'database' => getenv('MYSQL_DATABASE'),
// 'driver' => 'mysql',
// 'host' => getenv('MYSQL_HOSTNAME'),
// 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
View prism_ijm.js
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+markdown&plugins=line-numbers+file-highlight */
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e){var t=n.util.type(e);switch(t){case"Object":var a={};for(var r in e)e.hasOwnProperty(r)&&(a[r]=n.util.clone(e[r]));return a;case"Array":return e.map(function(e){return n.util.clone(e)})}return e}},languages:{extend:function(e,t){var a=n.util.clone(n.langua
@miura
miura / imageToText.gs
Created Jul 28, 2017 — forked from tagplus5/imageToText.gs
google apps script image to text ocr
View imageToText.gs
function doGet(request) {
if (request.parameters.url != undefined && request.parameters.url != "") {
var imageBlob = UrlFetchApp.fetch(request.parameters.url).getBlob();
var resource = {
title: imageBlob.getName(),
mimeType: imageBlob.getContentType()
};
var options = {
ocr: true
};
@miura
miura / FRET MAP
Last active Dec 9, 2016 — forked from PMLLancao/FRET MAP
Calculation for FRET Maps.
View FRET MAP
macro "Ratiometric FRET" {
path = getDirectory("Choose a Directory");
list = getFileList(path);
length = list.length;
File.makeDirectory(path + "Imaging/");
//FRET map creation
@miura
miura / gist:6e0682c73e732426c699a5842c0101ce
Created Jul 14, 2016
`fiji --headless test.py` error
View gist:6e0682c73e732426c699a5842c0101ce
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
error importing site
Traceback (most recent call last):
File "/Users/miura/.m2/repository/org/scijava/jython-shaded/2.5.3/jython-shaded-2.5.3.jar/site$py.class", line 62, in <module>
File "/Users/miura/.m2/repository/org/scijava/jython-shaded/2.5.3/jython-shaded-2.5.3.jar/os$py.class", line 50, in <module>
java.lang.ArrayIndexOutOfBoundsException: 8
at org.python.objectweb.asm.ClassReader.a(Unknown Source)
at org.python.objectweb.asm.ClassReader.accept(Unknown Source)
at org.python.objectweb.asm.ClassReader.accept(Unknown Source)