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
library(wholebrain) | |
#set folder path | |
folder<-'/Users/danielfurth/Desktop/an_example_animal/section001' | |
#find out how many images we have and their location | |
images<-get.images(folder) | |
length(images) | |
#stitch this 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
################################ | |
# (c) Daniel Fürth, 2016 | |
# Spatial Transcriptomics with WholeBrain | |
################################ | |
#set the anterior poster coordinate of brin section in millimeter | |
coordinate.for.section<- -0.42 | |
#set filter for Cy3 spots | |
feature.filter <-structure(list(alim = c(120, 1000), threshold.range = c(14L, 255 |
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
library(rstan) | |
gaussianMM<-' | |
data { | |
int K; | |
int N; | |
real x[N]; | |
} | |
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
brew install python3 | |
brew install coreutils | |
brew tap caskroom/cask | |
brew cask install cuda | |
nano ~/.bash_profile | |
#paste in the following |
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
void createWeb::run(cv::Mat& sourceImage, cv::Mat& dstImage){ | |
int tiers; | |
int height = sourceImage.rows; | |
int width = sourceImage.cols; | |
int maxdim = (width > height ? width : height); | |
tiers = (int)log2(maxdim/256); | |
if((maxdim/pow(2, tiers))>256){ |
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
## readroi.R - Read ImageJ files in to R | |
## Copyright (C) 2011 David C. Sterratt <david.c.sterratt@ed.ac.uk> | |
## This program is free software: you can redistribute it and/or modify | |
## it under the terms of the GNU General Public License as published by | |
## the Free Software Foundation, either version 3 of the License, or | |
## (at your option) any later version. | |
## This program is distributed in the hope that it will be useful, | |
## but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
#just change the numbers here. | |
# alim = area limits of the soma, lower and upper | |
# threshold.range = where in intesnity to look for neurons, lower and upper. | |
# eccentricity = the roundness of neurons, lower means rounder. | |
# Max = the maximum intensity to do 8 bit rendering on (just for display purposes). | |
# Min = the minimum intensity to do 8 bit rendering on (just for display purposes). | |
# brain.threshold = the intensity where you find the autofluorescent outline of the brain section. | |
# resize = resizing parameter to match atlas and your brain section. | |
# blur = blurring (higher = more) to apply to the contour of the brain if you have damaged tissue etc. | |
# downsample = how much to downsample the image to reduce image processing speed. |
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
library(wholebrain) | |
#set folder path | |
folder<-'/Users/ameetrahane/Lab/Widlbrecht_Lab/brain-tissue-analysis/sectioned_test_1' | |
setwd(folder) | |
subfolders <- list.dirs(path = ".", full.names = TRUE, recursive = TRUE) | |
data <- data.frame() | |
#map to atlas coordinates | |
#set cutting thickness in millimeters | |
distance.between.sections <- 0.1 |
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
imgSWT <- function(input, filter=NULL, scales=6, cell.bodies = 3, processes = 5, family='db2', sigma=10, processLength=12, alim=c(200, 500), pch=21, bg="white", cex=2, lwd=2, illustrator=F, output='waveletoutput') { | |
file <- as.character(input)[1] | |
family <- as.character(family)[1] | |
outputfile <- as.character(output)[1] | |
scales<-as.integer(scales) | |
cellBodies<-as.integer(cell.bodies) | |
processes <- as.integer(processes) | |
sigmaR<-as.integer(sigma) | |
processLength<-as.integer(processLength) | |
areaSize<-alim |
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
#' Sticthing on a Perkin-Elmer instrument | |
#' | |
#' This function allows you to stitch image tiles from Perkin Elmer Harmony software contained in a single folder. | |
#' @param folder a path to a folder containing image tiles in TIFF format and XML file for metadata. | |
#' @param digits number of significant digits to round up the position X,Y reported by Harmony XML metadata (this is used for matching). | |
#' @return a character vector with images that have been stitched. | |
#' @keywords perkin-elmer | |
#' @export | |
#' @examples | |
#' stitch.perkin.elmer('./Images') |
OlderNewer