-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Zeffiro developer: A regular push adding the changes made in the curr…
…ent local repository to the remote origin. Contents of the folders ./data/ and ./profile/ are ignored. The update necessitates creating a personal access token.
- Loading branch information
1 parent
63d5834
commit 03010a2
Showing
12 changed files
with
407 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
function zef = zef_parcellation_roi_add(zef) | ||
|
||
zef.parcellation_roi_selected = 1; | ||
zef.parcellation_roi_center = [0 0 0; zef.parcellation_roi_center]; | ||
zef.parcellation_roi_radius = [10 zef.parcellation_roi_radius]; | ||
zef.parcellation_roi_color = [0.56078 0.91373 1; zef.parcellation_roi_color]; | ||
zef.parcellation_roi_name = [{'Used-defined ROI'} zef.parcellation_roi_name]; | ||
zef = zef_update_parcellation(zef); | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
function zef = zef_parcellation_roi_delete(zef) | ||
|
||
I = [1 : size(zef.parcellation_roi_center,1)]; | ||
I = setdiff(I,zef.parcellation_roi_selected); | ||
if not(isempty(I)) | ||
zef.parcellation_roi_center = zef.parcellation_roi_center(I,:); | ||
zef.parcellation_roi_color = zef.parcellation_roi_color(I,:); | ||
zef.parcellation_roi_radius = zef.parcellation_roi_radius(I); | ||
zef.parcellation_roi_name = zef.parcellation_roi_name(I); | ||
else | ||
zef.parcellation_roi_center = [0 0 0]; | ||
zef.parcellation_roi_radius = [10]; | ||
zef.parcellation_roi_color = [0.56078 0.91373 1]; | ||
zef.parcellation_roi_name = [{'Used-defined ROI'}]; | ||
end | ||
zef.parcellation_roi_selected = 1; | ||
zef = zef_update_parcellation(zef); | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
%Copyright © 2018- Sampsa Pursiainen & ZI Development Team | ||
%See: https://github.com/sampsapursiainen/zeffiro_interface | ||
function [c_table,c_points] = zef_parcellation_roi_embed(zef) | ||
|
||
c_table = cell(0); | ||
c_points = cell(0); | ||
|
||
if eval('zef.parcellation_merge') | ||
c_table = eval('zef.parcellation_colortable'); | ||
c_points = eval('zef.parcellation_points'); | ||
else | ||
eval('zef.parcellation_selected = [];'); | ||
end | ||
|
||
t_ind = length(c_table); | ||
|
||
t_ind = t_ind + 1; | ||
|
||
c_table{t_ind}{1} = 'ROI'; | ||
|
||
c_points_aux = []; | ||
c_table{t_ind}{4} = []; | ||
start_index = 0; | ||
for i = 1 : size(zef.parcellation_roi_center,1) | ||
c_points_aux_0 = zef.source_positions; | ||
c_points_aux_1 = c_points_aux_0(find(sqrt(sum((c_points_aux_0-zef.parcellation_roi_center(i,:)).^2,2))<= zef.parcellation_roi_radius(i)),:); | ||
c_points_aux = [c_points_aux ; [[start_index:start_index + size(c_points_aux_1,1)-1]' c_points_aux_1]]; | ||
start_index = start_index + size(c_points_aux_1,1); | ||
c_table{t_ind}{4} = [c_table{t_ind}{4} ; i*ones(size(c_points_aux_1,1),1)]; | ||
c_table{t_ind}{2}{i,1} = zef.parcellation_roi_name{i}; | ||
c_table{t_ind}{3}(i,1:3) = zef.parcellation_roi_color(i,:); | ||
c_table{t_ind}{3}(i,5) = i; | ||
end | ||
|
||
c_points{t_ind} = c_points_aux; | ||
c_table{t_ind}{3}(:,1:3) = round(255*c_table{t_ind}{3}(:,1:3)); | ||
c_table{t_ind}{4} = c_table{t_ind}{4}(:); | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function zef = zef_parcellation_roi_pick_center(zef) | ||
|
||
if isempty(findobj(allchild(zef.h_axes1),'Type','DataTip'))~=1 | ||
zef.h_datatip = findobj(allchild(zef.h_axes1),'Type','DataTip'); | ||
zef.parcellation_roi_center(zef.parcellation_roi_selected,:) = [h_datatip(1).X h_datatip(1).Y h_datatip(1).Z]; | ||
zef.h_parcellation_roi_center.String = num2str(zef.parcellation_roi_center(zef.parcellation_roi_selected,:)); | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
function zef = zef_parcellation_roi_pick_color(zef) | ||
|
||
color_vec = uisetcolor; | ||
if not(isequal(color_vec,0)) | ||
color_str = num2str(color_vec); | ||
zef.h_parcellation_roi_color.String = color_str; | ||
zef.h_parcellation_roi_color.BackgroundColor = color_vec; | ||
zef.parcellation_roi_color(zef.parcellation_roi_selected,:) = color_vec; | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
function zef_parcellation_roi_plot(zef) | ||
|
||
[s_x,s_y,s_z] = sphere(100); | ||
h_axes1 = zef.h_axes1; | ||
hold(h_axes1,'on'); | ||
h_parcellation_roi_sphere = findobj(h_axes1,'Tag','additional: parcellation roi'); | ||
delete(h_parcellation_roi_sphere); | ||
for i = 1 : size(zef.parcellation_roi_center,1) | ||
s_x_2 = zef.parcellation_roi_radius(i)*s_x + zef.parcellation_roi_center(i,1); | ||
s_y_2 = zef.parcellation_roi_radius(i)*s_y + zef.parcellation_roi_center(i,2); | ||
s_z_2 = zef.parcellation_roi_radius(i)*s_z + zef.parcellation_roi_center(i,3); | ||
h_plot = surf(h_axes1,s_x_2,s_y_2,s_z_2); | ||
set(h_plot,'facealpha',1,'edgecolor','none','facecolor',zef.parcellation_roi_color(i,:),'tag','additional: parcellation roi'); | ||
end | ||
|
||
drawnow; | ||
hold(h_axes1,'off'); | ||
|
||
end |
Oops, something went wrong.