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

Error with uint indexes #40

Open
marcel-goldschen-ohm opened this issue Aug 9, 2022 · 1 comment
Open

Error with uint indexes #40

marcel-goldschen-ohm opened this issue Aug 9, 2022 · 1 comment

Comments

@marcel-goldschen-ohm
Copy link

I was getting this error when accessing TIFFStack data using uint32 indexes:

Error using TIFFStack>isvalidsubscript
*** TIFFStack: Subscript indices must either be real positive integers or logicals.

I solved this by changing line 1488 in TIFFStack.m from:
validateattributes(oRefs, {'single', 'double'}, {'integer', 'real', 'positive'});
to:
validateattributes(oRefs, {'numeric'}, {'integer', 'real', 'positive'});

Seems like a logical fix to me, but if I'm not understanding something please let me know.
Let me know if you want me to submit a pull request for this change.

Cheers,
Marcel

@marcel-goldschen-ohm
Copy link
Author

Well, it seemed like it was working, but in retrospect it appears that using a uint32 index for the stack frame always returns the first frame, so my above fix is probably not what is wanted. I'm able to work around this by casting my frame index to a double value, which works but is not the expected behavior.

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

1 participant