Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle 4D time series nii files #561

Open
Linst-inf opened this issue Mar 15, 2024 · 10 comments
Open

Handle 4D time series nii files #561

Linst-inf opened this issue Mar 15, 2024 · 10 comments

Comments

@Linst-inf
Copy link

1710488506594
麻烦帮忙解答一下,谢谢!

@PaulHax
Copy link
Collaborator

PaulHax commented Mar 15, 2024

For people to look into this, please publicly share a file that causes the error.

@Linst-inf
Copy link
Author

为了让人们调查此问题,请公开共享导致错误的文件。

感谢回答,但是文件太大了,无法上传。

@Linst-inf
Copy link
Author

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.

@PaulHax
Copy link
Collaborator

PaulHax commented Mar 18, 2024

[email protected]

@Linst-inf
Copy link
Author

[email protected]
I have already sent it to your email. Looking forward to a reply. Thank you!

@PaulHax
Copy link
Collaborator

PaulHax commented Mar 20, 2024

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.

@PaulHax PaulHax changed the title nii大文件(400MB)加载失败 Handle 4D time series nii files Mar 20, 2024
@Linst-inf
Copy link
Author

知道了!是的,它无法在 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.
image
test2.zip

@PaulHax
Copy link
Collaborator

PaulHax commented Mar 21, 2024

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
  ],

@Linst-inf
Copy link
Author

Linst-inf commented Mar 21, 2024 via email

@PaulHax
Copy link
Collaborator

PaulHax commented Mar 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants