-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
help with osx installation #21
Comments
Hi Michael, This is a packaging issue. You should run "make install" to install displaz (see the cmake config for where this will end up on your system). I'd love to provide a downloadable package for OSX so you don't need to deal with building it at all, but unfortunately I just don't have the hardware to test it on. (I do, however accept pull requests, so if you happened to be interested in fixing that problem you could look at the osx-package branch in the displaz repo ;-) ) Regarding LASlib - I now include that with the displaz source, so you don't need to worry about it. I've tweaked the displaz README in an attempt to clarify that. |
Nice! that worked, thanks a lot Chris! |
BTW, the last example in your readme doesn't work: julia> # Plot a pair of line series between vertices 1:2 and 3:5
plot3d!(position, color="r", linebreak=[1,3], markershape="-", label="Example3 Lines")
ERROR: position must be a 3xN array
Stacktrace:
[1] #plot3d#9(::String, ::Array{Float64,1}, ::String, ::String, ::Array{Int64,1}, ::Bool, ::Array{Any,1}, ::Function, ::Displaz.DisplazWindow, ::Array{SVector{3,Float64},1}) at /Users/michael/.julia/v0.6/Displaz/src/Displaz.jl:283
[2] (::Displaz.#kw##plot3d)(::Array{Any,1}, ::Displaz.#plot3d, ::Displaz.DisplazWindow, ::Array{SVector{3,Float64},1}) at ./<missing>:0
[3] #plot3d!#13(::Array{Any,1}, ::Function, ::Displaz.DisplazWindow, ::Array{SVector{3,Float64},1}) at /Users/michael/.julia/v0.6/Displaz/src/Displaz.jl:341
[4] (::Displaz.#kw##plot3d!)(::Array{Any,1}, ::Displaz.#plot3d!, ::Displaz.DisplazWindow, ::Array{SVector{3,Float64},1}) at ./<missing>:0
[5] #plot3d!#14(::Array{Any,1}, ::Function, ::Array{SVector{3,Float64},1}) at /Users/michael/.julia/v0.6/Displaz/src/Displaz.jl:346
[6] (::Displaz.#kw##plot3d!)(::Array{Any,1}, ::Displaz.#plot3d!, ::Array{SVector{3,Float64},1}) at ./<missing>:0
julia> # mutate the color of the first two points (efficient for modifying a subset of points)
Displaz.mutate!("Example3 Points", 1:2; color = [Gray{Float64}(1.0)])
ERROR: UndefVarError: mutate! not defined |
Oh and sorry if I'm being exceedingly daft, but eh how would I load the laz files into julia for plotting? |
Muarhaha I can just use the "File" menu item in Displaz, at least to view ths data. Never mind me. |
@c42f I have no clue about cmake, packaging and unix installs. But I am happy to be your tester :-) |
Strange that the example in the readme didn't work. Which version/commit are you on? Perhaps the package needs a new tag? To read las into julia I've been using LasIO.jl. Maybe like this :) using FileIO, LasIO, Displaz, StaticArrays
h, points = load(lasfile)
positions = map(p -> SVector{3, Float64}((p.x * h.x_scale) + h.x_offset, (p.y * h.y_scale) + h.y_offset, (p.z * h.z_scale) + h.y_offset), points)
plot3d(positions) |
The package needs a new tag indeed. I've just been too embarrassed by the lack of tests to make one, but conversely too busy with other things to write proper tests! |
Thanks @JoshChristie ! It's very useful to have the data as a julia object |
Hey @JoshChristie I got it to work now with LasIO (on their laszip branch) but it seems the code I need is slightly different. using FileIO, LasIO, Displaz
header, points = load(lazfile)
pos = Matrix{Float64}(3, length(points))
for i in linearindices(points)
pos[1,i] = points[i].x * header.x_scale + header.x_offset
pos[2,i] = points[i].y * header.y_scale + header.y_offset
pos[3,i] = points[i].z * header.z_scale + header.z_offset
end
plot3d!(pos) It all works great, but (of course) does not import all the properties of the points, such as their colour and classification. I get these when I open using displaz' window directly. Is there a way to get this information out of the header and pass to displaz? Do you intend to support |
Hi, You could do something like this :) using FileIO, LasIO, Displaz
using FixedPointNumbers
header, points = load(lazfile)
pos = Matrix{Float64}(3, length(points))
classification = Vector{UInt8}(length(points))
color = Matrix{N0f16}(3, length(points))
for i in linearindices(points)
pos[1,i] = points[i].x * header.x_scale + header.x_offset
pos[2,i] = points[i].y * header.y_scale + header.y_offset
pos[3,i] = points[i].z * header.z_scale + header.z_offset
classification[i] = points[i].raw_classification
color[1,i] = points[i].red
color[2,i] = points[i].green
color[3,i] = points[i].blue
end
plot3d(pos, classification = classification, color = color)
# Then manually change the displaz shader to laz points. (In displaz at the top select Shader -> Open -> las_points.glsl) |
Nice, thank you! |
Hi, I'm having trouble getting this installed on OS X.
I updated docutils and cmake, cloned the displaz repo, and ran the OS X instructions in the .travis.yml file. Everything seemed to go smoothly. I then installed the Displaz.jl package.
I had to
export PATH=/Users/michael/Documents/github/displaz/build/bin:$PATH
in order for julia to find displaz. Now I get the displaz window opening withplot3d!(10*randn(3,100000))
, but lots of error messages:Do I need to add more things to PATH?
Also, the installation instructions say I need LASlib to open .las files, but the link does not provide any installation instructions. You may not be able to help with this, just checking that I should be able to work this on my Mac? (it seems very windows-specific).
Thanks!
The text was updated successfully, but these errors were encountered: