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

Upgrade to latest vtk-js in dicom_viewer #1951

Merged
merged 1 commit into from
Apr 25, 2017
Merged

Conversation

zachmullen
Copy link
Member

This supersedes #1950

Copy link
Contributor

@MayeulChassagnard MayeulChassagnard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+2

@MayeulChassagnard MayeulChassagnard merged commit 86e021a into master Apr 25, 2017
@zachmullen zachmullen deleted the vtkjs-upgrade branch April 25, 2017 15:05
@MayeulChassagnard
Copy link
Contributor

I might have been too fast...

Since it was bulding correctly I forgot to verify the plugin dicom_viewer was correctly working with the latest vtk-js version.

It appears that it's not the case:
greywindowerror_dicom-viewer-plugin
This error appears from vtk.js version 2.13.5 and above.

v2.13.4 works fine, should we merge immediately a commit with this lower version the time we fix the issue?

@zachmullen
Copy link
Member Author

Hm, is this a regression in vtk-js? We may want to open a bug against vtk.js -- I think they use semver, so breakage is not expected here, unless we are depending on undefined behavior.

@MayeulChassagnard
Copy link
Contributor

We should ask that to the experts I think
@fogleman @jcfr @mgrauer @manthey

@mgrauer
Copy link
Contributor

mgrauer commented Apr 25, 2017

@jourdain

@zachmullen
Copy link
Member Author

@martinken

@jourdain
Copy link
Contributor

jourdain commented Apr 25, 2017

2.13.5 is Rendering: support intermixing of surfaces and volumes

Maybe the ImageMapper that you did don't play nice with it and since there is no test on that mapper we did not notice it?

@zachmullen
Copy link
Member Author

@jourdain I'm getting a warning message in the console that says "empty event loop", does that indicate a problem?

@zachmullen
Copy link
Member Author

Also when dragging the mouse:

Uncaught TypeError: publicAPI.superHandleMouseMove is not a function
    at Object.publicAPI.handleAnimation (http://localhost:8080/static/built/plugins/dicom_viewer/plugin.min.js:38098:15)
    at Object.<anonymous> (http://localhost:8080/static/built/plugins/dicom_viewer/plugin.min.js:39450:44)
    at http://localhost:8080/static/built/plugins/dicom_viewer/plugin.min.js:2555:35
    at Array.forEach (native)
    at Object.publicAPI.(anonymous function) [as invokeAnimation] (http://localhost:8080/static/built/plugins/dicom_viewer/plugin.min.js:2554:15)
    at Object.publicAPI.animationEvent (http://localhost:8080/static/built/plugins/dicom_viewer/plugin.min.js:40709:17)
    at publicAPI.handleAnimation (http://localhost:8080/static/built/plugins/dicom_viewer/plugin.min.js:40541:15)
publicAPI.handleAnimation @ index.js:83
(anonymous) @ index.js:81
(anonymous) @ macro.js:577
publicAPI.(anonymous function) @ macro.js:577
publicAPI.animationEvent @ index.js:424
publicAPI.handleAnimation @ index.js:255

@martinken
Copy link

The missing image is a regression. We have an example for the class but not a test. I'll add one tomorrow. For now this MR should fix the issue. Kitware/vtk-js#212

@jourdain
Copy link
Contributor

I don't think so.

Although the interaction has also been updated to use the requestAnimationFrame which could be the source of the issue here.

@MayeulChassagnard
Copy link
Contributor

@jourdain Should I create a vtk-js or a girder issue for this dragging error then?

@jourdain
Copy link
Contributor

The code seems to be in vtk.js

MayeulChassagnard added a commit to MayeulChassagnard/girder that referenced this pull request Apr 25, 2017
As discussed in the MR girder#1951 , vtk-js
faces a regression issue: Kitware/vtk-js#214

This downgrade would be revert at the time the issue will be fixed
@martinken
Copy link

Should be fixed now in master via Kitware/vtk-js#215

@MayeulChassagnard
Copy link
Contributor

@martinken Is there a tag to the latest vtk-js version (including your modifications)? I would like to give a try but the plugin.json in the dicom_viewer plugin requires a tag release version.

@MayeulChassagnard
Copy link
Contributor

I gave a try with v2.18.3 and unfortunately we still have issues:

empty event loop  plugin.min.js:1:20810
Error: WebGL: generateMipmap: Texture at base level is not unsized internal format or is not color-renderable or texture-filterable.  plugin.min.js:1:126022
Error: WebGL: drawArrays: Active texture 0 for target 0x0de1 is 'incomplete', and will be rendered as RGBA(0,0,0,1), as per the GLES 2.0.24 $3.8.2: Because the minification filter requires mipmapping, the texture must be "mipmap complete".  plugin.min.js:1:620154

The dragging mouse seems to work but the image is still missing.
Should I open an issue in vtk-js for this?

@martinken
Copy link

You can, we may need an example for the issue. The example we have

https://kitware.github.io/vtk-js/examples/ImageMapper.html

doesn't seem to show that issue.

@martinken
Copy link

I believe I know what the issue is, just may not show up on every platform. I'll try to get in a fix this morning.

@MayeulChassagnard
Copy link
Contributor

All right, let me know if you need anything!

Thanks a lot

@martinken
Copy link

give 2.18.4 a shot

@MayeulChassagnard
Copy link
Contributor

nope, doesn't fix it :/
I still got the same issue:
image

@martinken
Copy link

Can you try

Kitware/vtk-js#217

@zachmullen
Copy link
Member Author

@martinken FWIW, 2.18.4 fixed both bugs for me

@martinken
Copy link

Thanks, I think what Mayeul is seeing is hardware specific. I think I have a fix ready though that shoudl solve the issue for those that see it.

@MayeulChassagnard
Copy link
Contributor

I tried to use your commit by modifying plugin.json as follow :

{
    "name": "DICOM Viewer",
    "description": "View DICOM images in the browser",
    "url": "http://girder.readthedocs.io/en/latest/plugins.html#dicom-viewer",
    "version": "0.1.0",
    "npm": {
        "dependencies": {
            "daikon": "^1.2.15",
            "kw-web-suite": "^2.0.1",
            "vtk.js": "git://github.com/Kitware/vtk-js.git#568abd097aeea910f5357732b2ebd658adeb8807"
        }
    }
}

During girder-install web I can see:

vtk.js@0.0.0-semantically-release  (git://github.com/Kitware/vtk-js.git#568abd097aeea910f5357732b2ebd658adeb8807)

Is your commit correctly used by doing this?

If yes, this commit solved the issue!

@zachmullen
Copy link
Member Author

If you do cat node_modules/vtk.js/package.json, what is the value in the version field?

@MayeulChassagnard
Copy link
Contributor

0.0.0-semantically-release

@zachmullen
Copy link
Member Author

Ah, that makes sense, I think they use a tool that changes that value automatically at release time.

@jbeezley
Copy link
Contributor

You can try npm ls vtk.js to get the installed version.

@MayeulChassagnard
Copy link
Contributor

I get

girder@2.2.0 /home/mayeul/MyProjects/girder
└── vtk.js@0.0.0-semantically-release  extraneous (git://github.com/Kitware/vtk-js.git#568abd097aeea910f5357732b2ebd658adeb8807)

npm ERR! extraneous: vtk.js@0.0.0-semantically-release /home/mayeul/MyProjects/girder/node_modules/vtk.js

@martinken
Copy link

I merged the change, so the system should produce a new version soon.

@MayeulChassagnard
Copy link
Contributor

Okay, I just checked out the file if it was correctly modified according to Kitware/vtk-js@568abd0 after modifying plugin.json with "vtk.js": "git://github.com/Kitware/vtk-js.git#568abd097aeea910f5357732b2ebd658adeb8807".

So, @martinken, we are good to merge Kitware/vtk-js#217 , it fixed the issue!

Thank you very much for your help guys :)

@martinken
Copy link

2.18.5

@martinken
Copy link

Awesome, glad to hear it! Thanks for testing it out.

MayeulChassagnard added a commit to MayeulChassagnard/girder that referenced this pull request Apr 26, 2017
girder#1951 introduced issues:
- dragging mouse over image broken (fixed by Kitware/vtk-js#215)
- missing image (fixed by Kitware/vtk-js#217)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants