Closed AlejandraM97 closed 1 year ago
@AlejandraM97 seems the library doesn't consider this to be part of its scope. Beyond de-compressing the voxel data and reading the header, NIFTI-Reader-JS isn't particularly helpful here.
I think what you want is basically an ND Array in javascript to index into the slices without thinking much about the dimensions.
Unfortunately, the js ecosystem doesn't have a clear winner there like numpy
in the python world, but there are options.
As @kmannislands notes, this issue is out of scope for this library.
However, @znshje provides sample code for issue 18. See brain-tumor repository for an example.
I would like to extract a 4d NIFTI image using NIFTI-Reader-JS so I could convert each slice into Base64. I have a 4D NIFTI Image with these dimensions in particular: Image Dimensions (1-8): 4, 216, 256, 10, 30, 1, 1, 1. I would like to extract this slice: [1,216,256,2,30] so I can iterate through 30 frames in order to convert each one into Base64. Is that possible?
Your help will be greatly appreciated, thanks very much in advance! Thanks, AlejandraM97