Code Monkey home page Code Monkey logo

Comments (5)

jab0707 avatar jab0707 commented on September 16, 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');

from cobiveco.

axel-loewe avatar axel-loewe commented on September 16, 2024

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.

from cobiveco.

lisapankewitz avatar lisapankewitz commented on September 16, 2024

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.

from cobiveco.

jab0707 avatar jab0707 commented on September 16, 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

from cobiveco.

lisapankewitz avatar lisapankewitz commented on September 16, 2024

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.

from cobiveco.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.