diff --git a/+siibra/+items/Parcellation.m b/+siibra/+items/Parcellation.m index 451baec..2021d73 100644 --- a/+siibra/+items/Parcellation.m +++ b/+siibra/+items/Parcellation.m @@ -68,8 +68,8 @@ region = obj.RegionTree.Nodes.Region(index); end function region = getRegion(obj, regionNameQuery) - nodeId = obj.RegionTree.findnode(regionNameQuery); - region = obj.RegionTree.Nodes.Region(nodeId); + nodeIndex = find(obj.RegionTree.Nodes.RegionName == regionNameQuery); + region = obj.RegionTree.Nodes.Region(nodeIndex); end function children = getChildRegions(obj, region) nodeId = obj.RegionTree.findnode(region.Id); @@ -102,35 +102,4 @@ end end - - methods (Static) - function tree = createParcellationTree(parcellation, regions) - root.name = parcellation.Name; - root.children = regions; - [source, target, region] = siibra.items.Parcellation.traverseTree(parcellation, root, string.empty, string.empty, siibra.items.Region.empty); - % append root node - nodes = target; - nodes(length(nodes) + 1) = root.name; - region(length(region) + 1) = siibra.items.Region(root.name, parcellation, []); - % make nodes unique - [uniqueNodes, uniqueIndices, ~] = unique(nodes); - nodeTable = table(uniqueNodes.', region(uniqueIndices).', 'VariableNames', ["Name", "Region"]); - tree = digraph(source, target, zeros(length(target), 1), nodeTable); - end - - function [source, target, regions] = traverseTree(parcellation, root, source, target, regions) - % Parses the parcellation tree. - % Recursively calls itself to parse the children of the current - % root. - % Creates a region for each node in the parcellation tree. - - for childNum = 1:numel(root.children) - child = root.children(childNum); - source(length(source) + 1) = root.name; - target(length(target) + 1) = child.name; - regions(length(regions) + 1) = siibra.items.Region(child.name, parcellation, child.x_dataset_specs); - [source, target, regions] = siibra.items.Parcellation.traverseTree(parcellation, child, source, target, regions); - end - end - end end \ No newline at end of file diff --git a/+siibra/spaceOverview.m b/+siibra/spaceOverview.m index 3b72ea0..75f7b37 100644 --- a/+siibra/spaceOverview.m +++ b/+siibra/spaceOverview.m @@ -1,5 +1,5 @@ function overviewTable = spaceOverview() spaces = siibra.spaces(); - overviewTable = table([spaces.Name].', [spaces.AtlasName].', [spaces.VolumeType].', [spaces.Format].', 'VariableNames', ["Space", "Atlas", "VolumeType", "Format"]); + overviewTable = table([spaces.Name].', [spaces.AtlasName].', 'VariableNames', ["Space", "Atlas"]); end diff --git a/step-by-step/01_atlases_and_brain_parcellations/01_selecting_a_predefined_atlas.mlx b/step-by-step/01_atlases_and_brain_parcellations/01_selecting_a_predefined_atlas.mlx index b8a528d..85b9732 100644 Binary files a/step-by-step/01_atlases_and_brain_parcellations/01_selecting_a_predefined_atlas.mlx and b/step-by-step/01_atlases_and_brain_parcellations/01_selecting_a_predefined_atlas.mlx differ diff --git a/step-by-step/01_atlases_and_brain_parcellations/02_find_predefined_parcellations.mlx b/step-by-step/01_atlases_and_brain_parcellations/02_find_predefined_parcellations.mlx index b608abd..b51d0ca 100644 Binary files a/step-by-step/01_atlases_and_brain_parcellations/02_find_predefined_parcellations.mlx and b/step-by-step/01_atlases_and_brain_parcellations/02_find_predefined_parcellations.mlx differ diff --git a/step-by-step/01_atlases_and_brain_parcellations/03_explore_brain_region_hierarchies.mlx b/step-by-step/01_atlases_and_brain_parcellations/03_explore_brain_region_hierarchies.mlx index 27aec88..0200a92 100644 Binary files a/step-by-step/01_atlases_and_brain_parcellations/03_explore_brain_region_hierarchies.mlx and b/step-by-step/01_atlases_and_brain_parcellations/03_explore_brain_region_hierarchies.mlx differ diff --git a/step-by-step/01_atlases_and_brain_parcellations/04_find_brain_regions_in_a_parcellation.mlx b/step-by-step/01_atlases_and_brain_parcellations/04_find_brain_regions_in_a_parcellation.mlx index 61ee340..63da1bb 100644 Binary files a/step-by-step/01_atlases_and_brain_parcellations/04_find_brain_regions_in_a_parcellation.mlx and b/step-by-step/01_atlases_and_brain_parcellations/04_find_brain_regions_in_a_parcellation.mlx differ diff --git a/step-by-step/01_atlases_and_brain_parcellations/05_basic_brain_region_properties.mlx b/step-by-step/01_atlases_and_brain_parcellations/05_basic_brain_region_properties.mlx index 6a2ba77..684116f 100644 Binary files a/step-by-step/01_atlases_and_brain_parcellations/05_basic_brain_region_properties.mlx and b/step-by-step/01_atlases_and_brain_parcellations/05_basic_brain_region_properties.mlx differ diff --git a/step-by-step/01_atlases_and_brain_parcellations/06_spatial_properties_of_brain_regions.mlx b/step-by-step/01_atlases_and_brain_parcellations/06_spatial_properties_of_brain_regions.mlx index 14ba7b1..2fcc798 100644 Binary files a/step-by-step/01_atlases_and_brain_parcellations/06_spatial_properties_of_brain_regions.mlx and b/step-by-step/01_atlases_and_brain_parcellations/06_spatial_properties_of_brain_regions.mlx differ diff --git a/step-by-step/02_maps_and_templates/01_find_predefined_reference_spaces.mlx b/step-by-step/02_maps_and_templates/01_find_predefined_reference_spaces.mlx index 8bd8d23..adae1c3 100644 Binary files a/step-by-step/02_maps_and_templates/01_find_predefined_reference_spaces.mlx and b/step-by-step/02_maps_and_templates/01_find_predefined_reference_spaces.mlx differ diff --git a/step-by-step/02_maps_and_templates/02_access_brain_reference_templates.mlx b/step-by-step/02_maps_and_templates/02_access_brain_reference_templates.mlx index 32c6bac..7033a32 100644 Binary files a/step-by-step/02_maps_and_templates/02_access_brain_reference_templates.mlx and b/step-by-step/02_maps_and_templates/02_access_brain_reference_templates.mlx differ diff --git a/step-by-step/02_maps_and_templates/04_access_big_brain.mlx b/step-by-step/02_maps_and_templates/04_access_big_brain.mlx index 4bda98b..2e09078 100644 Binary files a/step-by-step/02_maps_and_templates/04_access_big_brain.mlx and b/step-by-step/02_maps_and_templates/04_access_big_brain.mlx differ