As an example, this notebook shows how to store 2D images in larcv data formats using
image2d data product. How to store other form of data (2D/3D sparse data, clusters, etc.) would be a simple extension once you learn about this.
from __future__ import print_function import ROOT import numpy from ROOT import larcv larcv.load_pyutil() import matplotlib.pyplot as plt from scipy.ndimage import imread
Welcome to JupyROOT 6.08/06
Getting an image sample¶
Need an image to convert. Since I'm writing the tutorial, I get to use my daughter :)
_file = '/home/cadams/Desktop/norasaurus.jpg' nora = imread(_file) print(type(nora))
Nora's type should actually be 'baby' but OK.
fig = plt.figure(figsize=(16,16)) plt.imshow(nora, interpolation='none') plt.show()