Uncaught TypeError: Cannot read property 'point' of undefined at HTMLDivElement.g (app.js:50865)
Hello, Guys!
I just started to develop my own project using cornerstone libraries on top of Laravel 5.6 + Vue.
The image element init, but when I try to apply any filter from cornerstoneTools I get this errorUncaught TypeError: Cannot read property 'point' of undefined at HTMLDivElement.g (app.js:50865)
Here is my source code:
-
Disable
Enable
Activate
Deactivate
Default Strategy
Osirix Strategy
</ul>
</div>
<div class="col-xs-6">
<div style="width:512px;height:512px;position:relative;display:inline-block;color:white;"
oncontextmenu="return false"
class='cornerstone-enabled-image'
unselectable='on'
onselectstart='return false;'
onmousedown='return false;'>
<div id="dicomImage"
style="width:512px;height:512px;top:0px;left:0px; position:absolute;">
</div>
</div>
</div>
</div>
</div>
I also have the same problem. did you fixed it?
Do you have a repository or codesandbox you can share that produces this error? Also, your code formatting is a bit off. Can you edit your question to make it easier to read?
@dannyrb Could you check my repo? When I write pure javascript don't appear the problem. I think, it doesn't find canvas element. And I looking for the problem from lifecycle. It seems to execute mouseInput.enable before creating element. Just I guessed it. https://github.com/ofleaf/webpacs-proto
This component? I'll take a peak on Monday:
- https://github.com/ofleaf/webpacs-proto/blob/master/src/components/worklist/WorkList.vue
We're using Cornerstone + Vue in production, so it shouldn't be too hard to see what we're doing differently.
@dannyrb Yes, the WorkList.vue component. Could you tell me which part is causing the problem?
It's a little bit easier to see when you use the unminified version of cornerstone-tools for development. You can do that by changing your import:
minified (default):
import * as cornerstoneTools from 'cornerstone-tools';
unminified:
import * as cornerstoneTools from 'cornerstone-tools/dist/cornerstoneTools.js';

The error I'm seeing shows that you didn't setup cornerstoneMath as an external dependency. It's likely used by one of the tools for help calculating something.
@dannyrb Thanks for reply. I fixed it.
cornerstoneTools.external.cornerstoneMath = cornerstoneMath