zixinyang9109 / LiverMatch

Learning Feature Descriptors for Pre- and Intra-operative Point Cloud Matching for Laparoscopic Liver Registration
MIT License
10 stars 1 forks source link

Deformation data format #6

Closed YANYZH closed 3 months ago

YANYZH commented 3 months ago

Hi, How can I convert VTK files from a 3D-IRCADb-01 database to STL files? I have tried several methods, but none have been successful.

zixinyang9109 commented 3 months ago

Hi, you can transform the .vtk to .ply. Then open it in Meshlab and save as .stl.

Fundamentally, they are just vertices and triangles. If this way doesn't work, you can write it by your own script.

zixinyang9109 commented 3 months ago

Pyvista may do it. I do not use .stl very much……

zixinyang9109 commented 3 months ago

Also, to generate volumetric mesh, you do not have to use .stl file.

YANYZH commented 3 months ago

Thank you for your guidance. Is the split.npz file generated by the v2s-net for deformation data? How should I process the generated deformation data to obtain the npz file?

zixinyang9109 commented 3 months ago

No. It is generated by myself. After the FEM simulation, you'll get a deformed volumetric mesh, which has one to one correspondence regarding to the original volumetric mesh. You can extract their surfaces to get undeformed and deformed surfaces.

zixinyang9109 commented 3 months ago

The major steps are described in the paper. Please let me know if you have specific problems. I have been playing with the simulation over one year towards releasing a public database free of license..however it is more difficult than I expected...

YANYZH commented 3 months ago

I'm sorry, I didn't express my question clearly. I'm not sure what an npz file is. I tried the method you mentioned earlier to obtain the stl file, but I couldn't generate the deformation data either. Maybe I should try not using the stl file?

zixinyang9109 commented 3 months ago

Yes. The pipeline for me is surface.ply -> volumetric.vtk -> deformation.vtk.

zixinyang9109 commented 3 months ago

npz file just contains multiple .np. Maybe you can play Lepard and V2Snet first. I am also sorry for the confusion. If the license allows me to share my data, it will be much easier.

zixinyang9109 commented 3 months ago

You can see the dataloader for loading an npz file. Or play with npz files of 4dmatch in the Lepard