3D does not match when overlaying with DICOM image

Hello
I have this problem with this DICOM, but it doesn’t happen with others.
I load the dicom with 3D Slicer and segment a vertebra.
In 3d Slicer the overlay is well positioned.


I convert dicom to .vtkjs with a modified version of this https://github.com/KitwareMedical/dicom-exporter
Export the vertebra stl in 3d Slicer
I load everything in vtk.js and the vertebra is displaced with respect to the dicom.

I think it is a DICOM problem when loading it in 3d Slicer in the console, this error appears:
[ITK] WARNING: In /work/Stable/Slicer-0-build/ITK/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx, line 478
[ITK] ImageSeriesReader (0x8b9be60): Non uniform sampling or missing slices detected, maximum nonuniformity:0.000648475
But why in 3d Slicer it is well positioned and in vtk.js it is not ?
Any way to fix the DICOM with 3d Slicer so that it overlays well in vtk.js ?
Or maybe I should change something in the vtk.js code ?
Here is the DICOM .vtkjs file and the stl file
dicom_vtkjs_bad_overlay - Google Drive

Sometimes the problem is coming from the coordinate system of the STL file. RAS vs LPS. You might want to try with an STL that is not “centered” on the image and that is not “mirrored”.

I don’t think that’s why
I have tried to modify the dicom and stl coordinate system several times and it still does not work.

it seems that your .vtkjs file is missing the “image orientation” field.

Where should be “image orientation” in the index.json of .vtkjs could you give me an example ?

Doing some tests I think the error comes from the DICOM having a rotation in the coordinate transformation matrix.
Anyway dicom-exporter does not generate the “direction” key in index.json when you transform a dicom into .vtkjs
this a dicom-exporter error ?
“direction” is used for something in vtk.js when you load the file with vtkHttpDataSetReader ?