Class VtkUtils


  • public class VtkUtils
    extends Object
    • Constructor Detail

      • VtkUtils

        public VtkUtils()
    • Method Detail

      • parseDataArray

        public static Number[] parseDataArray​(Node dataArrayNode,
                                              XPath xpath)
                                       throws XPathExpressionException,
                                              DataFormatException,
                                              IOException
        Parses a node and returns an array of Numbers of the correct type (specified by the "type" attribute). This assumes that binary data is compressed with zlib, and uses Little Endian byte order. Supports "ascii" and "binary" formats, and "Float32" and "Int32" data types.
        Parameters:
        dataArrayNode - The Node in the DOM
        xpath - An XPath object to evaluate expressions with. This will have already been created when finding the Node, so there is no point instantiating a new one for this class
        Returns:
        An array of Numbers
        Throws:
        DataFormatException
        IOException
        XPathExpressionException
      • parseDataArray

        public static Number[] parseDataArray​(Node dataArrayNode,
                                              XPath xpath,
                                              float[] fillVals)
                                       throws DataFormatException,
                                              IOException,
                                              XPathExpressionException
        Parses a node and returns an array of Numbers of the correct type (specified by the "type" attribute). This assumes that binary data is compressed with zlib, and uses Little Endian byte order. Supports "ascii" and "binary" formats, and "Float32" and "Int32" data types.
        Parameters:
        dataArrayNode - The Node in the DOM
        xpath - An XPath object to evaluate expressions with. This will have already been created when finding the Node, so there is no point instantiating a new one for this class
        fillVals - An array of values which are considered to be fill values. These will be returned as nulls.
        Returns:
        An array of Numbers
        Throws:
        DataFormatException
        IOException
        XPathExpressionException
      • dateTimeFromOLEAutomationString

        public static org.joda.time.DateTime dateTimeFromOLEAutomationString​(String dateStr)
      • numberArrayToDoubleList

        public static List<Double> numberArrayToDoubleList​(Number[] na)