# implement of Simpson’s biplane method to calculate volume

**URL:** <https://discourse.itk.org/t/implement-of-simpson-s-biplane-method-to-calculate-volume/2601>\
**Category:** Algorithms\
**Created:** [January 10, 2020, 2:52pm UTC](https://discourse.itk.org/t/implement-of-simpson-s-biplane-method-to-calculate-volume/2601 "2020-01-10T14:52:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hubutui](https://discourse.itk.org/user_avatar/discourse.itk.org/hubutui/32/716_2.png) [@hubutui](https://discourse.itk.org/u/hubutui)\
**Post date:** [January 10, 2020, 2:52pm UTC](https://discourse.itk.org/t/implement-of-simpson-s-biplane-method-to-calculate-volume/2601/1 "2020-01-10T14:52:26Z")

</div>

Hello, I’m trying to calculate left ventricle volume at end-diastole and end-systole. After googling, I fould this [article](https://www.eriksmistad.no/wp-content/uploads/IUS_2018_Proceedings___Fully_automatic_real_time_ejection_fraction_and_MAPSE_measurements_in_2D_echocardiography_using_deep_neural_networks.pdf) describe the method for detail. However, I still have some issue to implement it. According to eq 1 in the article, I think I need to do Simpson integrate, which I could use `scipy.integrate.simps` method.  
I have extract the label contour using `sitk.LabelContour`. I don’t know how I could get the length of the green line in the fig (coressponding to dA4C/dA2C in eq 1). Any suggestion?  
 ![image](https://discourse.itk.org/uploads/default/original/2X/b/b57e6c647b3e67eca2133aeda28e7660f49b3a0b.jpeg)
