-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
2,651 additions
and
70 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
@echo off | ||
|
||
rem bf.bat: the batch file that actually launches a command line tool | ||
|
||
setlocal enabledelayedexpansion | ||
set BF_DIR=%~dp0 | ||
if "%BF_DIR:~-1%" == "\" set BF_DIR=%BF_DIR:~0,-1% | ||
|
||
rem Include the master configuration file. | ||
call "%BF_DIR%\config.bat" | ||
|
||
rem Check that a command to run was specified. | ||
if "%BF_PROG%" == "" ( | ||
echo The command to launch must be set in the BF_PROG environment variable. | ||
goto end | ||
) | ||
|
||
rem Set the max heap size. | ||
if "%BF_MAX_MEM%" == "" ( | ||
rem Set a reasonable default max heap size. | ||
set BF_MAX_MEM=512m | ||
) | ||
set BF_FLAGS=%BF_FLAGS% -Xmx%BF_MAX_MEM% | ||
|
||
rem Skip the update check if the NO_UPDATE_CHECK flag is set. | ||
if not "%NO_UPDATE_CHECK%" == "" ( | ||
set BF_FLAGS=%BF_FLAGS% -Dbioformats_can_do_upgrade_check=false | ||
) | ||
|
||
rem Run profiling if the BF_PROFILE flag is set. | ||
if not "%BF_PROFILE%" == "" ( | ||
if "%BF_PROFILE_DEPTH%" == "" ( | ||
rem Set default profiling depth | ||
set BF_PROFILE_DEPTH=30 | ||
) | ||
set BF_FLAGS=%BF_FLAGS% -agentlib:hprof=cpu=samples,depth=!BF_PROFILE_DEPTH!,file=%BF_PROG%.hprof | ||
) | ||
|
||
|
||
rem Use any available proxy settings. | ||
set BF_FLAGS=%BF_FLAGS% -Dhttp.proxyHost=%PROXY_HOST% -Dhttp.proxyPort=%PROXY_PORT% | ||
|
||
rem Run the command! | ||
if not "%BF_DEVEL%" == "" ( | ||
rem Developer environment variable set; launch with existing classpath. | ||
java %BF_FLAGS% %BF_PROG% %* | ||
goto end | ||
) | ||
|
||
rem Developer environment variable unset; add JAR libraries to classpath. | ||
if exist "%BF_JAR_DIR%\bioformats_package.jar" ( | ||
set BF_CP=%BF_CP%;"%BF_JAR_DIR%\bioformats_package.jar" | ||
) else if exist "%BF_JAR_DIR%\loci_tools.jar" ( | ||
set BF_CP=%BF_CP%;"%BF_JAR_DIR%\loci_tools.jar" | ||
) else if exist "%BF_JAR_DIR%\formats-gpl.jar" ( | ||
set BF_CP=%BF_CP%;"%BF_JAR_DIR%\formats-gpl.jar";"%BF_JAR_DIR%\bio-formats-tools.jar" | ||
) else ( | ||
rem Libraries not found; issue an error. | ||
echo Required JAR libraries not found. Please download: | ||
echo bioformats_package.jar | ||
echo from: | ||
echo http://downloads.openmicroscopy.org/latest/bio-formats5.1 | ||
echo and place in the same directory as the command line tools. | ||
goto end | ||
) | ||
|
||
java %BF_FLAGS% -cp "%BF_DIR%";%BF_CP% %BF_PROG% %* | ||
|
||
:end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/usr/bin/env bash | ||
|
||
# bf.sh: the script that actually launches a command line tool | ||
|
||
BF_DIR=`dirname "$0"` | ||
|
||
# Include the master configuration file. | ||
source "$BF_DIR/config.sh" | ||
|
||
# Check that a command to run was specified. | ||
if [ -z "$BF_PROG" ] | ||
then | ||
echo The command to launch must be set in the BF_PROG environment variable. | ||
exit 1 | ||
fi | ||
|
||
# Prepare the flags. | ||
if [ -z "$BF_FLAGS" ] | ||
then | ||
BF_FLAGS="" | ||
fi | ||
|
||
# Set the max heap size. | ||
if [ -z "$BF_MAX_MEM" ] | ||
then | ||
# Set a reasonable default max heap size. | ||
BF_MAX_MEM="512m" | ||
fi | ||
BF_FLAGS="$BF_FLAGS -Xmx$BF_MAX_MEM" | ||
|
||
# Skip the update check if the NO_UPDATE_CHECK flag is set. | ||
if [ -n "$NO_UPDATE_CHECK" ] | ||
then | ||
BF_FLAGS="$BF_FLAGS -Dbioformats_can_do_upgrade_check=false" | ||
fi | ||
|
||
# Run profiling if the BF_PROFILE flag is set. | ||
if [ -n "$BF_PROFILE" ] | ||
then | ||
# Set default profiling depth | ||
if [ -z "$BF_PROFILE_DEPTH" ] | ||
then | ||
BF_PROFILE_DEPTH="30" | ||
fi | ||
BF_FLAGS="$BF_FLAGS -agentlib:hprof=cpu=samples,depth=$BF_PROFILE_DEPTH,file=$BF_PROG.hprof" | ||
fi | ||
|
||
# Use any available proxy settings. | ||
BF_FLAGS="$BF_FLAGS -Dhttp.proxyHost=$PROXY_HOST -Dhttp.proxyPort=$PROXY_PORT" | ||
|
||
# Run the command! | ||
if [ -n "$BF_DEVEL" ] | ||
then | ||
# Developer environment variable set; launch with existing classpath. | ||
java $BF_FLAGS $BF_PROG "$@" | ||
else | ||
# Developer environment variable unset; add JAR libraries to classpath. | ||
if [ -e "$BF_JAR_DIR/bioformats_package.jar" ] | ||
then | ||
BF_CP="$BF_JAR_DIR/bioformats_package.jar:$BF_CP" | ||
elif [ -e "$BF_JAR_DIR/loci_tools.jar" ] | ||
then | ||
BF_CP="$BF_JAR_DIR/loci_tools.jar:$BF_CP" | ||
elif [ -e "$BF_JAR_DIR/formats-gpl.jar" ] | ||
then | ||
BF_CP="$BF_JAR_DIR/formats-gpl.jar:$BF_JAR_DIR/bio-formats-tools.jar:$BF_CP" | ||
else | ||
# Libraries not found; issue an error. | ||
echo "Required JAR libraries not found. Please download:" | ||
echo " bioformats_package.jar" | ||
echo "from:" | ||
echo " http://downloads.openmicroscopy.org/latest/bio-formats5.1" | ||
echo "and place in the same directory as the command line tools." | ||
exit 2 | ||
fi | ||
java $BF_FLAGS -cp "$BF_DIR:$BF_CP" $BF_PROG "$@" | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
# bfconvert: a script for converting image files between formats | ||
|
||
# Required JARs: loci_tools.jar or bioformats_package.jar | ||
|
||
RESOLVED_PATH=$(readlink -f "$0" 2>/dev/null \ | ||
|| perl -MCwd -le 'print Cwd::abs_path(shift)' "$0" 2>/dev/null \ | ||
|| echo "$0") | ||
BF_DIR=$(dirname $RESOLVED_PATH) | ||
|
||
BF_PROG=loci.formats.tools.ImageConverter "$BF_DIR/bf.sh" "$@" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@echo off | ||
|
||
rem bfconvert.bat: a batch file for converting image files between formats | ||
|
||
rem Required JARs: loci_tools.jar or bioformats_package.jar | ||
|
||
setlocal | ||
set BF_DIR=%~dp0 | ||
if "%BF_DIR:~-1%" == "\" set BF_DIR=%BF_DIR:~0,-1% | ||
|
||
set BF_PROG=loci.formats.tools.ImageConverter | ||
call "%BF_DIR%\bf.bat" %* |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@echo off | ||
|
||
rem config.bat: master configuration file for the batch files | ||
|
||
rem Running this command directly has no effect, | ||
rem but you can tweak the settings to your liking. | ||
|
||
rem Set the amount of RAM available to the command line tools. | ||
rem Use "m" suffix for megabytes, "g" for gigabytes; e.g., 2g = 2GB. | ||
rem set BF_MAX_MEM=1g | ||
|
||
rem Set the NO_UPDATE_CHECK flag to skip the update check. | ||
rem set NO_UPDATE_CHECK=1 | ||
|
||
rem If you are behind a proxy server, the host name and port must be set. | ||
rem set PROXY_HOST= | ||
rem set PROXY_PORT= | ||
|
||
rem If your CLASSPATH already includes the needed classes, | ||
rem you can set the BF_DEVEL environment variable to | ||
rem disable the required JAR library checks. | ||
rem set BF_DEVEL=1 | ||
|
||
rem Set the directory containing the JAR libraries. | ||
if "%BF_JAR_DIR%" == "" ( | ||
if exist "%BF_DIR%\..\artifacts" ( | ||
rem Batch files reside in a git working copy. | ||
rem Look for JARs in the artifacts directory. | ||
set BF_JAR_DIR=%BF_DIR%\..\artifacts | ||
) else ( | ||
rem Batch files reside in a standalone distribution. | ||
rem Look for JARs in the same directory as the batch files. | ||
set BF_JAR_DIR=%BF_DIR% | ||
) | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
# config.sh: master configuration file for the scripts | ||
|
||
# Running this command directly has no effect, | ||
# but you can tweak the settings to your liking. | ||
|
||
# Set the amount of RAM available to the command line tools. | ||
# Use "m" suffix for megabytes, "g" for gigabytes; e.g., 2g = 2 GB. | ||
#BF_MAX_MEM=1g | ||
|
||
# Set the NO_UPDATE_CHECK flag to skip the update check. | ||
#NO_UPDATE_CHECK=1 | ||
|
||
# If you are behind a proxy server, the host name and port must be set. | ||
#PROXY_HOST= | ||
#PROXY_PORT= | ||
|
||
# If your CLASSPATH already includes the needed classes, | ||
# you can set the BF_DEVEL environment variable to | ||
# disable the required JAR library checks. | ||
#BF_DEVEL=1 | ||
|
||
# Set the directory containing the JAR libraries. | ||
if [ -z "$BF_JAR_DIR" ] | ||
then | ||
if [ -d "$BF_DIR/../artifacts" ] | ||
then | ||
# Scripts reside in a git working copy. | ||
# Look for JARs in the artifacts directory. | ||
BF_JAR_DIR="$BF_DIR/../artifacts" | ||
else | ||
# Scripts reside in a standalone distribution. | ||
# Look for JARs in the same directory as the scripts. | ||
BF_JAR_DIR="$BF_DIR" | ||
fi | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
# domainlist: a script for listing supported domains in Bio-Formats | ||
|
||
# Required JARs: loci_tools.jar or bioformats_package.jar | ||
|
||
RESOLVED_PATH=$(readlink -f "$0" 2>/dev/null \ | ||
|| perl -MCwd -le 'print Cwd::abs_path(shift)' "$0" 2>/dev/null \ | ||
|| echo "$0") | ||
BF_DIR=$(dirname $RESOLVED_PATH) | ||
|
||
BF_PROG=loci.formats.tools.PrintDomains "$BF_DIR/bf.sh" "$@" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@echo off | ||
|
||
rem domainlist.bat: a batch file for listing supported domains in Bio-Formats | ||
|
||
rem Required JARs: loci_tools.jar or bioformats_package.jar | ||
|
||
setlocal | ||
set BF_DIR=%~dp0 | ||
if "%BF_DIR:~-1%" == "\" set BF_DIR=%BF_DIR:~0,-1% | ||
|
||
set BF_PROG=loci.formats.tools.PrintDomains | ||
call "%BF_DIR%\bf.bat" %* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
# formatlist: a script for listing supported formats in Bio-Formats | ||
|
||
# Required JARs: loci_tools.jar or bioformats_package.jar | ||
|
||
RESOLVED_PATH=$(readlink -f "$0" 2>/dev/null \ | ||
|| perl -MCwd -le 'print Cwd::abs_path(shift)' "$0" 2>/dev/null \ | ||
|| echo "$0") | ||
BF_DIR=$(dirname $RESOLVED_PATH) | ||
|
||
BF_PROG=loci.formats.tools.PrintFormatTable "$BF_DIR/bf.sh" "$@" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@echo off | ||
|
||
rem formatlist.bat: a batch file for listing supported formats in Bio-Formats | ||
|
||
rem Required JARs: loci_tools.jar or bioformats_package.jar | ||
|
||
setlocal | ||
set BF_DIR=%~dp0 | ||
if "%BF_DIR:~-1%" == "\" set BF_DIR=%BF_DIR:~0,-1% | ||
|
||
set BF_PROG=loci.formats.tools.PrintFormatTable | ||
call "%BF_DIR%\bf.bat" %* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env bash | ||
|
||
# ijview: a script for displaying an image file in ImageJ | ||
# using the Bio-Formats Importer plugin | ||
|
||
# Required JARs: loci_tools.jar or bioformats_package.jar, ij.jar | ||
|
||
|
||
RESOLVED_PATH=$(readlink -f "$0" 2>/dev/null \ | ||
|| perl -MCwd -le 'print Cwd::abs_path(shift)' "$0" 2>/dev/null \ | ||
|| echo "$0") | ||
BF_DIR=$(dirname $RESOLVED_PATH) | ||
|
||
source "$BF_DIR/config.sh" | ||
|
||
if [ -z "$BF_DEVEL" ] | ||
then | ||
# Developer environment variable unset; add JAR libraries to classpath. | ||
if [ -e "$BF_JAR_DIR/ij.jar" ] | ||
then | ||
BF_CP="$BF_JAR_DIR/ij.jar" | ||
else | ||
# Libraries not found; issue an error | ||
echo "Required JAR libraries not found. Please download:" | ||
echo " ij.jar" | ||
echo "from:" | ||
echo " http://imagej.nih.gov/ij/upgrade/" | ||
echo "and place in the same directory as the command line tools." | ||
echo "" | ||
exit 3 | ||
fi | ||
if [ -e "$BF_JAR_DIR/bio-formats_plugins.jar" ] | ||
then | ||
BF_CP="$BF_CP:$BF_JAR_DIR/bio-formats_plugins.jar" | ||
elif [ ! -e "$BF_JAR_DIR/loci_tools.jar" -a ! -e "$BF_JAR_DIR/bioformats_package.jar" ] | ||
then | ||
# Libraries not found; issue an error | ||
echo "Required JAR libraries not found. Please download:" | ||
echo " bioformats_package.jar" | ||
echo "from:" | ||
echo " http://www.openmicroscopy.org/site/products/bio-formats/downloads" | ||
echo "and place in the same directory as the command line tools." | ||
echo "" | ||
exit 4 | ||
fi | ||
fi | ||
|
||
BF_PROG=loci.plugins.in.Importer \ | ||
BF_CP="$BF_CP" "$BF_DIR/bf.sh" "$@" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
@echo off | ||
|
||
rem ijview.bat: a batch file for displaying an image file in ImageJ | ||
rem using the Bio-Formats Importer plugin | ||
|
||
rem Required JARs: loci_tools.jar or bioformats_package.jar, ij.jar | ||
|
||
setlocal | ||
set BF_DIR=%~dp0 | ||
if "%BF_DIR:~-1%" == "\" set BF_DIR=%BF_DIR:~0,-1% | ||
|
||
call "%BF_DIR%\config.bat" | ||
|
||
if "%BF_DEVEL%" == "" ( | ||
rem Developer environment variable unset; add JAR libraries to classpath. | ||
if exist "%BF_JAR_DIR%\ij.jar" ( | ||
set BF_CP="%BF_JAR_DIR%\ij.jar" | ||
) else ( | ||
rem Libraries not found; issue an error. | ||
echo Required JAR libraries not found. Please download: | ||
echo ij.jar | ||
echo from: | ||
echo http://imagej.nih.gov/ij/upgrade/ | ||
echo and place in the same directory as the command line tools. | ||
goto end | ||
) | ||
if exist "%BF_JAR_DIR%\bio-formats_plugins.jar" ( | ||
set BF_CP=%BF_CP%;"%BF_JAR_DIR%\bio-formats_plugins.jar" | ||
) else if not exist "%BF_JAR_DIR%\bioformats_package.jar" ( | ||
rem Libraries not found; issue an error. | ||
echo Required JAR libraries not found. Please download: | ||
echo bioformats_package.jar | ||
echo from: | ||
echo http://www.openmicroscopy.org/site/products/bio-formats/downloads | ||
echo and place in the same directory as the command line tools. | ||
goto end | ||
) | ||
) | ||
|
||
set BF_PROG=loci.plugins.in.Importer | ||
call "%BF_DIR%\bf.bat" %* | ||
|
||
:end |
Oops, something went wrong.