dmpelt / foam_ct_phantom

A Python package for generating foam-like phantoms for CT.
MIT License
18 stars 6 forks source link

Saving projection dataset with 8192 angles fails #3

Closed ahendriksen closed 4 years ago

ahendriksen commented 5 years ago

Just a heads up. I don't think many people will try this.

For me, the following code fails:

    num_voxels = 512
    num_slices = 512
    num_angles = 8192 # <----
    pg = foam_ct_phantom.ParallelGeometry(
        nx=num_voxels * 3 // 2,
        ny=num_slices,
        angles=np.linspace(0, np.pi, num_angles, False),
        pixsize=2 / num_voxels,
        supersampling=2,
    )

    phantom.generate_projections(str(out_proj_path), pg)

I get this error:

  File "h5py/h5a.pyx", line 47, in h5py.h5a.create
RuntimeError: Unable to create attribute (object header message is too large)
> /export/scratch1/home/hendriks/projects/noise2noise/examples/foam/h5py/h5a.pyx(47)h5py.h5a.create()

I guess the hdf5 format limits the amount of metadata that may be saved.