WebxCT / WebCT

Interactive Web UI for X-ray CT with Real-time Results
https://webct.io
8 stars 0 forks source link

Incorrect Rotation Axis #72

Closed WYVERN2742 closed 3 months ago

WYVERN2742 commented 3 months ago

With industrial part stl, capture rotation is incorrect. Why?

https://github.com/user-attachments/assets/aec86e7e-9444-4a01-80ba-b3d66309f4bc

WYVERN2742 commented 3 months ago

Reproducable with config; Image

Config-WebCT.json

Looks like the rotation is on the model axis, and not the worldspace; hence why this has not been encountered before.

WYVERN2742 commented 3 months ago

Current approach is using gvxr.rotateScene() to rotate all meshes during capture setup.

Image

And projections are generated by rotating "root";

Image

Probably a likely assumption that rotateScene causes root to rotate, resulting in the projections' rotation to be incorrect compared to the fixed detector and source

WYVERN2742 commented 3 months ago

One fix is to rotate each sample mesh, however:

Is there a better way to rotate all scene nodes, and rotate the scene separately? Will have to find out

WYVERN2742 commented 3 months ago

Use computeCTAcquisition with None for path https://sourceforge.net/p/gvirtualxray/gitroot/ci/master/tree/SimpleGVXR/include/acquisition.h#l258

And then getLastProjectionSet to get projections https://sourceforge.net/p/gvirtualxray/gitroot/ci/master/tree/SimpleGVXR/include/acquisition.h#l458