KVSlab / morphMan

A collection of tools for manipulation of morphological features in patient-specific geometries
https://morphman.readthedocs.io/en/latest/
Other
30 stars 12 forks source link

Automated detection of relevant outlets #49

Open hkjeldsberg opened 4 years ago

hkjeldsberg commented 4 years ago

manipulate_bifurcation and the sub-module automated_landmarking of morphMan relies on selecting the relevant outlets, which is currently done by the user manually.

For applications related to the ICA, or similar tubular structures, this process could be automated, by considering the two outlets furthest apart each other, excluding the largest outlet, presumed to be the inlet.

myousefi2016 commented 4 years ago

Hi @hkjeldsberg , Indeed I'm thinking about creating such automated detection algorithm. My solution is:

  1. Extract the centerline of the vascular geometry by using vmtkcenterlines and with method openprofiles. It will extract the centerline as well as Maximum Inscribed Radius along the centerline.

  2. Find centerline endpoints due to the fact that each endpoint in centerline has only one neighbor (I have the code already!).

  3. Sort endpoints based on their Maximum Inscribed Radius from highest to lowest.

  4. Exclude the first endpoint (as you said it would be the largest one so it is probably the inlet) and pick the second and third ones.

My question is: are you sure excluding the largest endpoint, which is corresponded to inlet, always works for all the ICA cases? Cause I think it would be more safe and general if we just take the largest one (inlet) and the second one. Please let me know if you think this algorithm looks reasonable.

aslakbergersen commented 4 years ago

Hi @myousefi2016,

Thank you for using morphMan! To properly answer your question whether your proposed algorithm is reasonable it would be helpful if you could provide a description of your typical input and desired output, in addition to a description of why you need such an algorithm. For instance:

If your typical input is a geometry with the ICA as an inlet and many outlets on both MCA and ACA, then your algorithm is most likely to fail since there is no guarantee that the two largest outlets (excluding the inlet) will be on each side of the ICA terminus.

Also, if you are using openprofiles you will be prompted to input the inlet ID, and relevant outlet IDs (or all). If you want something completely automated I suggest you use the compute_centerlines function in morphMan. I hope that was of some help.

myousefi2016 commented 4 years ago

Hi @aslakbergersen Thanks for your feedback! In fact, I'm looking to develop an algorithm, which should be able to work with all the cases in AneuriskWeb repository. If we limit our use case to only the geometries available in AneuriskWeb, Still, I'm not quite sure, what's the point of excluding the inlet? Thanks for the centerline computation suggestion!

hkjeldsberg commented 4 years ago

Hi @myousefi2016,

Sorry for the slow response! I'm happy you're interested in creating such an automated detection algorithm! Have you looked any further into this?

As @aslakbergersen points out, there is no guarantee that the two largest outlets (excluding the inlet) will be on opposite sides of the ICA terminus. The inlet (which is assumed to have the largest area) is excluded because we are interested in separating the ICA-centerline from the complete set of centerlines. To do this we need a pair of centerlines (both starting at the ICA-inlet), which diverge at the ICA terminus and end at two separate outlets (corresponding to the relevant outlets).

I've thought about it, and one approach is comparing the distance between all the remaining outlets, and simply selecting the two which are furthest apart. This can solve the issue (although naively).

There is one scenarios (off the top of my head) where this could fail, if we consider a typical AneuriskWeb model:

However, the diverging arteries along the ICA tend to have small outlet areas. Thus, a possible workaround could be ignoring the 2-3 smallest outlet areas, given a model consisting of more than 5 or 6 remaining outlets.