-
Notifications
You must be signed in to change notification settings - Fork 6
XVIV. Numpy support (DecodeNumpy)
carlosuc3m edited this page Sep 13, 2023
·
1 revision
JDLL has the capability to ingest Numpy arrays stored as .npy files and convert them into ImgLib2 images. This functionality empowers JDLL to carry out inference within Numpy arrays seamlessly.
JDLL supports almost all the numeric Numpy data types:
- boolean
- int8
- uint8
- int16
- uint16
- int32
- uint32
- int64
- float16
- float32
- float64
Class enables conversion of Numpy arrays saved as .npy
files into ImgLib2 images.
Convert a Numpy array stored in the .npy
file defined by the path
argument into an ImgLib2 RandomAccessibleInterval
.
- path: path to the
.npy
file of interest.
String npyFile = "/path/to/example.npy";
RandomAccessibleInterval img = DecodeNumpy.retrieveImgLib2FromNpy(npyFile);