Comments (6)
Not sure if that;s intentional but as far as I can tell they perform identical functions
from porespy.
trim_floating_solids
was made to remove floating solids from image. It is also used in trim_non_percolating_paths
function.
I agree that they will currently output the same thing and it is because of a bug inside trim_floating_solids
. So line im[holes] = True
should be im[holes] = False
. Which means also a small change in trim_non_percolating_paths
. I will do it and push the changes if all agree.
from porespy.
from porespy.
Ignore my above comments. @mdrkok these two functions are behaving differently with the current implementation. They look the same but have a different meaning. The purple is the solid phase with zero's label.
from porespy.
@jgostick While doing this test I also observed one thing. When we run these function the input image also changes.
For example when we do
im_fill_blind_pores = ps.filters.fill_blind_pores(im)
Check
plt.imshow(im)
plt.imshow(im_im_fill_blind_pores)
gives same image. So I think a copy of image should be used to mask it with holes and then we should return masked copy as output. like
def fill_blind_pores(im):
holes = find_disconnected_voxels(im)
new_im = im.copy()
new_im[holes] = False
return new_im
Not sure if I am the only one facing this issue.
from porespy.
It seems the functions work ok, but the issue about not copying the input is a problem. I will open a separate issue about that.
from porespy.
Related Issues (20)
- Add a `pc_to_seq` function
- improve the `_insert_disks` methods by not generating spheres each time
- Export to COMSOL HOT 1
- Deprecate COMSOL IO?
- `align_image_with_openpnm` not working as intended HOT 2
- Visualization helper functions are inconsistent
- Implement "electrode tortuosity"
- SNOW network extraction HOT 4
- How to get grain size distribution through the image generated from PoreSpy HOT 1
- `porosity` function should optionally fill blind pores
- The porosity difference between PNM and Porespy HOT 2
- `setup_rich_logger` interferes with global logging config HOT 1
- Memory leak in `diffusive_size_factor_dns`
- List of examples we should make to populate the FAQ section
- Add mode to `sierpinski_foam2` to handle how cropping is done
- Improve speed and API of local thickness HOT 1
- `visualize.sem` should return a normalized image between 0 and 1
- Error importing module: No module named 'matplotlib._docstring' HOT 3
- Convert from setup.py to pyproject.toml
- How to calculate surface roughness and specific surface area in a 3D generated PTL on Porespy?
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.