question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Need example of using CornerstoneWebImageLoader in Cornerstone3D

See original GitHub issue

The CornerstoneWebImageLoader’s example is using the old cornerstone-core.

I’ve tried to render PNG with the following code in @cornerstonejs/core and it is not working:

const imageId = 'http://localhost:5555/my-test-dcm.png';
const imageIds = [imageId];

const renderingEngineId = 'myRenderingEngine';
const renderingEngine = new RenderingEngine(renderingEngineId);

const viewportId = 'CT_STACK';
const viewportInput = {
  viewportId,
  element: cornerstoneEl,
  type: ViewportType.STACK,
  defaultOptions: {
    background: [0, 0, 0],
  },
};

renderingEngine.enableElement(viewportInput);
if (toolGroup) {
  toolGroup.addViewport(viewportId, renderingEngineId);
}

const viewport = renderingEngine.getViewport(viewportInput.viewportId);
viewport.setStack(imageIds, 0);

viewport.render();
Screenshot 2022-05-29 at 2 16 00

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:6
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
sedghicommented, Jul 29, 2022

can you use our new demo for this? https://www.cornerstonejs.org/live-examples/local.html

1reaction
1istencommented, May 30, 2022

+1 for cornerstoneNIFTIImageLoader

Read more comments on GitHub >

github_iconTop Results From Across the Web

Image Loaders - Cornerstone.js
An ImageLoader is a JavaScript function that is responsible for taking an ImageId and returning an Image Object . Since loading images usually...
Read more >
cornerstone-web-image-loader examples - CodeSandbox
Learn how to use cornerstone-web-image-loader by viewing and forking example apps that make use of cornerstone-web-image-loader on CodeSandbox.
Read more >
cornerstonejs/cornerstone - GitHub
See the CornerstoneWADOImageLoader project for an example of a DICOM WADO based Image Loader. Cornerstone Core is agnostic to the exact interaction paradigm ......
Read more >
Combining the cornerstoneWebImageLoader with stackscrolling
I'm looking at the stack scrolling example page, but am getting a bit ... will work with any image loader, you just need...
Read more >
How to use the cornerstone-wado-image-loader.external ...
To help you get started, we've selected a few cornerstone-wado-image-loader.external examples, based on popular ways it is used in public projects.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found