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
// Requirements: | |
// Trainable Weka Segmentation | |
// The list of files to use for training must be described in a text file, | |
// with each line containing the full path to one image. | |
listOfImages = File.openDialog("Choose a file with a list of images:"); | |
imagesString = File.openAsString(listOfImages); | |
images = split(imagesString, "\n"); | |
for (i=0; i<images.length; i++) { |
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
def copy_lut(from_layer, to_layer, opacity=False): | |
""" | |
Copies the visualization properties from one layer to another in napari. | |
Only the colormap, contrast limits, and gamma values are included by default. | |
The opacity can be optionally copied as well. | |
Blending and interpolation are ignored. | |
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 os | |
import napari | |
from skimage.io import imread, imsave | |
def napari_count_tfpn(screenshot_file, point_size=20, save_screenshot=True): | |
""" | |
Opens a napari window and initializes three points layers: | |
- "True Positives" with green points | |
- "False Positives" with red points | |
- "False Negatives" with yellow points |
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
# Inspired by https://gist.github.com/JeffPaine/3083347 | |
# Access full state names using us_states.keys() | |
# Access all state abbreviations using us_states.values() | |
us_states = { | |
'Alabama': 'AL', | |
'Alaska': 'AK', | |
'Arizona': 'AZ', | |
'Arkansas': 'AR', | |
'California': 'CA', | |
'Colorado': 'CO', |
OlderNewer