public final class Utils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Utils.ReconstructSectionIndexComparator |
Modifier and Type | Method and Description |
---|---|
static void |
appendBezierPathXML(StringBuilder sb,
double[] dpts) |
static void |
appendClosedPathXML(StringBuilder sb,
double[] pts) |
static void |
appendOpenPathXML(StringBuilder sb,
double[] dpts) |
static double[] |
createNodeValueVector(String val) |
static float[] |
doubleToFloat(double[] doubles) |
static <T extends ContourSet> |
findContourByName(List<T> contours,
String name) |
static Element |
findElementByAttribute(NodeList list,
String name,
String value) |
static Element |
findElementByAttributeRegex(NodeList list,
String name,
String regex) |
static Element |
getFirstImageTransformElement(Document doc)
Finds the first Transform Element with an Image child node.
|
static Element |
getImageDomainContour(Node image) |
static ArrayList<Element> |
getImageTransformElements(Document doc)
Finds all Transform Elements with Image children.
|
static double |
getMag(Document d) |
static double |
getMag(Node n) |
static double |
getMedianMag(List<Document> sectionList) |
static double[] |
getPathExtent(double[] pts) |
static double[] |
getReconstructBoundingBox(double[] wh,
AffineTransform trans) |
static double[] |
getReconstructImageWH(Node image) |
static double[] |
getReconstructImageWH(Node image,
double[] wh) |
static double[] |
getReconstructStackSize(List<Document> sections) |
static ArrayList<String> |
getSeriesKeys() |
static double[] |
getTransformedPoints(Element contour,
double stackHeight,
double mag) |
static String |
hexColor(String inColor) |
static int |
nodeValueToVector(String val,
double[] matrix) |
static AffineTransform |
reconstructTransform(Element trans,
double mag,
double k) |
static AffineTransform |
reconstructTransform(Element trans,
double mag,
double k,
double zoom) |
static AffineTransform |
reconstructTransform(Element trans,
double mag,
double k,
double zoom,
boolean doFlip) |
static int |
sectionIndex(Node n) |
static void |
selectElementsByIndex(List<Element> elementList,
List<Integer> indexList,
List<Element> outputList,
int index) |
static String |
stackTraceToString(Throwable t) |
static String |
transformToString(AffineTransform trans) |
static String |
transformToString(double[] matrix) |
public static final String DELIM
public static int sectionIndex(Node n)
public static AffineTransform reconstructTransform(Element trans, double mag, double k)
public static AffineTransform reconstructTransform(Element trans, double mag, double k, double zoom)
public static AffineTransform reconstructTransform(Element trans, double mag, double k, double zoom, boolean doFlip)
public static String transformToString(AffineTransform trans)
public static String transformToString(double[] matrix)
public static double[] getReconstructBoundingBox(double[] wh, AffineTransform trans)
public static Element findElementByAttributeRegex(NodeList list, String name, String regex)
public static Element findElementByAttribute(NodeList list, String name, String value)
public static double[] createNodeValueVector(String val)
public static int nodeValueToVector(String val, double[] matrix)
public static Element getFirstImageTransformElement(Document doc)
doc
- the section XML Documentpublic static ArrayList<Element> getImageTransformElements(Document doc)
doc
- the section XML Documentpublic static double[] getReconstructImageWH(Node image)
public static double[] getReconstructImageWH(Node image, double[] wh)
public static <T extends ContourSet> T findContourByName(List<T> contours, String name)
public static void selectElementsByIndex(List<Element> elementList, List<Integer> indexList, List<Element> outputList, int index)
public static void appendOpenPathXML(StringBuilder sb, double[] dpts)
public static void appendClosedPathXML(StringBuilder sb, double[] pts)
public static void appendBezierPathXML(StringBuilder sb, double[] dpts)
public static double getMag(Document d)
public static double getMag(Node n)
public static double[] getTransformedPoints(Element contour, double stackHeight, double mag)
public static double[] getPathExtent(double[] pts)
public static float[] doubleToFloat(double[] doubles)
Copyright © 2015–2021 Fiji. All rights reserved.