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
/* | |
Author: LESLIE SOLORZANO (do not erase name) | |
if you make changes then add your name but | |
don't delete mine to make it look like it's yours. | |
*/ | |
def annotations = getAnnotationObjects() | |
def imageData = getCurrentImageData() | |
def name = GeneralTools.getNameWithoutExtension(imageData.getServer().getMetadata().getName()) | |
def path = "/home/leslie/Downloads/"+name+".json" |
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 matplotlib.pyplot as plt | |
from matplotlib.colors import ListedColormap | |
import pandas as pd | |
import numpy as np | |
import seaborn as sns | |
def plotUMAP(indf,colx,coly,colz,color_col=None,s=5,marker=".",frac=1,linewidths=0,xlim=[-4.0, 15.0],ylim=[-4.0, 15.0],edgecolors=None): | |
fig=plt.figure(figsize=(9,3),dpi=500) | |
cycled = [colx,coly,colz,colx] | |
adf=indf.sample(frac=frac) |
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 json | |
import matplotlib.pyplot as plt | |
import numpy as np | |
class NumpyEncoder(json.JSONEncoder): | |
""" Custom encoder for numpy data types """ | |
def default(self, obj): | |
if isinstance(obj, (np.int_, np.intc, np.intp, np.int8, | |
np.int16, np.int32, np.int64, np.uint8, | |
np.uint16, np.uint32, np.uint64)): |
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
// Title: Importig Annotation path objects after classifying outside of QuPath | |
// Author: Leslie Solorzano | |
// Date: 9 dec 2020 | |
import qupath.lib.objects.PathObjects | |
import qupath.lib.roi.ROIs | |
import qupath.lib.regions.ImagePlane | |
import qupath.lib.io.GsonTools | |
import qupath.lib.geom.Point2 | |
import qupath.lib.objects.classes.PathClass |
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
location="/home/leslie/Documents/alphaamd/" | |
imgs=["cells2little.png"] | |
def drawboxesat(pdx, iw, ih, q): | |
step=1/q | |
for x in range(iw): | |
for y in range(ih): | |
intensity=pdx[(x,y)][0] | |
if intensity==0: |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<html> | |
<head> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/p5.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> | |
<script src="/home/leslie/Downloads/iWildCam_2019_iNat_Idaho.json"></script> | |
<script src="/home/leslie/Downloads/iWildCam_2019_CCT_Bboxes.json"></script> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" |
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
var exampleapp={ | |
starCount:0, | |
OSDviewer: null, | |
init: function(){ | |
var OSDviewer = OpenSeadragon(this.OSDOptions); | |
this.OSDviewer=OSDviewer; | |
this.OSDsvgov=this.OSDviewer.svgOverlay(); | |
var click_handler= function(event) { | |
if(event.quick){ |
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
close all | |
clear all | |
fname ='C:\Users\Administrator\Documents\Leslie\Uppsala\registered161101\crops\b1-2-0001-1757-1887-White Top Hat.tif'; | |
info = imfinfo(fname); | |
num_images = numel(info); | |
w =info.Width; | |
h= info.Height; |
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
clear all; | |
base=5; | |
if(base==1) | |
b3=imread('MAX_base_1_ch3.tif'); | |
b4=imread('MAX_base_1_ch4.tif'); | |
b5=imread('MAX_base_1_ch5.tif'); | |
b6=imread('MAX_base_1_ch6.tif'); | |
finalname='b1-color.tif'; |
NewerOlder