cornerstonejs / cornerstone

JavaScript library to display interactive medical images including but not limited to DICOM
https://docs.cornerstonejs.org/
MIT License
2.05k stars 597 forks source link

can't redraw canvas in vue #524

Closed KiDeokKim closed 3 years ago

KiDeokKim commented 3 years ago

when i call enable -> loadimage -> displayimage , it is showing image from canvas.

and if i click button, i need to toggle hide/show function.

so if i clicked button, disable function is work. (hide dicom image)

but re-clicked button, enable function is not work. why?

here is my sample code ` //show function

    cornerstone.enable(this.prevCanvas);

    const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(targetFile);

    cornerstone.loadImage(imageId).then(image => {

      cornerstone.displayImage(this.prevCanvas, image);

    });

//hide function

    cornerstone.disable(this.prevCanvas);`

What's wrong? and if i call re-show function, error is occured.

  1. Error in v-on handler: "NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node."
  2. DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

maybe if i call disable function, canvas still remain indelible.

David2k13 commented 1 year ago

I'm just running into it. Have you solved it yet