JuliaVTK / WriteVTK.jl

Julia package for writing VTK XML files
Other
155 stars 33 forks source link

vtk_save() hangs on Windows with "AUX" filename #10

Closed juliohm closed 8 years ago

juliohm commented 8 years ago

Could you please confirm the following code hangs on Windows? It works just fine on Linux.

using GeoStatsImages
using WriteVTK

function writevtk(filename, grid)
    nx, ny, nz = size(grid)
    vtkfile = vtk_grid(filename, Float64[1:nx;], Float64[1:ny;], Float64[1:nz;], compress=false)
    vtk_point_data(vtkfile, grid, "facies")
    vtk_save(vtkfile)
end

function thickness(basin)
    AUX = repeat(sum(!isnan(basin),3), inner=[1,1,size(basin,3)])
    AUX = AUX / maximum(AUX)
    AUX[isnan(basin)] = NaN

    AUX
end

GRID = thickness(training_image("Flumy"))

writevtk("AUX", GRID)
juliohm commented 8 years ago

The issue is the filename, whenever I set it to AUX, the code hangs on Windows.

juliohm commented 8 years ago

@jipolanco can you reproduce the issue?

jipolanco commented 8 years ago

Sorry, I don't have windows, so I can't reproduce it.

juliohm commented 8 years ago

I'll get back to you tomorrow when I have access to this Windows workstation again, I don't know why this particular name is causing the issue.

-Júlio

juliohm commented 8 years ago

Answering all the questions:

juliohm commented 8 years ago

Windows is weird!

http://blog.onetechnical.com/2006/11/16/forbidden-file-and-folder-names-on-windows/