Skip to content
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

Level and Zoom Sliders? #391

Closed
MikeDacre opened this issue Sep 15, 2017 · 4 comments
Closed

Level and Zoom Sliders? #391

MikeDacre opened this issue Sep 15, 2017 · 4 comments
Labels
question Further information is requested
Milestone

Comments

@MikeDacre
Copy link

From example 3 (https://jsfiddle.net/ivmartel/zvt0xemc/) I figured out how to make a position slider.

What API calls should I use to also make a zoom slider (with panning available?) and a windowlevel slider? Or do I have to use the toolbar to switch between the modes?

I tried just adding a minimal toolbar by inserting <div class="toolbar"></div> into the dwv div and then using the following init:

  app.init({
    "containerDivId": "dwv",
    "gui": ["tool"],
    "tools": ["Scroll", "ZoomAndPan", "WindowLevel"],
    "fitToWindow": true,
    "isMobile": true,
  });

However this gives the following error:

Uncaught TypeError: u.gui.Toolbox is not a constructor
    at u.tool.Toolbox.setup (dwv-0.20.1.min.js:3)
    at ToolboxController.setup (dwv-0.20.1.min.js:3)
    at App.init (dwv-0.20.1.min.js:3)
    at MRI (mri.js:20)
    at t2_fse_ax.html:31

Possibly the issue is that I am using the compiled minimized js, rather than the full application. This error isn't a big deal if I can just make some sliders with simple js calls. Thanks!

@ivmartel
Copy link
Owner

You do not need the toolbar html div if you don't want tool buttons. Remove it and you should not see the error.

Your question about a window/level slider is a good one... There only is a wl-change event that wont allow you to set window and / or level separately. I'll create a ticket for this!

@ivmartel ivmartel added the question Further information is requested label Sep 15, 2017
@ivmartel ivmartel added this to the 0.21.0 milestone Sep 15, 2017
@MikeDacre
Copy link
Author

Great, thanks! In the meantime I managed to get the simplistic viewer working for my needs, so I am very happy about that. You can see the final product on https://kb.michaeldacre.com/kb/mri-images. Thanks for the amazing work.

@ivmartel
Copy link
Owner

Events have been updated in #395.

@ivmartel
Copy link
Owner

Closing for now. Feel free to comment or reopen if you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants