public class TestTools extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
TestTools.TileLoopIteration
A single iteration of a tile for each loop.
|
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(String root,
List files,
ConfigurationTree config,
String toplevelConfig)
Recursively generate a list of files to test.
|
static void |
getFiles(String root,
List files,
ConfigurationTree config,
String toplevelConfig,
String[] subdirs)
Recursively generate a list of files to test.
|
static void |
getFiles(String root,
List files,
ConfigurationTree config,
String toplevelConfig,
String[] subdirs,
String configFileSuffix)
Recursively generate a list of files to test.
|
static long |
getUsedMemory()
Gets the quantity of used memory, in MB.
|
static boolean |
isIgnoredFile(String file,
ConfigurationTree config)
Determines if the given file should be ignored by the test suite.
|
static boolean |
mapFile(String id)
Map the given file into memory.
|
static String |
md5(byte[] b)
Calculate the MD5 of a byte array.
|
static String |
md5(byte[] b,
int offset,
int len)
Calculate the MD5 of a byte array.
|
static 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 String |
sha1(byte[] b)
Calculate the SHA-1 of a byte array.
|
static String |
sha1(byte[] b,
int offset,
int len)
Calculate the SHA-1 of a byte array.
|
static String |
shortClassName(Object o)
Gets the class name sans package for the given object.
|
public static final String DIVIDER
public static String sha1(byte[] b, int offset, int len)
public static String sha1(byte[] b)
public static String md5(byte[] b, int sizeX, int sizeY, int posX, int posY, int width, int height, int bpp)
public static String md5(byte[] b, int offset, int len)
public static String md5(byte[] b)
public static boolean canFitInMemory(long bufferSize)
public static long getUsedMemory()
public static String shortClassName(Object o)
@Deprecated public static void createLogFile()
public static void getFiles(String root, List files, ConfigurationTree config, String toplevelConfig)
public static void getFiles(String root, List files, ConfigurationTree config, String toplevelConfig, String[] subdirs)
public static void getFiles(String root, List files, ConfigurationTree config, String toplevelConfig, String[] subdirs, String configFileSuffix)
public static boolean isIgnoredFile(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(String id) throws IOException
IOException
Copyright © 2014 Open Microscopy Environment