Hello Jullio!
Thank you again a lot for help in this thread: [Makie.jl] 3D voxelized visualization of a cubical matrix - #5 by juliohm
However, just today i can’t make the same 3D visualizations - i guess due to some updates. Here are the errors i got:
ERROR: LoadError: MethodError: Cannot convert an object of type
Tuple{Symbol, Float64} to an object of type
ColorTypes.Colorant
Closest candidates are:
convert(::Type{C}, ::C) where C<:ColorTypes.Colorant at C:\Users\M K\.julia\packages\ColorTypes\6m8P7\src\conversions.jl:72
convert(::Type{C}, ::ColorTypes.Colorant) where C<:ColorTypes.Colorant at C:\Users\M K\.julia\packages\ColorTypes\6m8P7\src\conversions.jl:73
convert(::Type{C}, ::Number) where C<:ColorTypes.Colorant at C:\Users\M K\.julia\packages\ColorTypes\6m8P7\src\conversions.jl:74
The error is for the code in our thread:
using Meshes, MeshViz
import GLMakie as Mke
path = "/path/to/image.raw"
nvox = round(Int, filesize(path)^(1/3))
buff = zeros(UInt8, nvox, nvox, nvox)
stream = open(path, "r")
read!(stream, buff)
close(stream)
colors = replace(buff, 0 => (:black,0.01), 1 => (:yellow,0.7))
grid = CartesianGrid(nvox, nvox, nvox)
viz(grid, color = vec(colors))
Any idea how this error could be fixed?
Thank you in advance