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
Creating root mesh #21
Comments
It appears to work OK in ITK-snap, I don't know what's different. Is the image volume solid before mesh extraction? |
Can you use something like |
I can sure try |
The zebrafish atlas has the same problem. I reported that and trying to see whether they want to fix it but I am wondering whether, as the root meshes have to render "look nice" we should potentially have a passage through blender to clean them up. |
It would also potentially fix the "lego aspect" |
That's also a possibility. Though ideally something automated because:
|
I think standard image processing (filling etc) should be fine to create OK meshes. There's a question about whether we want to spend time making them as attractive as the Allen meshes. It shouldn't be hard to do though, apparently it's all in VTK. |
It's worth giving a shot to the way Allen did it. anorak got in touch for help with brainrender once, maybe he found a way to create clean meshes in the meanwhile |
This would be cool for the combined ara/f-p too because those meshes aren't great |
Okay, I'll work on making prettier meshes tonight, then we can apply it recursively to structures.json if necessary |
Love our nightly sprints 😄 Amazing - if you figure that out I will steal everything for the zfish atlas :) |
Sure, if we find a way that works it will be a standalone function/piece of code that prettifies meshes so can be used whenever |
mmm I failed. I tried morphological transformations but I could't get a way to get rid of the inside stuff that didn't completely alter the mesh' shape. I couldn't get I tried decimating and smoothing the mesh, and while that helps it still didn't get rid of the stuff inside. any other ideas? I'll try again tomorrow maybe with a fresher brain |
For the morphological transformations approach: I know there is a transformation that is supposed to find the external surface of a binary image with holes. I am trying to dig out the name |
let me knowif you find anything |
This was the algorithm I was thinking about https://en.wikipedia.org/wiki/Active_contour_model. I guess there's mesh generation routines created from it but I have not digged into these options - I hope you can find something! |
Making some progress... I've found an implementation of active contour model, but it was very slow. In the process I've discovered this neat marching cubes implementation whose 'smooth' option works well (though it's a bit slow). That, combined with some morphological operations and a bit of vtkplotter magic yields better looking meshes (the red is the inside): There's a bit of tradeoff between cleaning up internal srtucture and introducing artifacts though. Btw this approach adds vtkplooter and pymcubes as requirements, but they can be just for the [dev] option for people wanting to develop atlases with our tools. |
Looks nice.
I think this is fine, we can have everything in the [dev] list of requirements, but be careful what goes into the main list. |
As a tangential note, This raises in general the point of whether we should use the meshes to calculate if a point is in a region. |
I don't mind either way.
I agree that all of this operations should be handled by |
I would prefer that we use the image (as is done with amap), for two reasons:
I would vote for using the atlas image for analysis purposes (when accuracy is important), and then this allows us to post-process the meshes so that they are more attractive, without worrying about them being perfectly accurate. |
sounds good |
Mesh generation should be improved as of #27 |
Should be fixed by #27 |
Hey,
for the human brain atlas, there's no 'root' mesh, I think that the annotated volume only has the labels of the 'leafs' of the structure tree (the same goes for the rat atlas):
So I'm creating the root mesh by taking all voxels that have value >0, setting them to 1 and reconstructing the surface from that. However, in the case of the human brain there is still some structure 'under the brain surface' which makes the root mesh kinda ugly:
Does anyone know of a better way to create the root mesh?
The text was updated successfully, but these errors were encountered: