Class ByteArrayImage2ByteTransformer

  • All Implemented Interfaces:
    science.aist.jack.general.transformer.BackwardCollectionTransformer<byte[],​ImageWrapper<short[][][]>>, science.aist.jack.general.transformer.BackwardTransformer<byte[],​ImageWrapper<short[][][]>>, science.aist.jack.general.transformer.ForwardCollectionTransformer<byte[],​ImageWrapper<short[][][]>>, science.aist.jack.general.transformer.ForwardTransformer<byte[],​ImageWrapper<short[][][]>>, science.aist.jack.general.transformer.Transformer<byte[],​ImageWrapper<short[][][]>>

    public class ByteArrayImage2ByteTransformer
    extends Object
    implements science.aist.jack.general.transformer.Transformer<byte[],​ImageWrapper<short[][][]>>

    This class transforms a javaImage into an application/octet-stream compatible byte array with bmp encoding.

    Since:
    1.0
    Author:
    Andreas Pointner
    • Constructor Detail

      • ByteArrayImage2ByteTransformer

        public ByteArrayImage2ByteTransformer()
    • Method Detail

      • transformTo

        public byte[] transformTo​(ImageWrapper<short[][][]> javaImage)
        Transforms a java image into an bmp encoded octet-stream which can be sent to an rest api
        Specified by:
        transformTo in interface science.aist.jack.general.transformer.BackwardTransformer<byte[],​ImageWrapper<short[][][]>>
        Parameters:
        javaImage - to be transformed
        Returns:
        From corresponding to To
      • transformFrom

        public ImageWrapper<short[][][]> transformFrom​(byte[] bytes)
        This function is not needed, so currently not implemented
        Specified by:
        transformFrom in interface science.aist.jack.general.transformer.ForwardTransformer<byte[],​ImageWrapper<short[][][]>>
        Parameters:
        bytes - to be transformed
        Returns:
        To corresponding to From