Viewers
Viewers copied to clipboard
Cannot read property 'toMeasurementSchema' of undefined
Bug Report Description
Hi, I'm creating a new annotation tool and I'm having issues to save the measurement and show it in Measurements tab.
I wanted to make sure that my custom tool wasn't the issue, so I decided to clone the Length Tool as a new tool and see if that could work, but it didn't.
The cloned LengthTool has the exact same code as LengthTool but measurements are not stored correctly for the cloned Length Tool.
I'm getting this error when I use my cloned LengthTool
Failed to map 'CornerstoneTools@4' measurement for definition stackPrefetch: Cannot read property 'toMeasurementSchema' of undefined
Is there anything i am missing?
I've found this issue related to this problem, but still I can't understand how to fix it: https://github.com/OHIF/Viewers/issues/1477
Screenshot:
In this screenshot I added a measurement with LengthTool Test (Cloned LengthTool), and the measurement is not added to the Measurements Panel

Hi @facuescobar! you were able to resolve this issue? I'm getting same error trying to implement Cobb Angle and TextMarker functions.
same here
Same thing here with Freehand tool. Any updates?
Please review the latest code in the master branch. I am confident that this issue has been resolved. If it persists, kindly reopen the issue with updated details.
Try viewer-dev.ohif.org instead of viewer.ohif.org
Our viewer.ohif.org is deployed from release branch while viewer-dev.ohif.org is our master branch
Read more about branch explanations here https://docs.ohif.org/development/getting-started#developing