Transform ellipse obtained from oblique slice of a cylinder to a circle
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to investigate fluid flow through a vessel, the pictures I have of the vessel are slices taken not perpendicularly to the direction of travel of the vessel. The image below shows how both the vessel looks in the current XZ and YZ planes, with Z' being the real axial axis of the vessel
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1106045/image.png)
What I need is a 2D cross section of the vessel which is perpendicular to the new Z' axis - effectively correct for the ellipse effect of the oblique cut and make it as though we cut it as a 'circular' (or as close to circular as the vessel is in reality) cross-section. I would like to do this by having a simple transform of the 2D slices that I already have. So I want a way to take X to X' and Y to Y'. Is such a solution possible?
Currently I have been treating the problem as follows. First I calculate the centroids of the slices and calculate the angle at which a line through the centroid slants. i.e how much has the vessel centroid moved in X as I move up in Z (if we were already looking down the vessel this would be 0) the angle of this slant represents how much I would need to 'swivel' around the Y axis to correct for my incorrect viewing angle for the X axis. Then do the same to see what 'swivel' around the X axis is required for the incorrect viewing in the Y axis. I then create a transformation matrix by multiplying the general matrices for 3D rotations about the X and Y axes together (with the two swivel angles plugged in). I then just take the top-left 2x2 of this 3x3 matrix and apply it to a slice to act as the transformation.
I hope this was a reasonable explanation of the problem and my current attempts to overcome it - if any clarification is needed I would be happy to provide more information, and of course any help would be GREATLY appreciated (I have been stuck on this problem for some time.)
Best, James
0 Commenti
Risposte (1)
Matt J
il 23 Ago 2022
Use fitgeotrans with an 'affine' transformation type to determine the necessary transformation. The output wll then be in a form compatible with imwarp which can be used to transform the volume.
3 Commenti
Matt J
il 24 Ago 2022
Maybe try a different interpolation algorithm, e.g., 'cubic'.
Or, maybe you could consder incorporating the obliquity of the slice to the direction of the fluid flow in the calculations. Eg., is it flow velocitiy you are calculating? If so, the velocity through the oblique slice should have a very simple mathematical relationship to the perpendicular velociity. Isn't it just a multiplicative factor of
?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1106610/image.png)
Vedere anche
Categorie
Scopri di più su Volume Visualization in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!