Skip to content

Commit

Permalink
Merge branch 'master' into test-motion
Browse files Browse the repository at this point in the history
  • Loading branch information
pvillacorta authored Jan 2, 2025
2 parents a0c0d5a + 99dc53a commit 287deff
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
version:
- '1.10' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
os: [ubuntu-latest, windows-latest, macos-12] # macos-latest] <- M1 Mac was generating problems #386, commented for now
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [x64]
include:
- os: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions KomaMRIPlots/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Kaleido_jll = "f7e6163d-2fa5-5f23-b69c-1db539e41963"
KomaMRIBase = "d0bc0b20-b151-4d03-b2a4-6ca51751cb9c"
MAT = "23992714-dd62-5051-b70f-ba57cb901cac"
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
QMRIColors = "2bec176e-9e8c-4764-a62f-295118d1ec05"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"

[weakdeps]
Expand All @@ -24,6 +25,7 @@ KomaMRIBase = "0.9"
MAT = "0.10"
PlotlyJS = "0.18"
PlutoPlotly = "0.4, 0.5"
QMRIColors = "1"
Reexport = "1"
julia = "1.9"

Expand Down
1 change: 1 addition & 0 deletions KomaMRIPlots/src/KomaMRIPlots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module KomaMRIPlots

using KomaMRIBase
using MAT, Interpolations, PlotlyJS
using QMRIColors

include("ui/PlotBackends.jl")
include("ui/DisplayFunctions.jl")
Expand Down
40 changes: 11 additions & 29 deletions KomaMRIPlots/src/ui/DisplayFunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ function plot_kspace(seq::Sequence; width=nothing, height=nothing, darkmode=fals
"resetCameraLastSave3d",
"orbitRotation",
"resetCameraDefault3d",
],
],
)
return plot_koma(p, l; config)
end
Expand Down Expand Up @@ -1080,38 +1080,20 @@ function plot_phantom_map(
unit = " ms"
if key == :T1
cmax_key = 2500 / factor
colors = MAT.matread(path * "/assets/T1cm.mat")["T1colormap"][1:70:end, :]
N, _ = size(colors)
idx = range(0, 1; length=N) #range(0,T,N) works in Julia 1.7
colormap = [
(
idx[n],
string("rgb(",
floor(Int, colors[n,1] * 255), ",",
floor(Int, colors[n,2] * 255), ",",
floor(Int, colors[n,3] * 255), ")"
)
)
for n in 1:N
]
colors =
replace.(string.(relaxationColorMap("T1") .* 255), "RGB{Float64}" => "rgb")
N = length(colors)
indices = range(0.0; stop=1.0, length=N)
colormap = [(idx, color) for (idx, color) in zip(indices, colors)]
elseif key == :T2 || key == :T2s
if key == :T2
cmax_key = 250 / factor
end
colors = MAT.matread(path * "/assets/T2cm.mat")["T2colormap"][1:70:end, :]
N, _ = size(colors)
idx = range(0, 1; length=N) #range(0,T,N) works in Julia 1.7
colormap = [
(
idx[n],
string("rgb(",
floor(Int, colors[n,1] * 255), ",",
floor(Int, colors[n,2] * 255), ",",
floor(Int, colors[n,3] * 255), ")"
)
)
for n in 1:N
]
colors =
replace.(string.(relaxationColorMap("T2") .* 255), "RGB{Float64}" => "rgb")
N = length(colors)
indices = range(0.0; stop=1.0, length=N)
colormap = [(idx, color) for (idx, color) in zip(indices, colors)]
end
elseif key == :x || key == :y || key == :z
factor = 1e2
Expand Down

0 comments on commit 287deff

Please sign in to comment.