public class TestTools
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
TestTools.TileLoopIteration
A single iteration of a tile for each loop.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DIVIDER |
Constructor and Description |
---|
TestTools() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canFitInMemory(long bufferSize)
Returns true if a byte buffer of the given size will fit in memory.
|
static void |
createLogFile()
Deprecated.
|
static int |
forEachTile(TestTools.TileLoopIteration iteration,
int sizeX,
int sizeY,
int sizeZ,
int sizeC,
int sizeT,
int tileWidth,
int tileHeight)
Iterates over every tile in a given pixel buffer based on the over arching
dimensions and a requested maximum tile width and height.
|
static void |
getFiles(java.lang.String root,
java.util.List files,
ConfigurationTree config,
java.lang.String toplevelConfig)
Recursively generate a list of files to test.
|
static void |
getFiles(java.lang.String root,
java.util.List files,
ConfigurationTree config,
java.lang.String toplevelConfig,
java.lang.String[] subdirs)
Recursively generate a list of files to test.
|
static void |
getFiles(java.lang.String root,
java.util.List files,
ConfigurationTree config,
java.lang.String toplevelConfig,
java.lang.String[] subdirs,
java.lang.String configFileSuffix)
Recursively generate a list of files to test.
|
static long |
getUsedMemory()
Gets the quantity of used memory, in MB.
|
static boolean |
isIgnoredFile(java.lang.String file,
ConfigurationTree config)
Determines if the given file should be ignored by the test suite.
|
static boolean |
mapFile(java.lang.String id)
Map the given file into memory.
|
static java.lang.String |
md5(byte[] b)
Calculate the MD5 of a byte array.
|
static java.lang.String |
md5(byte[] b,
int offset,
int len)
Calculate the MD5 of a byte array.
|
static java.lang.String |
md5(byte[] b,
int sizeX,
int sizeY,
int posX,
int posY,
int width,
int height,
int bpp)
Calculate the MD5 of a byte array.
|
static java.lang.String |
sha1(byte[] b)
Calculate the SHA-1 of a byte array.
|
static java.lang.String |
sha1(byte[] b,
int offset,
int len)
Calculate the SHA-1 of a byte array.
|
static java.lang.String |
shortClassName(java.lang.Object o)
Gets the class name sans package for the given object.
|
public static final java.lang.String DIVIDER
public static java.lang.String sha1(byte[] b, int offset, int len)
public static java.lang.String sha1(byte[] b)
public static java.lang.String md5(byte[] b, int sizeX, int sizeY, int posX, int posY, int width, int height, int bpp)
public static java.lang.String md5(byte[] b, int offset, int len)
public static java.lang.String md5(byte[] b)
public static boolean canFitInMemory(long bufferSize)
public static long getUsedMemory()
public static java.lang.String shortClassName(java.lang.Object o)
@Deprecated public static void createLogFile()
public static void getFiles(java.lang.String root, java.util.List files, ConfigurationTree config, java.lang.String toplevelConfig)
public static void getFiles(java.lang.String root, java.util.List files, ConfigurationTree config, java.lang.String toplevelConfig, java.lang.String[] subdirs)
public static void getFiles(java.lang.String root, java.util.List files, ConfigurationTree config, java.lang.String toplevelConfig, java.lang.String[] subdirs, java.lang.String configFileSuffix)
public static boolean isIgnoredFile(java.lang.String file, ConfigurationTree config)
public static int forEachTile(TestTools.TileLoopIteration iteration, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT, int tileWidth, int tileHeight)
iteration
- Invoker to call for each tile.sizeX
- Width of the entire image.sizeY
- Height of the entire image.sizeZ
- Number of optical sections the image contains.sizeC
- Number of channels the image contains.sizeT
- Number of timepoints the image contains.tileWidth
- Maximum width of the tile requested. The tile
request itself will be smaller than the original tile width requested if
x + tileWidth > sizeX
.tileHeight
- Maximum height of the tile requested. The tile
request itself will be smaller if y + tileHeight > sizeY
.public static boolean mapFile(java.lang.String id) throws java.io.IOException
java.io.IOException
Copyright © 2014 Open Microscopy Environment