Comments (2)
I have fixed a lot of bugs in my recent PR (#922), so caught one of the ones you mentioned: the new version will add +1 to the radius if smooth=True
and leave it as is if smooth=False
. However, the code you have above still still shows a bug, but I can explain why. If you reduce the r
to 14, then you get 2 spheres. The reason is that to create the 'contained' edge condition I put a layer of False
around the outside, but this technically makes the box 28 wide instead of 30, so spheres with r=15
do not fit. And the 3rd sphere is missing because the image is too short, only 83 instead of 90. So if you do imbox=np.ones([30, 30, 90])
and r=14
it all fits, of do imbox=np.ones([31, 31, 91])
with r=15
.
Anyway, your bug report is valid, and I think I can fix it by padding the input im
with False
instead of inserting False
along the edges of the existing image. This is probably doable, so I will add it to the PR.
from porespy.
I was mistaken, the code works fine. I do 'pad' the image, not overwrite the boundaries. The reason that the spheres don't fit is because a sphere with a radius of 15 voxels is actually 31 voxels wide. The following circle has a radius of 1:
[[0 1, 0],
[1, 1, 1],
[0, 1, 0]]
So with a radius of 1, the sphere is actually 3 voxels wide. The 'radius extends from the center of the middle pixel, to the center of the outer pixel, but the digitization requires us to draw an entire pixel.
from porespy.
Related Issues (20)
- Using `conn` consistently throughout HOT 2
- `overlay` does not work in 2D
- `overlay` needs modes
- Ensure all images attached to Results objects start with `im_`
- Use keyword `method` instead of `mode` HOT 3
- `find_h` needs some love
- Examples are not rerun when deploying docs HOT 2
- pseudo_gravity_packing: for clearance=0 and smooth=True: empty voxel between spheres in some siuations HOT 1
- `fill_blind_pores` docstrings needs to be swapped
- blobs porosity is off for porosity different than 0.5
- fractal_noise porositiy as an argument HOT 3
- Consistency in the relation to length or size in arguments of generators
- `two_point_correlation_fft` is only calculated for one orthant HOT 1
- Should funcs return a normal dict instead of a "results" object? HOT 2
- How to mute the warning of installing pypardiso
- Add type hints everywhere
- Make `voxel_size` a mandatory argument everywhere
- Porespy encounters an error when generating images using fractal noise, and I can't resolve it. HOT 5
- Clearence - pseudo gravity
- Adjust documentation or code for volume regionprop
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from porespy.