-
Notifications
You must be signed in to change notification settings - Fork 53
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
Feature-based labeling #8
Comments
ok, i can help with this if you want. what is the status of the implementation of method 3? is all the functionality there, but just needs to be integrated into the standard mindboggle stream? or is there algorithmic / software dev work that needs to be done here? |
great! if you look at the propagate() function in segment.py, you'll see that it calls rebound.py, and uses a simple weighted average algorithm for label propagation to resolve label boundaries between neighboring sulcus candidates:
realign is set to False here, but it is this untested functionality that we would like to apply to the case of realigning label boundaries to fundus curves. |
making good progress on this. question: |
in the trivial case of a two-label problem, establishing which vertices have one label automatically solves for the other label, but how would one know what label should flank a cosegment if there are multiple labeled regions? |
well, since we are propagating boundaries, not labels themselves, we always know the label pair associated with the propagated boundary. i suppose what we wouldn't know for sure would be which label was on which side of the boundary. in the best case you could fill that in by assuming that labels are continuous, but that might not always work depending on how the propagation works out. after i finish implementing realignment i'll see if we can speed it up by only propagating boundaries instead of cosegments. |
i follow you exactly. you're on the mark. i would much prefer to propagate between fundus curves that define label boundaries without having to explicitly flank the curves with labels (which is a challenge). intuitively, if one has a label boundary A-B and neighboring label boundaries B-C, B-D, and C-D, then one would expect vertices that lie along the shortest path between A-B and B-C to have label B. |
So, this is taking a little longer than I expected, so I wanted to
Does this make sense? |
Ok, so I made some good progress on this and just pushed a commit (90279f0) that accomplishes a good bit of what we are after here. In the new file boundary_realignment.py, the function realign_boundaries_to_fundus_lines will take a surface with fundus lines and inital labels and lock the label boundaries to the fundus lines. An example of running this on a single left hemisphere is up at MB/data/realignment_example. The file names should be self-explanatory, but in effect we'd like lh.labels.DKT31.manual.vtk to match lh.pial.DKTatlas40_realigned.vtk as much as possible. Remaining TODOs until this issue can be closed:
|
there are three ways i've been thinking about labeling brains with mindboggle:
this is already implemented in mindboggle's nipype. as satra pointed out, given the DKT-40 atlas inclusion in the new freesurfer, this doesn't add anything new -- we might as well inherit freesurfer's labels, and reduce the 31 cortical labels to 25 if we want to subscribe to the DKT25 protocol. mindboggle would then be used primarily for shape analysis, which is the primary contribution in the original r01 proposal.
the realign_label_boundary() is the method to realign the label boundaries. it calls:
which would simply be set to the initial automated labels or to the consensus set of labels, where there is extremely high probability that the label assignments are correct.
there is a lot of redundancy between rebound.py's functions and the rest of mindboggle's. it would be good to simply extract what is relevant from rebound.py, out of its current oop framework. the next method would be replaced by labels/labels.py's extract_borders() function, then separate same-label-pair segments:
this is the heart of the label propagation:
finally, extract_borders() would replace:
The text was updated successfully, but these errors were encountered: