New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Volume computation #11
Conversation
The volume of objetcs can be determined by rotating the contour. Volume has the advantage to be less correlated to deformation compared to the projected area and is therefore a better measure of 'cell size' in the channel.
1 similar comment
Pos_x is necessary as soon as the contour is not smooth. I used the following script to obtain a conotur with little random noise and when I compute Volume for different pos_x, i basically get random values:
Regarding the orientation (clock vs counter-clockwise): I think we should test somehow if the orientation of the contour is clockwise, but this is not urgent. I have never seen a contour that was written in a different orientation (for RT-DC data-sets) |
The algorithm has been shown and proven in |
Sorry, I edited my comment above. The algorithm I described will be more reliable than the proposed algorithm. The proposed implementation does not work for arbitrary contours, as you have shown yourself. There is a strong dependence on the lateral center position, which should not have an effect at all. |
it works for arbitrary contours as long as the centroid of the contour is located in the origin. To place a contour in the origin pos_x and pos_y is necessary. |
Can you explain why |
- make hierarchy children more lazy
- hierarchy child computes data on-the-fly - improve checks for volume computation
@maikherbig https://ci.appveyor.com/project/paulmueller/ShapeOut/build/job/spfk0m8s4fn2ck62/artifacts Please check it out and let me know if there are any issues. |
@maikherbig |
I removed the note. Could you please give me the RT-FDC data set with which it doesn't work? |
@maikherbig |
Now everything (Volume comp. and Contour+Picture display) works perfectly. I have tested a couple of older and newer RT-DC and RT-FDC Datasets. |
Great, thanks again for testing. |
@maikherbig I created a new branch for the volume computation and improved readability of the code. Your test runs, however:
Does the parameter
pos_x
have any effect on the volume computation? I guess we should remove it?I added a test here that runs through perfectly for different values of
pos_x
: https://github.com/ZELLMECHANIK-DRESDEN/dclab/blob/volume_computation/tests/test_volume.py#L118-L139I saw that
get_volume
only works for contours that are counter-clockwise. It would be nice to test that and not rely on the contour being oriented the way it usually is (that might change): https://github.com/ZELLMECHANIK-DRESDEN/dclab/blob/volume_computation/dclab/volume.py#L67-L71