Code Monkey home page Code Monkey logo

openvisus's Introduction

OpenViSUS Visualization project

GitHub Actions Binder

Mission

The mission of ViSUS.org is to provide support for the scientific community with Big Data, management, analysis and visualization tools.

In this website we provide access to open source software tools and libraries such as the ViSUS framework and the PIDX library. These softwares are distributed under the permissive BSD license (see LICENSE file).

Installation

For conda see docs/conda-installation.md.

Make sure pip is installed, updated and in PATH.

pip install --upgrade OpenVisus
# configure OpenVisus (one time)
python -m OpenVisus configure 
# test installation
python -c "from OpenVisus import *"

Notes:

  • if you get permission denied error, use pip install --user.
  • if you need a minimal installation without the GUI replace OpenVisus with OpenVisusNoGui
  • If you want to create an isolated virtual environment with virtualenv:
# make sure venv is latest
pip install --upgrade virtualenv
# create a virtual environment in current directory
venv ./ovenv
# activate the virtual environment
source ./ovenv/bin/activate

Run the OpenVisus viewer:

python -m OpenVisus viewer

Handle with PyQt errors

Sometimes, PyQt (or other packages like pyqt5-sip) is already installed in system and OpenVisus viewer gets confused which package to use.

To solve that issue, follow these steps before main installation:

  • If on linux, make sure PyQt5 or any of it's related packages are not installed system-wide.
    • For Ubuntu use sudo apt remove python3-pyqt5 to remove pyqt5 and all other related packages listed here.
    • For any Arch based distro, use sudo pacman -Rs python-pyqt5. Same for all other packages like python-pyqt5-sip.
  • Remove all pyqt5 packages with pip:
    • pip uninstall pyqt5 PyQt5-sip

Documentation

You can find OpenViSUS documentation regarding the install, configuration, viewer, and Python package here.

Quick Tour and Tutorials

Start with quick_tour.ipynb Jupyter Notebook.

See Samples/jupyter directory.

To run the tutorials on the cloud click this binder link.

Other documentation

Run single Docker OpenVisus server:

Run load-balanced Docker Swarm OpenVisus servers:

Run Docker OpenVisus server with group security:

Debug mod_visus:

Runload-balanced Kubernetes OpenVisus servers:

Compile OpenVisus:

Convert to OpenVisus file format, and similar:

Convert to using a proxy:

VISUS_IDX2

Links:

if you are debugging in Windows (change as needed):

SET PATH=%PATH%;C:\Python310;C:\Python310\Lib\site-packages\PyQt5\Qt\bin;c:\projects\OpenVisus\build\RelWithDebInfo\OpenVisus\bin
SET VISUS_VERBOSE_DISKACCESS=0
SET VISUS_CPP_VERBOSE=0

Download a test file from here:

curl -L https://github.com/sci-visus/OpenVisus/releases/download/files/MIRANDA-DENSITY-.384-384-256.-Float64.raw -O
python.exe Samples/python/extract_slices.py MIRANDA-DENSITY-.384-384-256.-Float64.raw  384 384 256 float64 ./tmp/input

Test pure IDX2, with IDX2 legacy file format (not cachable, not cloud-ready)

set VISUS_IDX2_USE_LEGACY_FILE_FORMAT=1

# this will create 
#    `tmp/legagy/Miranda/Density.idx` 
#    `tmp/legacy/Miranda/Density/L00.bin`

rmdir /S /Q tmp\legacy
visus.exe idx2 --encode "MIRANDA-DENSITY-.384-384-256.-Float64.raw" --name Miranda --field Density --dims 384 384 256 --type float64 --tolerance 1e-16 --num_levels 2 --out_dir tmp/legacy

# this will extract some data from the IDX2 file and `L*.bin` files
#   NOTE the dimension are 1+value/2
cd tmp\legacy
visus.exe idx2 --decode Miranda/Density.idx2 --downsampling 1 1 1 --tolerance 0.001 --out_file "output.legacy.raw"
python.exe ../../Samples/python/extract_slices.py output.legacy.raw 193 193 129 float64 ./decoded

cd ..

unset VISUS_IDX2_USE_LEGACY_FILE_FORMAT

Then test using one-chunk per file (useful for CloudAccess, DiskAccess etc):

  • you will see a lot of files, one per block/chunk
  • probably blocks are too small
# this will create 
#    `tmp/arco/Miranda/Density.idx` and 
#    `tmp/arco/Miranda/Density/0==<timestep>/Density==<fieldname>/0000/0000/0000/0000.bin`

rmdir /S /Q tmp\arco
visus.exe idx2 --encode MIRANDA-DENSITY-.384-384-256.-Float64.raw --name Miranda --field Density --dims  384 384 256 --type float64 --tolerance 1e-16 --num_levels 2 --out_dir tmp/arco

# NOTE: don't need to compress since the compression/decompression is really the IDX encoding/decoding
# in fact you will see blocks of different sizes

# export the output (NOTE the dimension are 1+value/2)
#   NOTE the dimension are 1+value/2
cd tmp\arco
visus.exe idx2  --decode "Miranda\Density.idx2" --downsampling 1 1 1 --tolerance 0.001 --out_file output.arco.raw
python.exe ../../Samples/python/extract_slices.py output.arco.raw 193 193 129 float64 ./decoded
cd ..\..

# (OPTIONAL) if you want the data on the cloud
#   e.g.  s3://utah/idx2/Miranda/Density.idx2
#   e.g.  s3://utah/idx2/Miranda/Density/0/Density/0000/0000/0000/0000.bin
aws s3 --profile sealstorage --no-verify-ssl sync ./tmp/arco/Miranda s3://utah/idx2/Miranda/

You can create a visus.config with:

  • NOTE: compression will be automatically set to raw since the compression/decompression is really IDX2 encoding/decoding
  •   current implementation does read blocks (i.e. IDX2 chunks) serially so first network access will be SLOW. Caching will help later.
    
  •   atomic IO operation are "chunk" reading. Need to investigate if a chunk is made of mantissa/exponent or is selectively possible to read piece of info (IMPORTANT!)
    
<dataset name="idx2-legacy"   url="tmp/legacy/Miranda/Density.idx2?legacy=1" />
<dataset name="idx2-arco"     url='tmp/arco/Miranda/Density.idx2' />
<dataset name="idx2-cloud"    url='https://maritime.sealstorage.io/api/v0/s3/utah/idx2/Miranda/Density.idx2?profile=sealstorage&amp;cached=arco' />

openvisus's People

Contributors

aashishpanta0 avatar amygooch avatar anikethvenkat avatar cchriste avatar hoang-dt avatar klacansky avatar natevm avatar pascucci avatar ptbremer avatar rahatzamancse avatar saurabhnarain avatar scrgiorgio avatar spetruzza avatar stevencallahan avatar tjhei avatar twinklebear avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openvisus's Issues

Python Viewer.py sample broken

Imports seem to rely on a local build environment. I can fix this issue by adding "from OpenVisus import *" at the top of the examples.

fatal error: 'Foundation/NSAutoreleasePool.h' file not found

Error:

/disk-samsung/freebsd-ports/science/openvisus/work/OpenVisus-2.2.65/Libs/Kernel/src/Kernel.mm:41:9: fatal error: 'Foundation/NSAutoreleasePool.h' file not found
#import <Foundation/NSAutoreleasePool.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

This code is obviously wrong because clang certainly doesn't install the file Foundation/NSAutoreleasePool.h.

Version: 2.2.65
FreeBSD 13.1 STABLE

MIDX dataset with no name causes crash

The following without a "name" parameter for the dataset make the viewer crash.

<dataset typename='IdxMultipleDataset'>
  <dataset url='http://atlantis.sci.utah.edu/mod_visus?dataset=2kbit1'>
		<M value="1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1 0.0 0.0 0.0 0.0 1.0"/>
  </dataset>
</dataset>

We could generate a random name or simply report the error to the user.

add dockerhub deployment to TravisCI

We have build_all.sh and test_all.sh scripts in OpenVisus/Docker that build most of our various Docker images. I've manually pushed these to dockerhub. Can this be added to Travis so when the tag is updated we get the latest pushed to dockerhub? Let's be sure to add the tag so existing builds can continue to be used for the various projects build upon them.

The only thing that we might need to add to the build_all script is --no-cache since otherwise docker build might re-use code that has been updated (e.g., the code cloned from visus_javascript)

SharedPtr define in namespace

In the latest master we use

#define SharedPtr std::shared_ptr

But in the downstream code I usually try to avoid a
using namespace Visus;
to avoid polluting my namespace

Instead, I think the more correct usage (I think) is

Visus::SharedPtr pFoo;

But this now lead to an error on my system.

error: no member named 'std' in namespace 'Visus'; did you mean simply 'std'?

The reason is that we are using a #define rather than a typedef which means that my statement get expanded into

Visus::std::SharedPtr pFoo;

which does not compile.

I propose to simply switch to a typedef in Kernel.h, i.e.

typedef SharedPtr std::shared_ptr;

which should fix this

Curl does not build on Linux

On the LLNL clusters the OpenVisus master branch does not build because the system misses stropts.h

external/curl/lib/if2ip.c:47:23: fatal error: stropts.h: No such file or directory

removing it from the source temporarily fixes the issue. The correct solution seems to be to make sure we use

HAVE_STROPTS_H=0

not sure how to do that since we are building from pre-configured source and this might not apply to all systems

PyDataset lacks Load function as mentioned in the docstring of the read method

I would also suggest adding function open(url) as alias to the LoadDataset(url).

>>> import OpenVisus as ov
>>> db = ov.LoadDataset('http://atlantis.sci.utah.edu/mod_visus?dataset=2kbit1')
164647378 NetService:731 28724:12860 GET connection 0 wait 10 running 18 download 311  -  16 kb/sec) status STATUS_OK url http://atlantis.sci.utah.edu/mod_visus?dataset=2kbit1
>>> help(db.read)
Help on method read in module OpenVisus.dataset:

read(logic_box=None, x=None, y=None, z=None, time=None, field=None, num_refinements=1, quality=0, max_resolution=None, disable_filters=False, access=None) method of OpenVisus.dataset.PyDataset instance
    db=PyDataset.Load(url)

    # example of reading a single slice in logic coordinates
    data=db.read(z=[512,513])

    # example of reading a single slice in normalized coordinates (i.e. [0,1])
    data.db.read(x=[0,0.1],y=[0,0.1],z=[0,0.1])

    # example of reading a single slice with 3 refinements
    for data in db.read(z=[512,513],num_refinements=3):
            print(data)

>>> ov.PyDataset.Load('http://atlantis.sci.utah.edu/mod_visus?dataset=2kbit1')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'PyDataset' has no attribute 'Load'

default_layout is empty when idx is created from Python

import numpy as np
from OpenVisus import *
CreateIdx(url='test.idx', dim=3, data=np.zeros((100,100,100)))

creates the following file

(version)
6
(box)
0 99 0 99 0 99
(fields)
DATA float64 default_compression(zip) default_layout() default_value(0) min(0) max(0) 
(bits)
V012012012012012012012
(bitsperblock)
16
(blocksperfile)
32
(interleave block)
0
(filename_template)
./test/%04x.bin
(missing_blocks)
0

The default_layout() is empty, which in turn makes the parser in Field.cpp to parse the layout as "default_value(0" (line 95), which in turn crashes visus in debug mode in file IdxFile.cpp on line 197.

I suggest to either fix the parsing code (by setting the thrid argument, bPurgeEmptyItems, to false) or generate idx file with default_layout present.

SSL library needs to be upgraded

The current SSL is too old a version for some servers (ex: anything at a national lab). We need to link to a newer version, so probably adding the latest libssl to OpenVisus like we do with many other libs.

You can test by trying to open:
https://aims2.llnl.gov/visus/mod_visus?dataset=1_BlueMarble

visus create exception empty array

Executing a create command as follow:
visus create test.idx --box "0 511 0 511 0 255" --fields "data 1*uint8" --time 0 0 time%03d/

results in the following exception:

[main: 2092] [pid 7475:tid 139642717796352] [15.08.43.908] // *** STEP create ***
[main: 2093] [pid 7475:tid 139642717796352] [15.08.43.908] Input dtype() dims() args(create heart.idx --box 0 511 0 511 0 255 --fields data 1*uint8 --time 0 0 time%03d/)
[main: 2172] [pid 7475:tid 139642717796352] [15.08.43.908] ERROR: Visus throwing exception file(/path/to/OpenVisus/Executable/visus/main.cpp) line(117) expr(create got empty array)...
[Idx: 83] [pid 7475:tid 139642717796352] [15.08.43.908] Detaching IdxModule...

The create should not require an input Array (as when we use import), it should just create the metadata file (as before).

Source build

Doing ./build.sh forces an install into /usr/local which requires root privileges for me. I cannot find a way to switch the install target.

More importantly, when I try to do

sudo ./build.sh

I end up at

  • brew update
    Error: Cowardly refusing to 'sudo brew update'
    You can use brew with sudo, but only if the brew executable is owned by root.
    However, this is both not recommended and completely unsupported so do so at
    your own risk.

Seems like I cannot get around this

visus compress-dataset seems to not work

The compress-dataset command seems broken. When tried on a dataset, the data is either not compressed, or is different from data compressed using the "import export" commands. As a work around, I'm attaching a Python script that will do the compression using "import export" commands.

idx-compress.zip

Field Node keeps switching channels

The field node keeps reverting to ch0. The top selection menu will switch back to ch0 alomst immediately and even though the actual scripting window might show ch1 the data actually will come from ch0.

This can be triggered by something as simple as a zoom in.

This makes it almost impossible to work with multi-channel data

Unable to import OpenVisus in python 3.7

When I try to import OpenVisus, init.py calls "from .OpenVisus import *", which returns the error message: " ModuleNotFoundError: No module named 'OpenVisus.OpenVisus'.

By changing "from .OpenVisus import *" to "from . import *", the error goes away.

Cannot run conda based viewer

Installing the latest OpenVisus on top of a python 3.7 based anaconda leads to

ImportError: dlopen(/Users/bremer5/opt/anaconda3/envs/visus/lib/python3.7/site-packages/OpenVisus/_VisusGuiPy.so, 2): Library not loaded: @rpath/QtOpenGL.framework/Versions/5/QtOpenGL
Referenced from: /Users/bremer5/opt/anaconda3/envs/visus/lib/python3.7/site-packages/OpenVisus/_VisusGuiPy.so

The problem seems to be the wrong rpath? I see

Executing command ['install_name_tool', '-add_rpath', '/Users/bremer5/opt/anaconda3/envs/visus/lib', 'bin/libVisusGui.dylib']

But

/Users/bremer5/opt/anaconda3/envs/visus/lib/QtOpenGL.framework/Versions/5/QtOpenGL

does not exist. Instead is seems we need

/Users/bremer5/opt/anaconda3/envs/visus/lib/python3.7//site-packages/PyQt5/Qt5/lib/QtOpenGL.framework/Versions/5/QtOpenGL

OS X 10.15.7

Erroneously Shared Memory in Python

Using the latest OpenVisus pip installation with anaconda 3.7 on my 10.14 OS X I get a weird sharing of memory or maybe a reference that should be a value.

I am trying to place staggered slices into a larger volume (see the attached code). However, even though

query.buffer = Array()

should create a new array from scratch each time it looks like I am getting always the same array. Meaning the top slices have data from the lower ones. Even explicitly clearing the array does not help.

I will send the data and code separately (please don't distribute)

Screen Shot 2019-08-11 at 5 48 26 PM

OpenVisus installs files back into the build directory

Instructions like this cause files to be installed into build directory. like this file:

/disk-samsung/freebsd-ports/science/openvisus/work/.build/Release/OpenVisus/include/Gui/Visus/ArrayStatisticsView.h

This install instruction should look like this:

INSTALL(DIRECTORY Libs/Kernel/include               DESTINATION include/OpenVisus)

In its current form OpenVisus can't be installed into a standard file hierarchy with bin/include/lib/share directories.

Swig bound objects don't print nicely

The swig bindings for all visus bound objects are missing representations, which mean they all print an unhelpful swig pointer. Adding representations is fairly easy to do though, and would add a lot of value to the current bindings.

Here's an example of how to add a python representation to a swig bound object:

/* Representations */
%extend Entity {
%feature("python:slot", "tp_repr", functype="reprfunc") repr;
std::string repr() { return $self->to_string(); }
}

Add compression parameters (useful for e.g., compressing NEON data sets)

Some compression schemes could benefit from parameter tuning. For example, the NEON data set when compressed with JPG by default produces quite a bit of artifacts, but with a different set of parameters the artifacts are gone, while retaining reasonable compression ratio. I propose adding a list of floating point values after the compression scheme, e.g. instead of (jpg) we have (jpg-1.0, 2.4, 3).

The compression scheme can still be parsed by extracting the substring before the dash "-". The list of values can be parsed and stored as std::vector, and forwarded to the appropriate Encoder, which will be able to make sense of the list. Future parameters can just be appended to the list and backward-compatibility is maintained as long as we do not change the meaning of the existing parameters.

Cannot export midx

Saving midx as raw fails because you try to append the field to the filename and it is too long.........

Issues with Free Transform

Reproducibility (see attached video):

Issue 1: Open any dataset, double click on Volume 1, Goto Free Transform -> Position and look at the query box. The box is set to all zeros. Click on Preview (tab next to Position) and come back to Position tab and the box is properly initialized.

Issue 2: Goto Free Transform -> Position/Preview and click anywhere on the GL canvas.
Observation: the manipulator disappears and the Free Transform Window becomes inactive. Clicking on the volume brings back the manipulator, but the Free Transform Window is still inactive (see video)

Free_Transform_Bug.zip

Add user specification of bounds to visus minmax

Some datasets (e.g., climate simulations) use specific bounds for out-of-range data that are smaller that min/max of a float. visus minmax can not compute usable bounds for these type of datasets. Allow user to specify the valid range so values outside that range can be ignored.

      else if (args[I] == "--min") { min_val = cdouble(args[++I]); }
      else if (args[I] == "--max") { max_val = cdouble(args[++I]); }
      ...

visus minmax produces incorrect results

Running minmax with a non-pow2 dimension dataset with all values > 0 results in 0.0 as the result for min, likely because it's reading data outside the dataset bounds.

use logic_to_physic when specified in .idx file

While logic_to_physic has been deprecated in favor of utilizing transforms specified in .xidx, it's still present in many existing .idx datasets and should continue to be honored since it is part of version 6 idx files. This is necessary since these datasets may not be able to be modified due to permissions or because they are hosted by an older version of the mod_visus server.

Example dataset (field highlighted with ***):
(version)
6
***
(logic_to_physic)
1.875 0 0 0 0 1.25 0 0 0 0 1 0 0 0 0 1
***
(box)
0 191 0 144 0 0 0 0 0 0
(fields)
tas float32 compressed format(0) 
+ pr float32 compressed format(0) 
+ huss float32 compressed format(0) 
+ psl float32 compressed format(0) 
+ tasmin float32 compressed format(0) 
+ tasmax float32 compressed format(0) 
(bits)
V0101010101010101
(bitsperblock)
16
(blocksperfile)
1
(interleave block)
0
(time)
time%05d/ (0,0,1) (0,52559,1) 
(filename_template)
./visus/%01x.bin

Opening unreachable datasets hangs

It seems that if you try to open a dataset that you cannot reach both the viewer and the jupyter notebook hangs indefinitely rather than returning some empty data or a data not found error. I.e. something like

	<alias key="server" value="https://acam.apps.czapps.llnl.gov"/>
	<alias key="username" value="visus"/>
	<alias key="password" value="xxxxxxxxxxxxxxxxxxxxxxxxx"/>
	<dataset name="AMTruss" url="$(server)/mod_visus?dataset=AMTruss&amp;~auth_username=$(username)&amp;~auth_password=$(password)"/>

in the config will just hang

Scripting defaults needs an update

Scripting defaults (like 2d/Blur) are broken after the new from and toNumPy api's.

Possible Fix:
import numpy as np
kernel=np.array([[1/9.0,1/9.0,1/9.0], [1/9.0,1/9.0,1/9.0] , [1/9.0,1/9.0,1/9.0]])
output=ArrayUtils.convolve(input,Array.fromNumPy(kernel),aborted)

image

Cannot install OpenVisus

I am using Manjaro Linux and have tried both with pip and conda to install OpenVisus.

For pip, it installs successfully. But when I first run python -m OpenVisus configure, I get a SIGSEGV error at the end. Running the same command second time seems to give no errors though.

Starting OpenVisus /home/insane/.local/lib/python3.10/site-packages/OpenVisus/__init__.py 3.10.5 (main, Aug  1 2022, 07:53:20) [GCC 12.1.0] sys.version_info(major=3, minor=10, micro=5, releaselevel='final', serial=0) ...
094747986 Kernel:251 129822:139823316973376 setting VISUS_HOME /home/insane/visus from home directory
094747986 Kernel:340 129822:139823316973376 VERSION GIT_REVISION 65e8020 VisusHome /home/insane/visus BinaryDirectory /home/insane/.local/lib/python3.10/site-packages/OpenVisus/bin CurrentWorkingDirectory  /home/insane
094747986 VisusDbPy:77 129822:139823316973376 Registering PyMultipleDataset
-m OpenVisus configure []
sys.executable /usr/bin/python VISUS_GUI True QT_VERSION 5.12.8 IS_CONDA False CONDA_PREFIX 
Executing command ['/usr/bin/python', '-m', 'pip', 'install', 'numpy', 'PyQt5~=5.12.0', 'PyQtWebEngine~=5.12.0', 'PyQt5-sip']
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: numpy in /usr/lib/python3.10/site-packages (1.23.1)
Requirement already satisfied: PyQt5~=5.12.0 in /home/insane/.local/lib/python3.10/site-packages (5.12.3)
Requirement already satisfied: PyQtWebEngine~=5.12.0 in /home/insane/.local/lib/python3.10/site-packages (5.12.1)
Requirement already satisfied: PyQt5-sip in /usr/lib/python3.10/site-packages (12.11.0)
Executing command ['/usr/bin/python', '-c', 'import os,PyQt5;print(os.path.dirname(PyQt5.__file__))']
PyQt5_HOME /home/insane/.local/lib/python3.10/site-packages/PyQt5
QT_LIB_DIR /home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib
Executing command ['patchelf', '--set-rpath', '$ORIGIN:$ORIGIN/bin:/home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib', '_VisusKernelPy.so']
Executing command ['patchelf', '--set-rpath', '$ORIGIN:$ORIGIN/bin:/home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib', '_VisusNodesPy.so']
Executing command ['patchelf', '--set-rpath', '$ORIGIN:$ORIGIN/bin:/home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib', '_VisusGuiPy.so']
Executing command ['patchelf', '--set-rpath', '$ORIGIN:$ORIGIN/bin:/home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib', '_VisusDataflowPy.so']
Executing command ['patchelf', '--set-rpath', '$ORIGIN:$ORIGIN/bin:/home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib', '_VisusDbPy.so']
Executing command ['patchelf', '--set-rpath', '$ORIGIN:$ORIGIN/bin:/home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib', 'bin/libmod_visus.so']
Executing command ['patchelf', '--set-rpath', '$ORIGIN:$ORIGIN/bin:/home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib', 'bin/libVisusDb.so']
Executing command ['patchelf', '--set-rpath', '$ORIGIN:$ORIGIN/bin:/home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib', 'bin/libVisusGui.so']
Executing command ['patchelf', '--set-rpath', '$ORIGIN:$ORIGIN/bin:/home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib', 'bin/libVisusKernel.so']
Executing command ['patchelf', '--set-rpath', '$ORIGIN:$ORIGIN/bin:/home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib', 'bin/libVisusNodes.so']
Executing command ['patchelf', '--set-rpath', '$ORIGIN:$ORIGIN/bin:/home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib', 'bin/libVisusDataflow.so']
Executing command ['patchelf', '--set-rpath', '$ORIGIN:$ORIGIN/bin:/home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib', 'bin/visus']
Executing command ['patchelf', '--set-rpath', '$ORIGIN:$ORIGIN/bin:/home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib', 'bin/visusviewer']
configure done
[[I don't get this error in second line]] fish: Job 1, 'python -m OpenVisus configure' terminated by signal SIGSEGV (Address boundary error)

Later when I try to run the viewer with python -m OpenVisus viewer, I get ModuleNotFoundError exception. But I can confirm that I have pyqt5-sip is installed with python -m pip install pyqt5-sip:

Starting OpenVisus /home/insane/.local/lib/python3.10/site-packages/OpenVisus/__init__.py 3.10.5 (main, Aug  1 2022, 07:53:20) [GCC 12.1.0] sys.version_info(major=3, minor=10, micro=5, releaselevel='final', serial=0) ...
095057738 Kernel:251 130524:140094061406016 setting VISUS_HOME /home/insane/visus from home directory
095057738 Kernel:340 130524:140094061406016 VERSION GIT_REVISION 65e8020 VisusHome /home/insane/visus BinaryDirectory /home/insane/.local/lib/python3.10/site-packages/OpenVisus/bin CurrentWorkingDirectory  /home/insane
095057738 VisusDbPy:77 130524:140094061406016 Registering PyMultipleDataset
-m OpenVisus viewer []
QT_PLUGIN_PATH /home/insane/.local/lib/python3.10/site-packages/PyQt5/Qt5/plugins
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/insane/.local/lib/python3.10/site-packages/OpenVisus/__main__.py", line 569, in <module>
    Main(sys.argv[1:])
  File "/home/insane/.local/lib/python3.10/site-packages/OpenVisus/__main__.py", line 517, in Main
    from OpenVisus.gui import PyViewer, GuiModule
  File "/home/insane/.local/lib/python3.10/site-packages/OpenVisus/gui.py", line 5, in <module>
    from OpenVisus.scripting_node  import *
  File "/home/insane/.local/lib/python3.10/site-packages/OpenVisus/scripting_node.py", line 6, in <module>
    from PyQt5.QtGui     import *
ModuleNotFoundError: No module named 'PyQt5.sip'

For conda, the output of conda install -c visus openvisus is:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: / 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                          

UnsatisfiableError: 

zfp compression and wavelet

One important thing to note is that when compressing wavelet coefficients is that the coefficients have to be on the same "subband" before compression.
Intuitively, we want to compress the average coefficients together and the detail coefficients together, but not average + detail together.
In other words, if you perform the Haar wavelet transform, you need to stop the transform as soon as the remaining samples fit into an IDX block.
The coefficients within a block cannot be further transformed, since that would create many more subbands within a block and hence when you compress, you will be mixing coefficients across subbands and that's bad.

So, basically we have two options:

  • Stop the Haar transform once you get to the level of an IDX block.
  • Do not compress block 0

pip install on OSX not working

I am using python 3.7.3 (installed with homebrew) on Mojave 10.14.4.

Installing numpy and OpenVisus via pip with the following command completes successfully:
python3 -m pip install --user numpy OpenVisus

However trying to create the scripts fails, i.e.:
python3 -m OpenVisus CreateScripts

Below is the resulting error:

Traceback (most recent call last):
  File "/Users/adam/Library/Python/3.7/lib/python/site-packages/OpenVisus/./VisusKernelPy.py", line 29, in swig_import_helper
    return importlib.import_module(mname)
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 670, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 583, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1043, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: dlopen(/Users/adam/Library/Python/3.7/lib/python/site-packages/OpenVisus/bin/_VisusKernelPy.so, 2): Library not loaded: /Users/travis/build/sci-visus/OpenVisus/build/RelWithDebInfo/site-packages/OpenVisus/bin/libVisusKernel.dylib
  Referenced from: /Users/adam/Library/Python/3.7/lib/python/site-packages/OpenVisus/bin/_VisusKernelPy.so
  Reason: image not found
...

It appears that it is trying to reference libVisusKernel.dylib from the travis build rather than the install location, because that library does exist in my install directory at:

/Users/adam/Library/Python/3.7/lib/python/site-packages/OpenVisus/bin/libVisusKernel.dylib

Cannot initialize submodule idx2

While recursively cloning this repo, or initializing Libs/idx2 submodule later, I get the following error:

Cloning into 'OpenVisus'...
remote: Enumerating objects: 27627, done.
remote: Counting objects: 100% (3969/3969), done.
remote: Compressing objects: 100% (1498/1498), done.
remote: Total 27627 (delta 2443), reused 3746 (delta 2310), pack-reused 23658
Receiving objects: 100% (27627/27627), 127.49 MiB | 4.41 MiB/s, done.
Resolving deltas: 100% (18591/18591), done.
Submodule 'Libs/IDX2' ([email protected]:sci-visus/IDX2.git) registered for path 'Libs/IDX2'
Cloning into '/home/insane/Utah/ksdjf/OpenVisus/Libs/IDX2'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:sci-visus/IDX2.git' into submodule path '/home/insane/Utah/ksdjf/OpenVisus/Libs/IDX2' failed
Failed to clone 'Libs/IDX2'. Retry scheduled
Cloning into '/home/insane/Utah/ksdjf/OpenVisus/Libs/IDX2'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:sci-visus/IDX2.git' into submodule path '/home/insane/Utah/ksdjf/OpenVisus/Libs/IDX2' failed
Failed to clone 'Libs/IDX2' a second time, aborting

I think it is because a wrong branch of idx2 named abdbc8daa1 is used, but there exists no such branch in origin. Should I create a PR with relinking idx2 with the master branch?

Viewer Does not update rendering

With commit 298224b on master on my 10.12.6 Mac OS. The viewer does not update the rendering during the progression of a slice. If you move the slice it will show you a simple gradient that only gets replaced by the actual data if you perform some action. That can be a rotation a mouse click or even a loss of focus of the window (which is why I cannot even take a screenshot)

Trying other branches and checkouts with similar results

Older version raster images are now displayed as black

I've been using OpenVisus for a number of years (thanks for a great tool). I moved our data from Azure to a local server and just rebooted the system. Everything looks good, but the files are now black. @spetruzza helped me get the original data together a couple years ago. Is it possible that there has been breaking changes to the openvisus server since then, do I need to regenerate the files? Anywhere I can go within the docker container to get logs?

image

Location:
https://visualize.idtrees.org/

Docker command

sudo docker run --rm -d -p 8080:80 -v /pgsql/TreeDemo/openvisus/OpenVisus/:/converted -v /pgsql/NEON_crown_maps/App/config.js:/home/OpenVisus/dataportal/viewer/config.js -v /pgsql/NEON_crown_maps/App/visus.config:/home/OpenVisus/visus.config visus/dataportal

Files at that location look big and heavy as expected.

ABBY  BART  BLAN  BONA  CLBJ  CUPE  DEJU  DELA  DSNY  GRSM  GUAN  GUIL  HARV  HEAL  HOPB  JERC  JORN  KONZ  LAJA  LENO  MOAB  NIWO  NOGP  OAES  OSBS  PUUM  REDB  RMNP  SCBI  SERC  SJER  SOAP  SRER  TALL  TEAK  UKFS  WLOU  WOOD  WREF  YELL
ben@serenity:/pgsql/TreeDemo/openvisus/OpenVisus$ du -sh *
11G	ABBY
11G	BART
11G	BLAN
5.1G	BONA
11G	CLBJ
7.9G	CUPE
11G	DEJU
11G	DELA
11G	DSNY
11G	GRSM
11G	GUAN
11G	GUIL
11G	HARV
11G	HEAL
8.0G	HOPB
11G	JERC
11G	JORN
11G	KONZ
11G	LAJA
11G	LENO
11G	MOAB
11G	NIWO
11G	NOGP
11G	OAES
11G	OSBS
11G	PUUM
11G	REDB
11G	RMNP
11G	SCBI
11G	SERC
11G	SJER
11G	SOAP
11G	SRER
11G	TALL
11G	TEAK
11G	UKFS
11G	WLOU
11G	WOOD
11G	WREF
11G	YELL
ben@serenity:/pgsql/NEON_crown_maps/App$ cat config.js
DEFAULT_SERVER='visualize.idtrees.org:8080/mod_visus?';
ben@serenity:/pgsql/NEON_crown_maps/App$ cat visus.config
<visus>
    <dataset name="ABBY - Oregon" url="file:///converted/ABBY/visus.idx" permissions="public"/>
    <dataset name="BART - New Hampshire" url="file:///converted/BART/visus.idx" permissions="public"/>
    <dataset name="BONA - Alaska" url="file:///converted/BONA/visus.idx" permissions="public"/>
    <dataset name="BLAN - Virginia" url="file:///converted/BLAN/visus.idx" permissions="public"/>
    <dataset name="CLBJ - Texas" url="file:///converted/CLBJ/visus.idx" permissions="public"/>
    <dataset name="CUPE - Puerto Rico" url="file:///converted/CUPE/visus.idx" permissions="public"/>
    <dataset name="DELA - Alabama" url="file:///converted/DELA/visus.idx" permissions="public"/>
    <dataset name="DEJU - Alaska" url="file:///converted/DEJU/visus.idx" permissions="public"/>
    <dataset name="DSNY - Florida" url="file:///converted/DSNY/visus.idx" permissions="public"/>
    <dataset name="GRSM - North Carolina" url="file:///converted/GRSM/visus.idx" permissions="public"/>
    <dataset name="GUAN - Puerto Rico" url="file:///converted/GUAN/visus.idx" permissions="public"/>
    <dataset name="GUIL - Puerto Rico" url="file:///converted/GUIL/visus.idx" permissions="public"/>
    <dataset name="HARV - Massachusetts" url="file:///converted/HARV/visus.idx" permissions="public"/>
    <dataset name="HEAL - Alaska" url="file:///converted/HEAL/visus.idx" permissions="public"/>
    <dataset name="HOPB - Massachusetts" url="file:///converted/HOPB/visus.idx" permissions="public"/>
    <dataset name="JERC -Georgia" url="file:///converted/JERC/visus.idx" permissions="public"/>
    <dataset name="JORN - New Mexico" url="file:///converted/JORN/visus.idx" permissions="public"/>
    <dataset name="KONZ - Kansas" url="file:///converted/KONZ/visus.idx" permissions="public"/>
    <dataset name="LAJA - Puerto Rico" url="file:///converted/LAJA/visus.idx" permissions="public"/>
    <dataset name="LENO - Alabama" url="file:///converted/LENO/visus.idx" permissions="public"/>
    <dataset name="MOAB - Utah" url="file:///converted/MOAB/visus.idx" permissions="public"/>
    <dataset name="NIWO - Colorado" url="file:///converted/NIWO/visus.idx" permissions="public"/>
    <dataset name="NOGP - North Dakota" url="file:///converted/NOGP/visus.idx" permissions="public"/>
    <dataset name="OSBS - Florida" url="file:///converted/OSBS/visus.idx" permissions="public"/>
    <dataset name="OAES - Oklahoma" url="file:///converted/OAES/visus.idx" permissions="public"/>
    <dataset name="PUUM - Hawaii" url="file:///converted/PUUM/visus.idx" permissions="public"/>
    <dataset name="REDB - Utah" url="file:///converted/REDB/visus.idx" permissions="public"/>
    <dataset name="RMNP - Colorado" url="file:///converted/RMNP/visus.idx" permissions="public"/>
    <dataset name="SOAP - California" url="file:///converted/SOAP/visus.idx" permissions="public"/>
    <dataset name="SCBI - Virginia" url="file:///converted/SCBI/visus.idx" permissions="public"/>
    <dataset name="SERC - Maryland" url="file:///converted/SERC/visus.idx" permissions="public"/>
    <dataset name="SJER - California" url="file:///converted/SJER/visus.idx" permissions="public"/>
    <dataset name="SRER - Arizona" url="file:///converted/SRER/visus.idx" permissions="public"/>
    <dataset name="TALL - Alabama" url="file:///converted/TALL/visus.idx" permissions="public"/>
    <dataset name="TEAK - California" url="file:///converted/TEAK/visus.idx" permissions="public"/>
    <dataset name="UKFS - Kentucky" url="file:///converted/UKFS/visus.idx" permissions="public"/>
    <dataset name="WLOU - Colorado" url="file:///converted/WLOU/visus.idx" permissions="public"/>
    <dataset name="WREF - Washington" url="file:///converted/WREF/visus.idx" permissions="public"/>
    <dataset name="WOOD - Washington" url="file:///converted/WOOD/visus.idx" permissions="public"/>
    <dataset name="YELL - Wyoming" url="file:///converted/YELL/visus.idx" permissions="public"/>
</visus>

Things i've tried

  • Changing the path to converted to include trailing slash/no trailing slash to see if the docker mount can successful locate the files. My current belief is that it knows where the files are, but not how to display them. Is this your impression as well?

  • Changing the location of the config.js, which was previously /home/OpenVisus/dataportal/ext/visus/config.js

Header of the .midx file

ben@serenity:/pgsql/TreeDemo/openvisus/OpenVisus$ cd ABBY/
ben@serenity:/pgsql/TreeDemo/openvisus/OpenVisus/ABBY$ ls
ABBY  visus  visus.idx  visus.midx
ben@serenity:/pgsql/TreeDemo/openvisus/OpenVisus/ABBY$ head visus.midx
<dataset typename='IdxMultipleDataset'>
	<field name='voronoi'><code>output=voronoi()</code></field>
	<dataset url='./2019_ABBY_3_550000_5070000_image/visus.idx' name='2019_ABBY_3_550000_5070000_image' offset='0.0 80000.0'/>
	<dataset url='./2019_ABBY_3_550000_5071000_image/visus.idx' name='2019_ABBY_3_550000_5071000_image' offset='0.0 90000.0'/>
	<dataset url='./2019_ABBY_3_550000_5072000_image/visus.idx' name='2019_ABBY_3_550000_5072000_image' offset='0.0 100000.0'/>
	<dataset url='./2019_ABBY_3_551000_5062000_image/visus.idx' name='2019_ABBY_3_551000_5062000_image' offset='10000.0 0.0'/>
	<dataset url='./2019_ABBY_3_551000_5063000_image/visus.idx' name='2019_ABBY_3_551000_5063000_image' offset='10000.0 10000.0'/>
	<dataset url='./2019_ABBY_3_551000_5064000_image/visus.idx' name='2019_ABBY_3_551000_5064000_image' offset='10000.0 20000.0'/>
	<dataset url='./2019_ABBY_3_551000_5065000_image/visus.idx' name='2019_ABBY_3_551000_5065000_image' offset='10000.0 30000.0'/>
	<dataset url='./2019_ABBY_3_551000_5066000_image/visus.idx' name='2019_ABBY_3_551000_5066000_image' offset='10000.0 40000.0'/>

head of the .idx file

ben@serenity:/pgsql/TreeDemo/openvisus/OpenVisus/ABBY$ head visus.idx
(version)
6
(box)
0 29999 0 109999
(fields)
DATA uint8[3] default_compression(zip) default_layout(row_major) default_value(0) min(0 0 0) max(0 0 0)
(bits)
V11010101010101010101010101010101
(bitsperblock)
16

Conda build

I am using the 1.3.55 branch on my laptop running 10.12.

export USE_CONDA=1
./build.sh

gets me

  • conda-build -q openvisus
    ./build_conda.sh: line 87: conda-build: command not found

which is really weird since conda-build is in the global path and is installed. If I add the absolute path to the script

if (( 1 == 1 )) ; then
pushd ./conda
/anaconda2/bin/conda-build -q openvisus
conda install --yes -q --use-local openvisus
popd
fi

this seems to work fine and I can get past this issue. Not clear where this comes from but somehow the system no longer looks in $PATH ?

Cannot view two volumes side by side by translating one of the volumes (in logical coordinates)

I wanted to visualize two volumes side by side to compare them, but this is currently not possible (same issue can be reproduced with idx and midx).

Reproduction Scenario:

  1. Open a idx/midx dataset
  2. Add second idx/midx dataset (Add File)
  3. Click on Volume 1 of either dataset and translate along x-axis. This shifts the bounding box (as it should), but there is no data (the query box gets updated with the translation, but I suspect either the query fails or it is not triggered).

For regular idx, I can create a midx with two idx datasets and translate one of them (even though I want them as separate datasets, so that I can use different palette's on them, this is still a possible hack), but it won't work for two midx datasets (application crashes if I added a midx inside midx).

For example:
<dataset typename="IdxMultipleDataset"> <dataset name="ceramic_original" url="file://$(CurrentFileDirectory)/ceramic_original.midx"></dataset> <dataset name="ceramic_aligned" url="file://$(CurrentFileDirectory)/ceramic_aligned.midx"> <M><translate x="1984" y="0" z="0" /></M></dataset> </dataset>

Uploading view_two_volumes.zip…

Hang occurs if the cache is not a directory

Below example causes hangs when reading the dataset. Probably C++ needs to raise an exception for C++ code to work correctly too. I think when we rework LoadDataset to take cache_dir optional argument, we can then raise exception in the LoadDataset function.

import os
import OpenVisus as ov

with open('test.txt', 'w') as f:
	f.write('hello\n')

os.environ['VISUS_CACHE'] = 'test.txt'
dataset = ov.LoadDataset(f'https://klacansky.com/open-scivis-datasets/fuel/fuel.idx?cached=1')
dataset.read()

Viewer crashes on palette change

The viewer crashes on palette change when selecting any colormap after "lut16".
Happens on latest "scrgiorgio" with any dataset

Scene loading crashes

Using the latest master on 10.14 the attached scene file crashes at start-up. I created the scene using the same viewer in the previous session

R2_view2_offset1_3color.txt

The corresponding data can be found at /usr/sci/cedmav/data/TALASS/LLSM/R2_view2_offset1_3color.idx

Do not share the data

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.