This file contains hidden or 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
ExportPlot <- function(gplot, filename, width=2, height=1.5) { | |
# Export plot in PDF and EPS. | |
# Notice that A4: width=11.69, height=8.27 | |
ggsave(paste(filename, '.pdf', sep=""), gplot, width = width, height = height) | |
postscript(file = paste(filename, '.eps', sep=""), width = width, height = height) | |
print(gplot) | |
dev.off() | |
png(file = paste(filename, '_.png', sep=""), width = width * 100, height = height * 100) | |
print(gplot) | |
dev.off() |
This file contains hidden or 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
# encoding: utf-8 | |
"""Experimental Solr Grouping / Field Collapsing backend for Haystack 2.0""" | |
# NOTE: You must be running the latest Pysolr master - no PyPI release yet! | |
# See https://gist.github.com/3750774 for the current version of this code | |
# See http://wiki.apache.org/solr/FieldCollapsing for the Solr feature documentation | |
from __future__ import absolute_import | |
import logging | |
from django.db.models.loading import get_model |
This file contains hidden or 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
;; Tetrahedron intersection based on this paper & algorithm: | |
;; http://vcg.isti.cnr.it/Publications/2003/GPR03/fast_tetrahedron_tetrahedron_overlap_algorithm.pdf | |
;; | |
;; Unlike original algorithm this implementation produces correct | |
;; results regardless of the orientation/ordering of points defining | |
;; the two tetrahedra. This is achieved via the orient-tetra function, | |
;; which ensures the correct ordering of vertices for this algorithm | |
;; to function properly. | |
;; | |
;; Implementation extracted from upcoming geometry library |
This file contains hidden or 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
/* | |
* Complex Format EXPORT MACRO | |
* By Olivier Burri @ EPFL - SV - PTECH - BIOP | |
* Given a folder, extracts all series inside all multi-file files with given extension in new folders | |
* Last edit: 13.02.2017 | |
*/ | |
////////////////////// SET PARAMETERS ////////////////////// | |
//////////////////////////////////////////////////////////// |
This file contains hidden or 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
# APPLY VOLUME MERGE ANNOTATION | |
# | |
# This script applies a webKnossos merger mode annotation | |
# to a given segmentation layer. The script will output a | |
# TIFF image sequence. | |
# | |
# The --set_zero flag will relabel all non-annotated segments | |
# to 0. | |
# | |
# 1. Download the merger mode NML file. |