Coder Social home page Coder Social logo

orthoview.jl's People

Contributors

rainerheintzmann avatar

Stargazers

 avatar  avatar

Watchers

 avatar

orthoview.jl's Issues

`UndefVarError: Axis not defined`

julia> OrthoView.test_ortho_view()
WARNING: both Images and GLMakie export "Axis"; uses of it in module OrthoView must be qualified
ERROR: UndefVarError: Axis not defined

2D image fails

julia> x = randn((4000, 4000));

julia> @time OrthoView.ortho_view(x)
ERROR: BoundsError: attempt to access 2-element Vector{Float64} at index [3]
Stacktrace:
 [1] getindex
   @ ./array.jl:801 [inlined]
 [2] ortho_view(myim::Matrix{Float64}; preferred_size::Int64, title::String, color::Symbol, markersize::Float64, aspects::Vector{Float64})
   @ OrthoView ~/Documents/Programmierung/Julia/OrthoView.jl/src/OrthoView.jl:339
 [3] ortho_view(myim::Matrix{Float64})
   @ OrthoView ~/Documents/Programmierung/Julia/OrthoView.jl/src/OrthoView.jl:337
 [4] top-level scope
   @ ./timing.jl:210 [inlined]
 [5] top-level scope
   @ ./REPL[4]:0

3D image fails

julia> x = randn((2048, 2048, 5));

julia> OrthoView.ortho!(x)
ERROR: MethodError: no method matching lift(::OrthoView.var"#38#49"{Array{Float64, 3}}, ::Nothing, ::Observables.Observable{Any})
Closest candidates are:
  lift(::Any, ::Observables.AbstractObservable, ::Any...; kw...) at /home/fxw/.julia/packages/Makie/NL7Xw/src/interaction/nodes.jl:9
  lift(::Any, ::Type{T}, ::Observables.AbstractObservable, ::Any...) where T at /home/fxw/.julia/packages/Makie/NL7Xw/src/interaction/nodes.jl:20
Stacktrace:
 [1] ortho!(fig::Makie.Figure, myim::Array{Float64, 3}; title::String, color::Symbol, markersize::Float64, aspects::Vector{Float64})
   @ OrthoView ~/julia/OrthoView.jl/src/OrthoView.jl:277
 [2] ortho!(myim::Array{Float64, 3}; preferred_size::Int64, title::String, color::Symbol, markersize::Float64, aspects::Vector{Float64})
   @ OrthoView ~/julia/OrthoView.jl/src/OrthoView.jl:373
 [3] ortho!(myim::Array{Float64, 3})
   @ OrthoView ~/julia/OrthoView.jl/src/OrthoView.jl:365
 [4] top-level scope
   @ REPL[14]:1

Testimage fails

julia> img = Float32.(testimage("resolution_test"));

julia> ortho!(img)
to_value(gamma) = 1.0
Error showing value of type Makie.Figure:
ERROR: MethodError: no method matching GLMakie.GLAbstraction.Texture(::SubArray{Float32, 2, Array{Float32, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Int64}, true}; minfilter=:nearest)
Closest candidates are:
  (::Type{T})(::Observables.Observable; kw...) where T<:GLMakie.GLAbstraction.GPUArray at /home/fxw/.julia/packages/GLMakie/lcQNS/src/GLAbstraction/AbstractGPUArray.jl:209
  GLMakie.GLAbstraction.Texture(::Array{Matrix{T}, 1}; internalformat, texturetype, format, parameters...) where T<:Union{Real, ColorTypes.Colorant, StaticArrays.StaticVector{N, T} where {N, T}} at /home/fxw/.julia/packages/GLMakie/lcQNS/src/GLAbstraction/GLTexture.jl:131
  GLMakie.GLAbstraction.Texture(::ShaderAbstractions.Sampler{T, N, Data} where Data; kwargs...) where {T, N} at /home/fxw/.julia/packages/GLMakie/lcQNS/src/GLAbstraction/GLTexture.jl:117
  ...
Stacktrace:
  [1] GLMakie.GLAbstraction.Texture(x::Observables.Observable{SubArray{Float32, 2, Array{Float32, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Int64}, true}}; kw::Base.Iterators.Pairs{Symbol, Symbol, Tuple{Symbol}, NamedTuple{(:minfilter,), Tuple{Symbol}}})
    @ GLMakie.GLAbstraction ~/.julia/packages/GLMakie/lcQNS/src/GLAbstraction/AbstractGPUArray.jl:210
  [2] (::GLMakie.var"#132#137"{Makie.Scene, MakieCore.Heatmap{Tuple{IntervalSets.ClosedInterval{Float32}, IntervalSets.ClosedInterval{Float32}, SubArray{Float32, 2, Array{Float32, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Int64}, true}}}})(gl_attributes::Dict{Symbol, Any})
    @ GLMakie ~/.julia/packages/GLMakie/lcQNS/src/drawing_primitives.jl:393
  [3] (::GLMakie.var"#76#82"{GLMakie.var"#132#137"{Makie.Scene, MakieCore.Heatmap{Tuple{IntervalSets.ClosedInterval{Float32}, IntervalSets.ClosedInterval{Float32}, SubArray{Float32, 2, Array{Float32, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Int64}, true}}}}, GLMakie.Screen, Makie.Scene, MakieCore.Heatmap{Tuple{IntervalSets.ClosedInterval{Float32}, IntervalSets.ClosedInterval{Float32}, SubArray{Float32, 2, Array{Float32, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Int64}, true}}}})()
    @ GLMakie ~/.julia/packages/GLMakie/lcQNS/src/drawing_primitives.jl:75
  [4] get!(default::GLMakie.var"#76#82"{GLMakie.var"#132#137"{Makie.Scene, MakieCore.Heatmap{Tuple{IntervalSets.ClosedInterval{Float32}, IntervalSets.ClosedInterval{Float32}, SubArray{Float32, 2, Array{Float32, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Int64}, true}}}}, GLMakie.Screen, Makie.Scene, MakieCore.Heatmap{Tuple{IntervalSets.ClosedInterval{Float32}, IntervalSets.ClosedInterval{Float32}, SubArray{Float32, 2, Array{Float32, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Int64}, true}}}}, h::Dict{UInt64, GLMakie.GLAbstraction.RenderObject}, key::UInt64)
    @ Base ./dict.jl:465
  [5] cached_robj!(robj_func::GLMakie.var"#132#137"{Makie.Scene, MakieCore.Heatmap{Tuple{IntervalSets.ClosedInterval{Float32}, IntervalSets.ClosedInterval{Float32}, SubArray{Float32, 2, Array{Float32, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Int64}, true}}}}, screen::GLMakie.Screen, scene::Makie.Scene, x::MakieCore.Heatmap{Tuple{IntervalSets.ClosedInterval{Float32}, IntervalSets.ClosedInterval{Float32}, SubArray{Float32, 2, Array{Float32, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Int64}, true}}})
    @ GLMakie ~/.julia/packages/GLMakie/lcQNS/src/drawing_primitives.jl:51
  [6] draw_atomic(screen::GLMakie.Screen, scene::Makie.Scene, x::MakieCore.Heatmap{Tuple{IntervalSets.ClosedInterval{Float32}, IntervalSets.ClosedInterval{Float32}, SubArray{Float32, 2, Array{Float32, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Int64}, true}}})
    @ GLMakie ~/.julia/packages/GLMakie/lcQNS/src/drawing_primitives.jl:361
  [7] insert!(screen::GLMakie.Screen, scene::Makie.Scene, x::MakieCore.Combined)
    @ GLMakie ~/.julia/packages/GLMakie/lcQNS/src/drawing_primitives.jl:176
  [8] insertplots!(screen::GLMakie.Screen, scene::Makie.Scene)
    @ GLMakie ~/.julia/packages/GLMakie/lcQNS/src/screen.jl:56
  [9] #34
    @ ~/.julia/packages/GLMakie/lcQNS/src/screen.jl:58 [inlined]
 [10] foreach(f::GLMakie.var"#34#36"{GLMakie.Screen}, itr::Vector{Makie.Scene})
    @ Base ./abstractarray.jl:2141
 [11] insertplots!(screen::GLMakie.Screen, scene::Makie.Scene)
    @ GLMakie ~/.julia/packages/GLMakie/lcQNS/src/screen.jl:58
 [12] backend_display(screen::GLMakie.Screen, scene::Makie.Scene)
    @ GLMakie ~/.julia/packages/GLMakie/lcQNS/src/display.jl:18
 [13] backend_display
    @ ~/.julia/packages/GLMakie/lcQNS/src/display.jl:4 [inlined]
 [14] display(scene::Makie.Scene; update::Bool)
    @ Makie ~/.julia/packages/Makie/NL7Xw/src/display.jl:60
 [15] display
    @ ~/.julia/packages/Makie/NL7Xw/src/display.jl:56 [inlined]
 [16] #display#903
    @ ~/.julia/packages/Makie/NL7Xw/src/display.jl:52 [inlined]
 [17] display(fig::Makie.Figure)
    @ Makie ~/.julia/packages/Makie/NL7Xw/src/display.jl:52
 [18] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
 [19] invokelatest
    @ ./essentials.jl:706 [inlined]
 [20] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:247
 [21] (::REPL.var"#40#41"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:231
 [22] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:462
 [23] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:229
 [24] (::REPL.var"#do_respond#61"{Bool, Bool, REPL.var"#72#82"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:798
 [25] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
 [26] invokelatest
    @ ./essentials.jl:706 [inlined]
 [27] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2441
 [28] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:1126
 [29] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL ./task.jl:411

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.