Handle 4D time series nii files
Linst-inf opened this issue · 10 comments
For people to look into this, please publicly share a file that causes the error.
为了让人们调查此问题,请公开共享导致错误的文件。
感谢回答,但是文件太大了,无法上传。
For people to look into this, please publicly share a file that causes the error.
Could you please provide me with an email address so that I can send the files to your email.
paul.elliott@kitware.com
I have already sent it to your email. Looking forward to a reply. Thank you!
Got it! Yes, it does not load in VolView with this error on the Javascript console:
loggers.ts:13 RangeError: Invalid initial number of values for array (origin)
at macros2.js:554:13
at Array.forEach (<anonymous>)
at setArray (macros2.js:552:14)
at Object.setGetArray (macros2.js:619:3)
at extend (ImageData.js:354:9)
at Object.constructor [as newInstance] (macros2.js:917:5)
at convertItkToVtkImage (ITKHelper.js:87:34)
The loader says the file has 4 dimensions. Must be a time series? VolView does not handle 4D images. Would be nice if it did or at least gave a nice error message to that effect.
知道了!是的,它无法在 VolView 中加载,并在 Javascript 控制台上出现以下错误:
loggers.ts:13 RangeError: Invalid initial number of values for array (origin) at macros2.js:554:13 at Array.forEach (<anonymous>) at setArray (macros2.js:552:14) at Object.setGetArray (macros2.js:619:3) at extend (ImageData.js:354:9) at Object.constructor [as newInstance] (macros2.js:917:5) at convertItkToVtkImage (ITKHelper.js:87:34)
加载器表示该文件有 4 个维度。一定是时间序列吗?VolView 不处理 4D 图像。如果它确实做到了至少或者给出了一个很好的错误消息,那就太好了。
Thank you for your help, but a smaller 4D file can be loaded. I will send it to you for review.
test2.zip
For some reason the image reader library we are using shows the test2.zip file to hold a 3D image:
"imageType": {
"dimension": 3,
"componentType": "uint16",
"pixelType": "Scalar",
"components": 1
},
"origin": [
81.04069519042969,
116.38414764404297,
-128.30361938476562
],
"spacing": [
0.6640629172325134,
1,
1
],
"direction": "-0.9994939339115039,0.03180039970314527,0.0007813976456040354,-0.031809999592993764,-0.99919233310241,-0.024552098151576197...",
"size": [
256,
220,
256
],
It could, but I'm not aware of this being on anyone's current TODO list. We could support a community contributed PR or someone could fund Kitware for the work.