Skip to content

Trouble reading in tiff image in a form that PoreSpy wants #768

Answered by jgostick
likeduck asked this question in Q&A
Discussion options

You must be logged in to vote

I think that you're not using the imageio package properly. imread only reads in 2D images. The function you want used to be called mimread where the first "m" stood for "multi". In more recent versions they have the much more sensibly named volread which reads in a 3D volumetric image like your tiff is, presumably.

In addition to that, you should also check that your image is boolean and not greyscale. This means 2 things: Firstly if you're working with images directly from the xray machine you need to segment the image into True (void) and False (solid). Secondly, if you've done the first part, then the tif image is probably stored as integers, so you'll need to do a boolean mask to con…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@likeduck
Comment options

@likeduck
Comment options

@likeduck
Comment options

Answer selected by likeduck
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #767 on November 25, 2022 15:21.