Skip to content
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

Calculating Sm and Ames/Vmes #8

Open
gtrancourt opened this issue Mar 20, 2018 · 4 comments
Open

Calculating Sm and Ames/Vmes #8

gtrancourt opened this issue Mar 20, 2018 · 4 comments

Comments

@gtrancourt
Copy link
Collaborator

gtrancourt commented Mar 20, 2018

I was just looking at the new automated leaf traits measurements. I do not agree with the current definition of Sm. I think it should be only the surface of the airspace. Adding the surfaces of the two mesophylls and the veins adds duplicates some surfaces, and the point of thresholding the veins is to remove them from surface estimation. However, measuring the airspace is prone to some errors.

Two ways to define the surface area of the mesophyll cells Sm would be (for which I have no idea to program in python):

  1. (surface of airspace - surface of airspace touching the epidermis - surface of airspace touching the veins)
  2. surface of the mesophyll touching the airspace

Also, I would like to see two Sm computed:

  • using your current definition of epidermal area; and
  • using the projected area (either the width of the image or the length of a line fit between the the leftmost and rightmost point on the straitest epidermis).

It would also be easy to compute Ames/Vmes. I define Vmes as the volume of the mesophyll (mesophyll + airspace), but for consistency with potential extrapolation from the literature, the should be also Vmes = (mesophyll + vein + airspace).

Keep up the great work guys!

@masonearles
Copy link
Owner

masonearles commented Mar 20, 2018 via email

@gtrancourt
Copy link
Collaborator Author

@mattjenkins3, great work on getting Sm computed properly! What you did is appropriate (i.e. using img3to compute the surface).

As for Ames/Vmes, you are currently computing the total volume of the cells in true_meso_volume. The current definition of Vmes I use is (total volume between the epidermises (including cells, air, veins) - volume of the veins) when dealing only with microCT data. If I compare with data computed from the literature, I include the vein volume.

In your code, I would use epi_inner_fill_invert (or the non-inverted) for the total mesophyll volume. Then you could maybe delete the volume of the mesh created from the veins, using the marching cube trick that you used (that's actually pretty neat!), or just summing up the number of voxels present in the object (number of 1's as in your loop).

But I'm not sure I understand how you computed Ames/Vmes and porosity. For porosity, why not just sum up the ias_trace object before multiplying it by the volume of a voxel? That's probably faster than looping (if it's as easy as in R - I'm still learning python ;).

Keep up the great work Matt!

@mattjenkins3
Copy link
Collaborator

Very much appreciate these tips.

Especially that last part about summing--I've been hoping to find a faster way to compute volumes and I think this will be it!

@gtrancourt
Copy link
Collaborator Author

My pleasure!
I think the summing is what is being done by default in BoneJ, unless the enclosed volume is being computed, which is the volume within the mesh or meshes. Is it also possible to get the volume with the meshes you create with the marching cubes algorithm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants