jilei-hao / VRMLConverter

0 stars 0 forks source link

VRMLConverter vs SNAP variation investigation #1

Open jilei-hao opened 1 year ago

jilei-hao commented 1 year ago

Background

" We are looking for the same values and they are pretty close but not the same. I had to retouch some (not all) of the volumes manually so for these some variation is to be expected."

" why the values are not exactly the same and wonder if you might have an idea as to why this is. I noticed that the file sizes of the .vrml file generated manually through the ITK-SNAP is consistently smaller than the .vrml files generated by your binary."

Requirement

Look into the details of SNAP implementation to find out why snap generated mesh has smaller size and slightly different shape.

jilei-hao commented 1 year ago

Good morning Jilei,

The binary works as expected and I have run the numbers both manually through ITK-SNAP (after disabling the smoothing that is on by default) and using the binary. We are looking for the same values and they are pretty close but not the same. I had to retouch some (not all) of the volumes manually so for these some variation is to be expected. All in all, I think that for our analysis this little inaccuracy will be non-significant and I would like to thank you Jilei for your help with this conversion tool!

I do however wonder why the values are not exactly the same and wonder if you might have an idea as to why this is. I noticed that the file sizes of the .vrml file generated manually through the ITK-SNAP is consistently smaller than the .vrml files generated by your binary. Would you be able to look at these two files attached to this email side by side? They should theoretically have the same contents.

The file with the shorter file name is generated through ITK-SNAP manually and the file with the longer filename is generated by your binary.

Once again, Thank you for your help!

With kindest regards, Alexander Woltersom

jilei-hao commented 1 year ago

Hi Alex,

After reviewing ITK-SNAP exporting logic in detail, I found that one process I didn’t include in the converter but is in SNAP that can cause variations in result. SNAP has an extra triangular stripping logic that strips polygons that can be triangulated into triangular strip. https://vtk.org/doc/nightly/html/classvtkStripper.html

I attached a sample with the extra stripping logic generated by the converter, without smoothing. Can you compare it with your snap export to see if there are still shape variations?

Best, Jilei