Closed ikhizarwork closed 7 months ago
i am able to save the annotations to my database , now just need help on how to retrive that json state with the dicom file .
Duplicates #104, see answers there.
got the following error when trying to load the state from the db :-
Error fetching annotations: TypeError: Cannot read properties of undefined (reading 'split') at on.loadURLs (dwv.min.js:1:378291) at Vn.loadURLs (dwv.min.js:1:450130) at applauncher.js:254:15
here is my code , please let me know if i am doing something wrong over here :-
dbRef.once('value')
.then(function (snapshot) {
const annotations = snapshot.val();
if (annotations) {
const drawings = JSON.parse(annotations);
myapp.loadURLs(drawings);
}
})
.catch(function (error) {
console.error('Error fetching annotations:', error);
});
Answered in #104.
i want to store the annotations made by me in the database rather than saving it locally , and similarly want to retrieve it later on with the loading of the dicom file .