public class MetadataUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DOWN_AVERAGE |
static String |
DOWN_SAMPLE |
| Constructor and Description |
|---|
MetadataUtils() |
| Modifier and Type | Method and Description |
|---|---|
static N5CosemMetadata |
buildCosemMetadata(String path,
N5CosemMetadata baseMetadata,
double[] absoluteResolution,
double[] absoluteTranslation) |
static N5SingleScaleMetadata |
buildN5VMetadata(String path,
N5SingleScaleMetadata baseMetadata,
String downsampleMethod,
double[] baseResolution,
double[] downsamplingFactors) |
static NgffSingleScaleAxesMetadata |
buildNgffMetadata(String path,
NgffSingleScaleAxesMetadata baseMetadata,
double[] absoluteResolution,
double[] absoluteTranslation) |
static CoordinateTransformation<?>[] |
buildScaleTranslationTransformList(double[] scale,
double[] translation) |
static String |
canonicalPath(N5TreeNode parent,
String child) |
static String |
canonicalPath(String parent,
String child) |
static net.imglib2.realtransform.ScaleAndTranslation |
coordinateTransformToScaleAndTranslation(CoordinateTransformation<?> ct) |
static long[] |
downsamplingFactors(long factor,
long[] dimensions,
String[] types) |
static String |
getStringNullable(com.google.gson.JsonElement element)
Gets a String from a
JsonElement if possible, returning null if the
element is JsonNull. |
static <M extends N5DatasetMetadata> |
metadataForThisScale(String newPath,
M baseMetadata,
String downsampleMethod,
double[] baseResolution,
double[] absoluteDownsamplingFactors,
double[] absoluteScale,
double[] absoluteTranslation) |
static double[] |
mul(double[] a,
double[] b) |
static double[] |
mul(double[] a,
long[] b) |
static String |
normalizeGroupPath(String path) |
static N5CosemMetadata |
permuteCosemMetadata(N5CosemMetadata metadata,
int[] axisPermutation) |
static N5SingleScaleMetadata |
permuteN5vMetadata(N5SingleScaleMetadata metadata,
int[] axisPermutation) |
static NgffSingleScaleAxesMetadata |
permuteNgffMetadata(NgffSingleScaleAxesMetadata metadata,
int[] axisPermutation) |
static <M extends N5Metadata> |
permuteSpatialMetadata(M metadata,
int[] axisPermutation) |
static double[] |
pow(double[] x,
int d)
Element-wise power.
|
static String |
relativePath(String parent,
String child)
Returns a relative group path from the child absolute path group path child
the parent absolute group path.
|
static com.google.gson.JsonArray |
reversedCopy(com.google.gson.JsonArray array) |
static <T> T[] |
reversedCopy(T[] array)
Creates a new array containing all elements of the input array in reversed order.
|
static double[][] |
scalesAndTranslations(double[] baseScale,
double[] downsamplingFactors,
int numLevels) |
static net.imglib2.realtransform.ScaleAndTranslation |
scaleTranslationFromCoordinateTransformations(CoordinateTransformation<?>[] cts) |
static net.imglib2.realtransform.AffineGet |
scaleTranslationTransforms(double[] scale,
double[] translation)
Returns the most efficient transform given the input scale and translation parameters.
|
static N5SingleScaleMetadata |
setDatasetAttributes(N5SingleScaleMetadata baseMetadata,
N5DatasetMetadata datasetMetadata)
Returns a new
N5SingleScaleMetadata equal to the baseMetadata, but with
DatasetAttributes coming from datasetMetadata.ew
|
static N5SingleScaleMetadata[] |
updateChildrenDatasetAttributes(N5SingleScaleMetadata[] baseMetadata,
N5DatasetMetadata[] datasetMetadata) |
static void |
updateChildrenMetadata(N5TreeNode parent,
N5Metadata[] childrenMetadata,
boolean relative) |
static long[] |
updateDownsamplingFactors(long factor,
long[] baseFactors,
long[] dimensions,
String[] types) |
public static final String DOWN_SAMPLE
public static final String DOWN_AVERAGE
public static double[] mul(double[] a,
double[] b)
public static double[] mul(double[] a,
long[] b)
public static double[][] scalesAndTranslations(double[] baseScale,
double[] downsamplingFactors,
int numLevels)
public static long[] downsamplingFactors(long factor,
long[] dimensions,
String[] types)
public static long[] updateDownsamplingFactors(long factor,
long[] baseFactors,
long[] dimensions,
String[] types)
public static CoordinateTransformation<?>[] buildScaleTranslationTransformList(double[] scale, double[] translation)
public static net.imglib2.realtransform.ScaleAndTranslation scaleTranslationFromCoordinateTransformations(CoordinateTransformation<?>[] cts)
public static net.imglib2.realtransform.ScaleAndTranslation coordinateTransformToScaleAndTranslation(CoordinateTransformation<?> ct)
public static N5SingleScaleMetadata setDatasetAttributes(N5SingleScaleMetadata baseMetadata, N5DatasetMetadata datasetMetadata)
N5SingleScaleMetadata equal to the baseMetadata, but with
DatasetAttributes coming from datasetMetadata.ew
baseMetadata - metadatadatasetMetadata - dataset metadatapublic static N5SingleScaleMetadata[] updateChildrenDatasetAttributes(N5SingleScaleMetadata[] baseMetadata, N5DatasetMetadata[] datasetMetadata)
public static void updateChildrenMetadata(N5TreeNode parent, N5Metadata[] childrenMetadata, boolean relative)
public static String canonicalPath(N5TreeNode parent, String child)
public static String relativePath(String parent, String child)
parent - an absolute pathchild - an absolute pathpublic static double[] pow(double[] x,
int d)
x - arrayd - exponentpublic static String getStringNullable(com.google.gson.JsonElement element)
JsonElement if possible, returning null if the
element is JsonNull.element - the json elementpublic static net.imglib2.realtransform.AffineGet scaleTranslationTransforms(double[] scale, double[] translation)
scale - the scale parameterstranslation - the translation parameterspublic static <M extends N5DatasetMetadata> M metadataForThisScale(String newPath, M baseMetadata, String downsampleMethod, double[] baseResolution, double[] absoluteDownsamplingFactors, double[] absoluteScale, double[] absoluteTranslation)
public static N5SingleScaleMetadata buildN5VMetadata(String path, N5SingleScaleMetadata baseMetadata, String downsampleMethod, double[] baseResolution, double[] downsamplingFactors)
public static N5CosemMetadata buildCosemMetadata(String path, N5CosemMetadata baseMetadata, double[] absoluteResolution, double[] absoluteTranslation)
public static NgffSingleScaleAxesMetadata buildNgffMetadata(String path, NgffSingleScaleAxesMetadata baseMetadata, double[] absoluteResolution, double[] absoluteTranslation)
public static <M extends N5Metadata> M permuteSpatialMetadata(M metadata, int[] axisPermutation)
public static NgffSingleScaleAxesMetadata permuteNgffMetadata(NgffSingleScaleAxesMetadata metadata, int[] axisPermutation)
public static N5CosemMetadata permuteCosemMetadata(N5CosemMetadata metadata, int[] axisPermutation)
public static N5SingleScaleMetadata permuteN5vMetadata(N5SingleScaleMetadata metadata, int[] axisPermutation)
public static <T> T[] reversedCopy(T[] array)
T - the type of elements in the arrayarray - the input array to be reversedpublic static com.google.gson.JsonArray reversedCopy(com.google.gson.JsonArray array)
Copyright © 2021–2026 Saalfeld Lab. All rights reserved.