Giter Site home page Giter Site logo

hdav's People

Watchers

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

hdav's Issues

Layer legend improvements

  • Allow users to enable and disable layers from the legend. Do this as easily as possible (maybe double click toggles it)
  • Give some indications about which view is active and which is hidden. This can be as simple as an asterisk after the name.
  • Display the value of the pixel under the mouse cursor for each layer in another column.

Add ColorMap Bars to Legend

It will be nice to remind the user what color map corresponds to what label. Something similar to
image
drawn next to each label should do the trick.

Initial Implementation

  • Library should have the following API
hdav.view(layers, window_id='some window')

where layers is a list of dictionaries with the following metadata

layers = [
    {
        'name': 'CT',
        'data': <np.ndarray (2 or 3 dimensions)>,
        'cmap': <PyQTGraph ColorMap instance>,
        'visible': True,
    },
    {
        'name': 'distortion',
        'data': <np.ndarray (2 or 3 dimensions)>,
        'cmap': <PyQTGraph ColorMap instance>,
        'visible': True,
    },
    ...
]
  • All data entries must be of the same shape.
  • The ordering of layers is significant. The first item on the list is the first item that should be drawn to the canvas and therefore the bottom-most layer.
  • window_id shall determine if a new window is created or an old one is updated.
  • For the case of 3D data, the UI should show three views: axial, coronal, and sagittal. These views should be linked together. Scrolling the mouse wheel while the cursor is over one of the views should move up or down a slice in the respective axis. Two lines should also be drawn on each axis indicating which axis the other two are on. These lines should be color coded.
    • The three-axis should be color coded (red, green, and blue)
    • For 3D data place the initial cursor at the center
  • Assume RGB color images will be represented by 2D images with an indexed color map. In other words, we will push the burden of representing 2D RGB images to the user and the implementation should not see it any differently.
  • Overlays can be toggled on or off by pressing a number key on the keyboard. The key 1 will toggle the first item in the layers list for example. A legend should be visible somewhere to remind the user which key corresponds to which layer name.

Cursor Position

Show position of the cursor somewhere on the screen. It should be in image coordinates (ijk).

Interactive vs non-interactive mode

Two use cases:

  • Show an image and block until you close the window (standard matplotlib function)
  • live view to update images in real time.

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.