Read image from TTree

Hello.

 I am trying to read images from a TTree. 

The TTree is called test.root and was created by reading an HDF5 file.
It contains 120 images of 1226 x 1028 pixels:

root [0] TFilef = new TFile(“test.root”,“read”)
(TFile ) 0x23081d0
root [1] f->ls()
TFile
* /…/HDF5toROOT/test.root
TFile
/…/HDF5toROOT/test.root
KEY: TTree TImages;7 Images from camera
KEY: TTree TImages;6 Images from camera
root [2] cout << TImages->GetEntries()<< endl
120
(std::basic_ostream<char, std::char_traits >::__ostream_type &) @0x7f58ba138e20
root [3] TImages->Print()


*Tree :TImages : Images from camera *
*Entries : 120 : Total = 604969521 bytes File Size = 162017432 *

  •    :          : Tree compression factor =   3.73                       *
    

*Br 0 :image : images[1226][1028]/I *
*Entries : 120 : Total Size= 604969161 bytes File Size = 162015850 *
*Baskets : 120 : Basket Size= 5041388 bytes Compression= 3.73 *

Does anyone know how to put every entry into a 2D histogram, please?
If I do
TImages->GetEntry(0)
and TImages->Show(0,1) it gives me the first pixel values of image 0.
and TImages->Show(0,10) it gives me the first 10 pixel values of image 0.

Thanks,
regards,
franciuska

Solved :slight_smile:

Cheers,
franciuska

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.