porespy icon indicating copy to clipboard operation
porespy copied to clipboard

`align_image_with_openpnm` not working as intended

Open shillcoat opened this issue 1 year ago • 2 comments

The function porespy.tools.align_image_with_openpnm() does not actually align a 3D image with one from OpenPNM but instead produces a mirror of it. Replacing this function with a simple call to swap the 'x' and 'z' axes would achieve the desired results: im = np.swapaxes(im, 0, 2)

shillcoat avatar Jul 21 '23 18:07 shillcoat

It is sooo strange. This used to work, and I don't understand what could possibly have changed. I have to think that we changed something in OpenPNM, but I do see how we could have done that without noticing. I will investigate. FWIW, I have been using the porespy.io.to_vtk function lately since paraview does a better job of rendering these, specifically for small features.

jgostick avatar Jul 22 '23 01:07 jgostick

@jgostick Indeed, it's strange. What's more strange is that porespy's to_vtk doesn't require swapping, but imageio's volsave does!

ma-sadeghi avatar Jul 22 '23 16:07 ma-sadeghi