Load HDF5 file

I understand how to load a .vti object in vtk.js, it goes something like this:

const reader = vtk.IO.Core.vtkHttpDataSetReader.newInstance({fetchGzip: true});
mapper.setInputConnection(reader.getOutputPort());
reader
    .setUrl('https://kitware.github.io/vtk-js/data/volume/LIDC2.vti')
    .then(() => reader.loadData())
    .then(() => {
        renderer.addActor(actor);
        renderer.resetCamera();
        renderer.getActiveCamera().azimuth(azimuth)
        renderWindow.render();
    });

How do I apply this method on a local .HDF5 file (more specific - HDF5 that contains a CT scan)?

vtk.js itself doesn’t have an HDF5 reader, but you can use itk-wasm alongside vtk.js to read and display your image.

Do you how to combine them? Can you give me a snippet example?

I would check out this vtk.js example. To start, there is this example on how to just load datasets with itk-wasm (no visualization).