Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(vtkdataarray): throw error if size in no multiple of numberOfComp…
…onents
- Loading branch information
3cc3abb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bourdaisj @thewtex Hello, can someone please explain why this is needed?
3cc3abb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that simplify many checks (termination condition in for loops).
Why would you want to have an array size which is NOT a multiple of number of component ?
3cc3abb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I have no idea. But due to this check, some images are now not shown.
3cc3abb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to check the size/content/metadata of your images...
3cc3abb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll check, thanks
3cc3abb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, if this condition happens to evaluate to
true
, there is likely a logical error somewhere in the library consumer code.Without this check and
throw
statement, this error could be hard to spot.I added those lines after fixing an error of this kind in a VTK.js example
3cc3abb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do I solve this error?
What property should I change in the dicom image for this error to be resolved?
Can anyone let me know please?
3cc3abb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @saumitra91
Sharing some data and/or code is a good first step to help us troubleshoot your problem.
If you think there is a bug in VTK.js, please open a new issue. If you need help, please consider opening a topic on the VTK discourse.