
            });
        }
        catch (err) {
            throw err;
        }

    })

    cornerstone.events.addEventListener('cornerstoneimageloadprogress', function (event) {
        const eventData = event.detail;
        const loadProgress = document.getElementById('loadProgress');
        loadProgress.textContent = `Image Load Progress: ${eventData.percentComplete}%`;
    });

    function getUrlWithoutFrame() {
        var url = document.getElementById('wadoURL').value;
        var frameIndex = u