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

Bridge clipping incomplete #7

Open
jab0707 opened this issue Jan 19, 2024 · 5 comments
Open

Bridge clipping incomplete #7

jab0707 opened this issue Jan 19, 2024 · 5 comments

Comments

@jab0707
Copy link
Contributor

jab0707 commented Jan 19, 2024

I seem to be running across an issue in the definition of the bridges between valves. For example, the TV to PV bridge is clipped using the paths defined in the image below. On the epicardium it seems that the distance threshold used to define the paths was insufficient to fully cut the bridge as there is a gap in the path.
image

The paths on the endocardium appear to be contiguous, but when they are projected to the epicardium they are discontinuous.
endo paths:
image

Epi points:
image

The defineBridgesShortestPath.m function seems to take this into account, on line 107:
% use tenths percentile as threshold for distance search
But it seems that the tenths percentile is not enough in this case. Any suggestions on how to resolve this would be appreciated.

@jab0707
Copy link
Contributor Author

jab0707 commented Jan 19, 2024

Looking a little closer, it seems like the distance threshold set on line 108 is not actually used in the subsequent point selection using rangesearch a few lines down. Instead, a fixed value of 1.0 is used. Using the actual threshold value set as a 15th percentile seems to always be too small (less than the default 1). It seem like this radius should be an exposed parameter or dynamically set and increased until a proper clipping of the bridge is achieved.

After playing around a bit here is what I found that worked.
I changed the threshold to be as follows. basing it off the max of dist2 plust some fudge factor makes it more likely that the points identified on the epi surface will actually form a closed path to isolate the bridge.

107 % use tenths percentile as threshold for distance search
108  threshold = max(dist2)+prctile(dist2,75);

I then changed the code that identifies the nodes of the path to actually use this threshold

[idx1,D1] = rangesearch(mesh.vol.points,pointsInPlane1Filtered,threshold,'NSMethod','exhaustive');
[idx2,D2] = rangesearch(mesh.vol.points,pointsInPlane2Filtered,threshold,'NSMethod','exhaustive');

@axel-loewe
Copy link
Member

Looping in @lisapankewitz as this is code added in CobivecoX

Congrats on your recently accepted paper! https://doi.org/10.1016/j.media.2024.103091
If there are any related code changes, we'd be happy to see them synchronized so that the description in the paper and the code here match.

@lisapankewitz
Copy link
Collaborator

Dear Jake,

thanks so much for this feedback!
I agree, this should be an exposed parameter!

This issue can be a bit tricky sometimes, due to the local curvature of the inflow outflow tracts especially in certain cases on the LV, I found.

I appreciate sharing your findings. I will include this in my next pull request!

@axel-loewe Thanks so much!!! I am submitting a major Pull request this week, once I have the feedback of the proof. Just wanted to avoid you going through several major PRs. It will reflect the code changes and a few additional documentation changes.

@jab0707
Copy link
Contributor Author

jab0707 commented Feb 13, 2024

I am having this same issue again on a new mesh, and I am wondering if it could be resolved in how the epi path is being defined. In the example below, I could up the threshold for finding the cut points, but it would be more robust if the epi points actually followed the whole path. I implemented a change where the epi path is calculated the same way the endo path is, just using an epicardial only graph. The results seem to work ok, and it also means that the distance threshold for finding nearby points for clipping can be turned way down. Changes will be pushed onto my fork once I clean them up a bit.
image
image
After changes:
image
image

@lisapankewitz
Copy link
Collaborator

Hi Jake,
I originally (before pushing the code here), had the paths on Epi and endo created in the same way. However, especially in the congenital heart disease cases, I had issues excising the bridges correctly if defining the path on the epi the way I do it in the endo path (changes is local curvature led to different paths solutions for epi and endo paths). So I think, this solution can work, but depends on a few factors including changes in wall thickness, etc.

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