Skip to content

Commit

Permalink
moving global extension functions
Browse files Browse the repository at this point in the history
  • Loading branch information
PavanChaggar committed Oct 28, 2023
1 parent 94442da commit 41923c8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
18 changes: 0 additions & 18 deletions ext/ConnectomesGraphMakieExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,6 @@ using ColorSchemes, Colors
using LinearAlgebra
using Graphs

const meshpath = artifact"DKTMeshes"
mni_cortex() = joinpath(meshpath, "meshes/cortex/connectome-cortex.obj")
fs_cortex() = joinpath(meshpath, "meshes/cortex/fs-cortex.obj")
rh_cortex() = joinpath(meshpath, "meshes/cortex/rh-cortex.obj")
lh_cortex() = joinpath(meshpath, "meshes/cortex/lh-cortex.obj")

function set_fig(;resolution::Tuple{Int64, Int64}=(1600,900), view=:front)
f = Figure(resolution = resolution)
ax = Axis3(f[1,1], aspect = :data, azimuth = View[view]pi, elevation=0.0pi)
hidedecorations!(ax)
hidespines!(ax)
f
end

RegionDict = Dict(zip([:left, :right, :all, :connectome], [lh_cortex(), rh_cortex(), fs_cortex(), mni_cortex()]))

View = Dict(zip([:right, :front, :left, :back], [0.0, 0.5, 1.0, 1.5]))

function Connectomes.plot_connectome(connectome::Connectome;
edge_weighted=true,
edge_alpha=false,
Expand Down
20 changes: 19 additions & 1 deletion src/plotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,22 @@ function plot_parc! end
function plot_vertices end
function plot_vertex! end
function plot_connectome end
function plot_connectome! end
function plot_connectome! end

const meshpath = artifact"DKTMeshes"
mni_cortex() = joinpath(meshpath, "meshes/cortex/connectome-cortex.obj")
fs_cortex() = joinpath(meshpath, "meshes/cortex/fs-cortex.obj")
rh_cortex() = joinpath(meshpath, "meshes/cortex/rh-cortex.obj")
lh_cortex() = joinpath(meshpath, "meshes/cortex/lh-cortex.obj")

function set_fig(;resolution::Tuple{Int64, Int64}=(1600,900), view=:front)
f = Figure(resolution = resolution)
ax = Axis3(f[1,1], aspect = :data, azimuth = View[view]pi, elevation=0.0pi)
hidedecorations!(ax)
hidespines!(ax)
f
end

RegionDict = Dict(zip([:left, :right, :all, :connectome], [lh_cortex(), rh_cortex(), fs_cortex(), mni_cortex()]))

View = Dict(zip([:right, :front, :left, :back], [0.0, 0.5, 1.0, 1.5]))

0 comments on commit 41923c8

Please sign in to comment.