Comments (6)
Hi Rylan,
process
is just a stand in for anything you'd like to do with the image.
from connected-components-3d.
Closing due to inactivity. Please reopen if you need more help!
from connected-components-3d.
Can you say more on this please: "process is just a stand in for anything you'd like to do with the image."
I am completely new to your library but I have some experience in Python.
I am trying to create objects from rainfall netCDF files, but I want to begin learning something very basic.
Is there some sample code of something simple which I can follow to learn the library.
I have not been able to find more documentation or examples elsewhere but it is important for me to learn this for my research.
from connected-components-3d.
Hi! The first step is you will need to convert netCDF files into numpy arrays. I'm not familiar with netCDF but here's the first google result:
https://towardsdatascience.com/read-netcdf-data-with-python-901f7ff61648
After that you run cc3d to extract the connected components. If you have a 2D image, select connectivity 4 or 8. If you have a 3D image, 6, 18, or 26 connectivity.
import cc3d
import numpy as np
labels = ... # numpy array extracted from netCDF
connectivity = ... # pick a connectivity
cc_labels, N = cc3d.connected_components(labels, connectivity=connectivity, return_N=True)
Then if you want to collect some basic statistics on the image:
stats = cc3d.statistics(cc_labels)
If you want to process individual binary images:
for label, image in cc3d.each(cc_labels, binary=True):
# whatever you want to do with image
from connected-components-3d.
I think a good starting point will be to have this 2D array based on a single timestep from the netCDF file.
I believe after this I can create a 3D array based on multiple timesteps from the netCDF file.
I am trying to identify rainfall as objects so I do not believe the binary classification is the better option.
I am at the beginning of my MSc research so I think I will be in touch as I progress.
Thank you for the information and your time.
from connected-components-3d.
from connected-components-3d.
Related Issues (20)
- Applying Dust and largest_k dtype output option HOT 2
- dust sugnature HOT 1
- Massive memory Leak HOT 7
- 1D Array of 4 Elements Incorrect HOT 5
- Cannot find reference 'dust' in 'cc3d.py' HOT 2
- Question on comparing individual lesions between two masks based on the cc3d.statistics output. HOT 1
- Additional metrics support HOT 2
- Does cc3d also work with memmory-mapped numpy arrays and array-like data? HOT 14
- cc3d.statistics["bounding_boxes"] are wrong HOT 1
- largest_k fails for transposed arrays HOT 6
- About the lastest_k function HOT 4
- Statistics output HOT 7
- Question on the output of contacts HOT 9
- Periodic Boundary Conditions HOT 4
- Is the output label of largest_k ordered? HOT 2
- Add a better error for type support. HOT 4
- cc3d.statistics['bounding_boxes'] is contains floats instead of int as slice positions HOT 2
- voxel_connectivity_graph and contacts can not be applied in 2D label HOT 5
- Build Equivalence Table Two Z Slices at a Time
- cc3d.dust fails HOT 3
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 connected-components-3d.