Skip to content

Instantly share code, notes, and snippets.

@miura
miura / imageToText.gs
Created July 28, 2017 00:44 — forked from tagplus5/imageToText.gs
google apps script image to text ocr
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 December 9, 2016 21:30 — forked from PMLLancao/FRET MAP
Calculation for FRET Maps.
macro "Ratiometric FRET" {
path = getDirectory("Choose a Directory");
list = getFileList(path);
length = list.length;
File.makeDirectory(path + "Imaging/");
//FRET map creation
function onOpen() {
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}];
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addMenu("Fitness Diaries", menuEntries);
}
function createDocFromSheet(){
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries
// get the data from an individual user
@miura
miura / gist:6540331
Created September 12, 2013 16:27 — forked from mhawksey/gist:1170597
function onOpen() {
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}];
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addMenu("Fitness Diaries", menuEntries);
}
function createDocFromSheet(){
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries
// get the data from an individual user
from fiji.threshold import Auto_Local_Threshold as ALT
from ij.gui import Roi
from imagescience.image import Image
from imagescience.feature import Laplacian
from process3d import Erode_, Dilate_, MinMaxMedian
from process3d import DistanceTransform3D as D3D
from Utilities import Counter3D
from ij.plugin import Thresholder, GaussianBlur3D, ZProjector, Duplicator
from ij.process import ImageProcessor
import os, csv
from fiji.threshold import Auto_Local_Threshold as ALT
from ij.gui import Roi
from imagescience.image import Image
from imagescience.feature import Laplacian
from process3d import Erode_, Dilate_, MinMaxMedian
from process3d import DistanceTransform3D as D3D
from Utilities import Counter3D
from ij.plugin import Thresholder, GaussianBlur3D, ZProjector, Duplicator
from ij.process import ImageProcessor
//==============================================================================
//
// Project: EDF - Extended Depth of Focus
//
// Author: Alex Prudencio (headless hack by Kota Miura and Christian Tischer, christian.tischer@embl.de)
//
// Organization: Biomedical Imaging Group (BIG)
// Ecole Polytechnique Federale de Lausanne (EPFL), Lausanne, Switzerland
//
// Information: http://bigwww.epfl.ch/demo/edf/
@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>
@miura
miura / gist:3872805
Created October 11, 2012 14:33 — forked from rendicahya/gist:3872597
ImageJ Problem
File file = new File(path);
if (file.exists()) {
ImagePlus image = IJ.openImage(file.getAbsolutePath());
System.out.println(image.getTitle());
ImagePlus[] split = ChannelSplitter.split(image);
if (split != null) {
System.out.println("SPLIT OK");
} else {
@miura
miura / Marimekko.R
Created October 10, 2012 21:32 — forked from dsparks/Marimekko.R
Simplest marimekko/mosaic plot
# Simplest possible marimekko/mosaic plot
doInstall <- TRUE # Change to FALSE if you don't want packages installed.
toInstall <- c("vcd", "ggplot2", "RColorBrewer")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
theme_set(theme_gray(base_size = 7))
# All you need to start with is individual count data, and a grouping variable