Transform ellipse obtained from oblique slice of a cylinder to a circle

6 次查看(过去 30 天)
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
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

回答(1 个)

Matt J
Matt J 2022-8-23
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 个评论
Matt J
Matt J 2022-8-24
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 ?
James Marshall
James Marshall 2022-8-24
Hi Matt,
Yes I did try cubic and I think all the interpolations - the problem is any loss in quality from the already low image quality really makes them unusable.
The problem with relating the two differing velocity angles is that what the vessel contains is a number of fibres around which I assume a no slip condition (imagine a cylinder with small cylinders in it which nothing flows through.) The effect of the viewing angle being incorrect is that these fibres become more elliptical in shape than they really are and I'm not sure if the cosine correction would work in this case - although it might be worth setting up an idealised case to test this.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Geometric Transformation and Image Registration 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by