Giter Club home page Giter Club logo

kitware / glance Goto Github PK

View Code? Open in Web Editor NEW
244.0 244.0 84.0 315.12 MB

Kitware Glance is an open-source web application developed at Kitware for visualizing volumetric images, molecular structures, geometric objects, and point clouds. It is part of the ParaView platform and can serve as a foundation for building custom web-based visualization applications involving ITK.js and VTK.js.

Home Page: https://kitware.github.io/glance

License: BSD 3-Clause "New" or "Revised" License

JavaScript 71.03% HTML 20.97% Vue 4.82% CSS 2.54% CMake 0.11% C++ 0.53%

glance's Introduction

Glance

Introduction

Glance is an open-source, javascript visualization application created by Kitware, based on Visualization Toolkit (VTK), and intended to serve as a light-weight companion to Paraview. It is part of the ParaView Web suite of tools.

Learning Resources

Live Demonstrations

As a javascript application, Glance can be run by pointing any browser at an appropriate URL or loading an HTML file.

Click on this link to run the live version of Glance.

Building

The prerequisites are git and node.js + npm.

If you wish to view, enhance, or adapt this application in any way, you can access and run the freely available source code from any platform using the following commands:

$ git clone https://github.com/Kitware/glance.git
$ cd glance/
$ npm install
$ npm run build
$ npm run dev

This will run a development build and you can visit the application at http://localhost:9999.

Deploying to Production

To generate a production build, use the following commands:

$ npm run build:release

This will output the final bundle and assets to dist/. You can then recursively copy all of those files into the web location of your choice. As there is no server-side code involved, all you need is some web hosting!

If you make changes to any of the ITK filtering code under itk/, you should run the following command from the root folder. For more information, check out itk.js.

$ npx itk-js build itk/

Reporting Bugs and Making Contributions

If you have found a bug or have a suggestion for improving Glance:

  1. If you have source code to contribute, please fork the github repository into your own github account, create a branch with your changes, and then create a merge request with the main repo.

  2. If you have a bug to report or a feature to request, please open an entry in the Glance Issue Tracker.

License

Glance is distributed under the OSI-approved BSD 3-clause License. See COPYRIGHT and LICENSE for details. For additional licenses, refer to ParaView Licenses.

glance's People

Contributors

aylward avatar boucaud avatar bourdaisj avatar bruyeret avatar floryst avatar hastingsgreer avatar jourdain avatar psavery avatar remdelaportemathurin avatar thewtex avatar zachmullen avatar ziqiangxu 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  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  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  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

glance's Issues

Checkerboard display in 2D

Similar to #80 , it should be possible to show two volumes in a 2D render window as a checkerboard - alternating one checker region showing one volume to the next checker region showing the other volume.

This has also bee reported as a VTK.js request, Kitware/vtk-js#726

s

Volume Rendering changes as the volume is rotated

Volume rendering looks good from some points of view, but as you move to view towards certain angles (seems to be 45 degree rotations) the volume experiences increasing brightness until white-out.

See the following for the same volume with only a few degrees change in the point of view.

good

rotate-bad

Provide links to demo data on Load panel.

There should be 5 types of data available from the load panel. These should be presented in a hierarchical list as given below:

  • Point Cloud
    • LIDAR data
  • Medical Volumes
    • Chest CT
    • Brain Atlas and MRI
  • Materials Science Data
    * < Get something from Marcus (pores data, etc) >
  • Molecule
    * < Pick a complex molecule >
  • Surface Models
    * < Power plant or other medium sized model >
    * < A very large model >

Kitware Logo and link to a Kitware page

One panel or popup should be an "About" panel that talks about Kitware, gives a link to Kitware.com, gives a link to paraview.org, and mentions that we provide consulting support. This popup/panel could also link to a "Help" page (or be the help page).

Option Panel Collapses when background color of 3D view is selected

See attached image of badness.

Steps to reproduce:

  1. Load a volume
  2. In the 3D only view, scroll to the bottom of parameter list in lefthand panel
  3. At the bottom, the availble background colors subpanel will be only partially scrolled/shown at the bottom
  4. Select a new background color, and the entire panel scrunches up to the top. The only way to get it back is to switch to a different panel (e.g., image load panel) and then switch back.

parameterpanelcollapses

Crop Widget

In the quad view, in each 2D view, we should be able to turn on "cropping". This allows the edges in the 2D image to be moved in to specify a cropping plane in the 3D view.

Forrest has created the 2D crop interactor/widget already.

Cropping icon should appear in the bar associated with each 2D view (e.g., in-line with the orientation and reset icons). The cropping icon should be the standard crop symbol - see attached.
crop

Global settings

Disable elements when not relevant...

Could hide Axis type/presets when Orientation Axis is OFF

(Fixed in 2.1.3)

delete dataset

An option could be to remove the delete from the left control and instead provide a delete button from to top bar which could bring the list of dataset with a quick select all with two action buttons Cancel and Delete selected.

@floryst @aylward

data-url attribute on MainView

I've hacked together a wrapper class that allows me to embed a MainView into a non-react based application; namely, I can display the MainView within Girder. The next step would be to pass a data URL down into the MainView when I instantiate it. The simplest API for me to do that would be if it were available as an attribute on the MainView component.

ITK Readers offline

How to handle ITK readers offline and what to tell the user if ITK readers cannot be fetched.

We can download and cache common ITK readers at first launch, so this requires Internet access on first launch.

Large buttons for launching Nightly and Stable versions on github.io page

The words "Nightly" and "Application" at the top of the page are too subtle. We need large, highly conspicuous buttons and introductory instructions for launching PVG from the github.io pages. The launch page should be the default/first page people see and the link we distribute to others.

Volume rendering transfer functions as a hierarchical menu

There are too many transfer functions for it to be a flat list. We need the list of volume rendering transfer functions to be hierarchical.

Top Level:

  1. Medical
    • Use the ones in Slicer and VolView
  2. Materials
    • Check with TomViz
  3. Rainbow
  4. Heat
  5. EDRC

Volume slice visbility broken

Enabling slice visibility in volume view will freeze the volume view and output the following warning:

Error: WebGL warning: clear: Framebuffer not complete. (status: 0x8cd7) 

Isolated to this vtk-js commit: Kitware/vtk-js@dec5008

Haven't looked much into it yet, but @martinken do you recognize the warning?

Loading local file doesn't do anything at all

Hi,
I manage to get pv-web-viewer working within a singularity container
but I can't load any file into the "Paraview Glance"...
Actually I've tried with sphere.vtk from vtk-js/Data/legacy\...

Is this a bug?
If not, How shall I proceed to load local file?

Best
C

Colors for scrollbars and background are saturated

The colors used to designate the quad views (red, yellow, green) are too bright / saturated - they draw too much attention. They should be closer to gray and less bright.

The colors for the background are too bright/saturated - they are overly contrasted if a black object is rendered. Please offer a few shades of gray and a few options with a gradient background would be nice. Look at Slicer, VolView and medical image volume rendering packages such as those in attached images.

volumerenderingbackground2

volumerenderingbackground1

volumerenderingbackground3

Error reading multiple ITK images

To reproduce:

  1. Have a large image file readable by itk.js. I generated a 100x100x100 wavelet using paraview and exported it to NRRD.
  2. Open image file in glance
  3. Delete the image dataset from the pipeline editor
  4. Open the image again

Console outputs an uncaught promise error object:

{
  "message":"parameter 0 has unknown type emsc",
  "stack":"BindingError: parameter 0 has unknown type emsc
               at BindingError.<anonymous> (http://localhost:9999/itk/ImageIOs/itkNrrdImageIOJSBindingWasm.js:1:107142)
               at new BindingError (eval at createNamedFunction (http://localhost:9999/itk/ImageIOs/itkNrrdImageIOJSBindingWasm.js:1:106848), <anonymous>:4:34)
               at throwBindingError (http://localhost:9999/itk/ImageIOs/itkNrrdImageIOJSBindingWasm.js:1:107587)
               at requireRegisteredType (http://localhost:9999/itk/ImageIOs/itkNrrdImageIOJSBindingWasm.js:1:134433)
               at emval_allocator_1 (eval at craftEmvalAllocator (http://localhost:9999/itk/ImageIOs/itkNrrdImageIOJSBindingWasm.js:1:143459), <anonymous>:4:16)
               at __emval_new (http://localhost:9999/itk/ImageIOs/itkNrrdImageIOJSBindingWasm.js:1:143803)
               at wasm-function[1550]:18\n    at invoke_iiiii (http://localhost:9999/itk/ImageIOs/itkNrrdImageIOJSBindingWasm.js:1:159365)
               at wasm-function[139]:4495\n    at wasm-function[175]:73"
}

@thewtex do you know anything about this error message?

Transfer function editing - using the image picking

This is low priority - putting this here to record this "research" idea.

Instead of the user editing a transfer function in intensity/opacity/color space, I suggest that the user selects intensities of interest in the image by clicking on points in the image, the user then assigns each selection a color and opacity, and then the transfer function is generated from their selections. The GUI would be
image-based-transferfunction

The user can add / edit objects of interests as they want, and the transfer function is updated for each change.

Orientation widget

When the anatomical orientation widget is chosen, can we replace “Orientation LPS” labels with “Axial/Coronal/Saggital” in the text overlays? And to be honest, even “Orientation XYZ” in the text overlay isn’t very useful since it is already in the toolbar at the bottom of the view: it could be removed, and the slice number could be consolidated with the Window Width/Level information if it is an image.

Several issues

Orientations have invalid view up

glance.js:186 Resetting view-up since view plane normal is parallel

Orientation axis toggle api change (button + check box in control panel)

2glance.js:54249 Uncaught TypeError: this.view.getOrientationAxes is not a function
    at Layout3D.toggleOrientationMarker (glance.js:54249)
    at HTMLUnknownElement.callCallback (glance.js:63220)
    at Object.invokeGuardedCallbackDev (glance.js:63259)
    at Object.invokeGuardedCallback (glance.js:63116)
    at Object.invokeGuardedCallbackAndCatchFirstError (glance.js:63130)
    at executeDispatch (glance.js:63514)
    at executeDispatchesInOrder (glance.js:63533)
    at executeDispatchesAndRelease (glance.js:63634)
    at executeDispatchesAndReleaseTopLevel (glance.js:63645)
    at Array.forEach (<anonymous>)
toggleOrientationMarker @ glance.js:54249

Handle mobile browsers

Either provide a pop-up message or display a 3D-only view when run on a mobile device.

ITK readers integration

I would like to enable ITK readers within Glance following the pattern below:

@thewtex can we talk on how to do that?

<!DOCTYPE html>
<html>
  <body>
    <div class="root-container"></div>
    <script inline type="text/javascript" src="glance.js"></script>
    <script inline type="text/javascript" src="itk.js"></script>
    <script type="text/javascript">
     // New reader registration
     itk.listReaders.forEach(Glance.registerReader);

      // Regular usage
      var container = document.querySelector('.root-container');
      var viewer = Glance.createViewer(container);
      viewer.processURLArgs();
    </script>
  </body>
</html>

Save annotations to Girder

Once annotations are supported by VTK.js - it should be possible to push them back to the girder instance that provided the data currently loaded into Glance.

Chrome+Linux out of memory crash

ParaView Glance on Chrome (Version 65.0.3325.181) + Linux (Ubuntu 16.04, 64 bit) crashes with a OOM heap error. Firefox on the same platform does not exhibit this issue, nor does Chrome on macOS/Windows.

There are multiple ways I have found to reproduce this bug:

  • Open a dataset, then quickly switch between quad and split layouts
  • Open multiple datasets, then quickly delete them
  • Open two NRRD files of at least 2MB
  • Likely more...

Tracking the virtual memory usage reveals that the Chrome tab process reaches 16GB, which according to this comment is the RLIMIT_AS of chrome processes in Linux.

Running Chrome without the 16GB address space limit (disabled sandbox) and observing memory allocations, the largest spike is a roughly 2MB allocation (for a 2MB NRRD), with a total memory allocation of 41MB.

My first guess is Chrome's GC is too slow to clean up, but I don't know enough about Chrome's GC to comment further.

This issue is to track my findings and to see if anyone else runs into similar issues.

Change interactor behaviour

Here are suggestions for interaction

In 3D,
wheel = zoom
right = zoom
left = rotate in 3D
ctrl-right = nothing
ctrl-left = currently zoom...change to window and level
shift-right = nothing
shift-left = currently pan...change to rotate around view axis

In 2D,
wheel = currently zoom...change to next/prev slice
Right = currently nothing....change to zoom
Left = currently pan...change to window and level
ctrl-right = nothing
ctrl-left = currently zoom...change to pan
shift-right = nothing
shift-left = rotate around view axis

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.