Comments (5)
Here is the file I'm trying to load when printing file
in itkReader
:
File {name: 't2w.mnc', lastModified: 1716909043156, lastModifiedDate: Tue May 28 2024 11:10:43 GMT-0400 (Eastern Daylight Time), webkitRelativePath: '', size: 15747302, …}
lastModified: 1716909043156
lastModifiedDate: Tue May 28 2024 11:10:43 GMT-0400 (Eastern Daylight Time) {}
name: "t2w.mnc"
size: 15747302
type: ""
webkitRelativePath: ""
[[Prototype]]: File
from volview.
I tried with a Nifti image, and it works, but I don't see any difference, except for the file type:
application/vnd.unknown.nifti-1
File {name: 'MR_Gd.nii', lastModified: 1716909309256, lastModifiedDate: Tue May 28 2024 11:15:09 GMT-0400 (Eastern Daylight Time), webkitRelativePath: '', size: 4765024, …}
lastModified: 1716909309256
lastModifiedDate: Tue May 28 2024 11:15:09 GMT-0400 (Eastern Daylight Time) {}
name: "MR_Gd.nii"
size: 4765024
type: ""
webkitRelativePath: ""
[[Prototype]]: File
from volview.
After some further investigation, the problem is that readImage
is sometimes using the extension to find the reader. The MINC extension is .mnc
or .mnc.gz
, but in the list of readers, it is listed as minc
, so it doesn't find the readers:
// node_modules/@itk-wasm/image-io/dist/image-io-index.js
var imageIoIndex = /* @__PURE__ */ new Map([
["png", [png_read_image_default, png_write_image_default]],
["meta", [meta_read_image_default, meta_write_image_default]],
["tiff", [tiff_read_image_default, tiff_write_image_default]],
["nifti", [nifti_read_image_default, nifti_write_image_default]],
["jpeg", [jpeg_read_image_default, jpeg_write_image_default]],
["nrrd", [nrrd_read_image_default, nrrd_write_image_default]],
["vtk", [vtk_read_image_default, vtk_write_image_default]],
["bmp", [bmp_read_image_default, bmp_write_image_default]],
["hdf5", [hdf5_read_image_default, hdf5_write_image_default]],
["minc", [minc_read_image_default, minc_write_image_default]],
["mrc", [mrc_read_image_default, mrc_write_image_default]],
["lsm", [lsm_read_image_default, lsm_write_image_default]],
["mgh", [mgh_read_image_default, mgh_write_image_default]],
["bioRad", [bio_rad_read_image_default, bio_rad_write_image_default]],
["gipl", [gipl_read_image_default, gipl_write_image_default]],
["geAdw", [ge_adw_read_image_default, ge_adw_write_image_default]],
["ge4", [ge4_read_image_default, ge4_write_image_default]],
["ge5", [ge5_read_image_default, ge5_write_image_default]],
["gdcm", [gdcm_read_image_default, gdcm_write_image_default]],
["scanco", [scanco_read_image_default, scanco_write_image_default]],
["fdf", [fdf_read_image_default, null]],
["wasm", [wasm_read_image_default, wasm_write_image_default]],
["wasmZstd", [wasm_zstd_read_image_default, wasm_zstd_write_image_default]]
]);
It should be mnc
, as listed here:
// node_modules/@itk-wasm/image-io/dist/extension-to-image-io.js
var extensionToImageIo = /* @__PURE__ */ new Map([
["bmp", "bmp"],
["dcm", "gdcm"],
["gipl", "gipl"],
["gipl.gz", "gipl"],
["hdf5", "hdf5"],
["jpg", "jpeg"],
["jpeg", "jpeg"],
["iwi", "wasm"],
["iwi.cbor", "wasm"],
["iwi.cbor.zst", "wasmZstd"],
["lsm", "lsm"],
["mnc", "mnc"],
["mnc.gz", "mnc"],
["mnc2", "mnc"],
["mgh", "mgh"],
["mgz", "mgh"],
["mgh.gz", "mgh"],
["mha", "meta"],
["mhd", "meta"],
["mrc", "mrc"],
["nia", "nifti"],
["nii", "nifti"],
["nii.gz", "nifti"],
["hdr", "nifti"],
["nrrd", "nrrd"],
["nhdr", "nrrd"],
["png", "png"],
["pic", "bioRad"],
["tif", "tiff"],
["tiff", "tiff"],
["vtk", "vtk"],
["isq", "scanco"],
["aim", "scanco"],
["fdf", "fdf"]
]);
from volview.
Nice find. If you open an issue and offer to write a PR here: https://github.com/InsightSoftwareConsortium/itk-wasm might have a clean fix in a week or so.
from volview.
Already did !! :)
InsightSoftwareConsortium/ITK-Wasm#1141
from volview.
Related Issues (20)
- Reset Views button not working HOT 1
- Remote loading HOT 3
- Code-split state file migration code
- Load remote data across domains HOT 1
- Copy image data for thumbnailer HOT 1
- nifti segmentation is not loading in axial plane HOT 6
- Cannot install canvas on Mac HOT 3
- Move collapsible menu button to the toolbar and make it visible, not for mobile only
- Left and right arrows to change through images
- Merge polygons new feature
- .
- Question about FPP and TPP View Modes HOT 1
- Is Kitware VolView support Grayscale Softcopy Presentation State? HOT 3
- Scooping Tool for Cropping Inside the Widget HOT 3
- The rendered image looks incorrect HOT 3
- code problem HOT 1
- File loading error
- Export the current image or take a screenshot HOT 1
- Toggle camera reset HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from volview.