-
Notifications
You must be signed in to change notification settings - Fork 73
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
output labels or the data of "elem(:,5)" from surf2mesh #34
Comments
@tmedani, sorry for the delay. the reason you got 0 labels in some of the regions was because your seeds were not generated properly. because in this case, 3 of the surfaces are enclosed by the outer layer, therefore, raysurf.m may not return the seed that is specific for a given region. raysurf.m works by shooting a ray across a closed surface, finding a pair of intersection points, and use the mid-point as the seed. This only works when a closed surface is not enclosed/enclosing another surface - because the mid-point may be inside the surface being enclosed. to do this properly, you need to use something like below:
where the Please give above code a try and let me know if you need me to explain this further. |
Dear @fangq I tried your solution, it works fine, thanks. However, since I have three surfaces (in this example), I tried just to use the 3 upper points, I changed the last line to : I removed the (-1) Thank you again for your help. Kind regards |
Dear Dr @fangq ,
I have already posted this issue in brain2mesh :
fangq/brain2mesh#8 (comment)
I thought that we have solved this issue,
however, we still have it....
This is the scenario :
We use 3 surfaces to generate volume mesh to different regions,
let say in the surface I have 3 regions [1 2 3];
When I use the surf2mesh function, I get the three regions, which is great,
but the labels are not sorted correctly.
Here is my script :
the data files are here :
https://github.com/brainstorm-tools/brainstorm3/tree/master/defaults/anatomy/ICBM152
First problem:
the plot is here : left are the surfaces, right is the volume
For this specific problem since it's stable we choose to fix it manually and we set this : elem((elem(:,5)==0),5) = 3;
This is working in this specific case, but we want to avoid this intervention.
Do you have any recommendation?
Second problem:
Now let assume that we are using this manual correction,
the second problem occurs when we change the keepratio from 1 to 0.8
The output label are not stable also with this parameter.
Here are new results :
We will really appreciate your help to solve these issues.
Thank you in advance for your help.
Best Regards
Takfarinas
The text was updated successfully, but these errors were encountered: