From 41923c80e4b186fd7fbcb4d203e4928b7aac7f76 Mon Sep 17 00:00:00 2001 From: Pavan Chaggar <56822454+PavanChaggar@users.noreply.github.com> Date: Sat, 28 Oct 2023 20:00:49 +0100 Subject: [PATCH] moving global extension functions --- ext/ConnectomesGraphMakieExt.jl | 18 ------------------ src/plotting.jl | 20 +++++++++++++++++++- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ext/ConnectomesGraphMakieExt.jl b/ext/ConnectomesGraphMakieExt.jl index 2ee5be6..f1d1504 100644 --- a/ext/ConnectomesGraphMakieExt.jl +++ b/ext/ConnectomesGraphMakieExt.jl @@ -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, diff --git a/src/plotting.jl b/src/plotting.jl index 7786ff1..38d22cb 100644 --- a/src/plotting.jl +++ b/src/plotting.jl @@ -8,4 +8,22 @@ function plot_parc! end function plot_vertices end function plot_vertex! end function plot_connectome end -function plot_connectome! end \ No newline at end of file +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]))