You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before 2.0 it was possible to pass in an object url into the NiftiImageVolumeLoader, this is no longer the case. I need to load in volumes from disk, so after loading the file as a blob, I would pass URL.createObjectURL(blob) into the volume loader and it worked well. I found the following two issues after migrating to 2.19.7:
Compressed nifti is no longer supported, because the compression is determined from the url. If the link ends with .gz it is considered compressed. This doesn't hold for object urls.
Some nifti files fail to load in the metadata properly, and fetchAndAllocateNiftiVolume throws an error,
While some files manage to load, but only the middle slice.
Steps to Reproduce
Load a local file as a blob
Convert it to an objectURL with URL.createObjectURL(blob)
Load in nifti volume using await createNiftiImageIdsAndCacheMetadata({ url: objectUrl });
The current behavior
Compressed nifti doesn't load. The metadata of other nifti files fails, while for other images, it loads incorrectly.
The expected behavior
It should look for compression when loading the file, as before, not from the url, and generally it shouldn't matter what the url looks like
OS
Windows 11
Node version
22.2.0
Browser
Chrome
The text was updated successfully, but these errors were encountered:
attilasimko
changed the title
[Bug] New nifti-volume-loader does not support blob urls
[Bug] New nifti-volume-loader does not support object urls
Feb 13, 2025
Describe the Bug
Before 2.0 it was possible to pass in an object url into the NiftiImageVolumeLoader, this is no longer the case. I need to load in volumes from disk, so after loading the file as a blob, I would pass URL.createObjectURL(blob) into the volume loader and it worked well. I found the following two issues after migrating to 2.19.7:
Steps to Reproduce
Load a local file as a blob
Convert it to an objectURL with URL.createObjectURL(blob)
Load in nifti volume using await createNiftiImageIdsAndCacheMetadata({ url: objectUrl });
The current behavior
Compressed nifti doesn't load. The metadata of other nifti files fails, while for other images, it loads incorrectly.
The expected behavior
It should look for compression when loading the file, as before, not from the url, and generally it shouldn't matter what the url looks like
OS
Windows 11
Node version
22.2.0
Browser
Chrome
The text was updated successfully, but these errors were encountered: