Closed xu-kai-xu closed 3 years ago
Hmmm, that is a tricky one. It's odd that it all runs fine for several steps before breaking.
Firstly, are you extracting the network of the blue blobs, or the void space around them? A network of the blue blobs won't be of much use since they all totally disconnected....you won't be able to run any simulations on that network. Also, the flatness of the blobs will be a problem for the network abstraction.
Regarding your error above, my hunch is that your image is somehow in the wrong format, and the code handles it sort of by accident. What is the shape of the image you input into snow? Can you run the following:
print(im.shape)
print(im.dtype)
print(im.min(), im.max()
@jgostick, thank you, jeff. I want to extract pnm from the blue voxels. Surely they are disconnected. Actually, the blue voxels are more like fractures. But because the poor resolution of the CT, some tiny pores or fractures can not be shown. So, my plan is to extract the major fractures as pores, then add some artificial connectivities to the pores. I also use the classical watershed method to process the images, just found it didn't work. I guess the problem is the poor connectivity. When I change the interest region to the void space, SNOW works well. So I think the file format is right. I use .raw format file, which is output with Avizo. The shape information is as follows:
''' print(im.shape) print(im.dtype) print(im.min(), im.max() (178, 178, 284) uint8 0 1 '''
Hi @xu-kai-xu ... everthing seems ok, and if your image works on the opposite phase then as you say the format must be ok. Instead of running ps.networks.snow
, have you tried running each of the steps separately, as outlined here?
thanks, I will try and update the progress.
Hi, I just start to extract a PNM from CT images (.raw format). During the processing, python raised the error IndexError: too many indices for array. The detailed traceback is
The CT images are sort of discrete. I am not sure what the problem is. Thanks for your help.