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

ReadImageFile() does not handle bad TIFF tags #11

Open
brossetti opened this issue Jun 23, 2021 · 0 comments
Open

ReadImageFile() does not handle bad TIFF tags #11

brossetti opened this issue Jun 23, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@brossetti
Copy link
Contributor

ITK expects nicely formatted TIFFs. When bad TIFF tags are encountered, ITK prints a warning. ReadImageFile should be modified to handle the malformed tags before ITK complains.

Here is an example of the warnings when running an LLSM TIFF through the deskew module:

TIFFReadDirectoryCheckOrder: Warning, Invalid TIFF directory; tags are not sorted in ascending order.
TIFFReadDirectory: Warning, Unknown field with tag 32781 (0x800d) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 40000 (0x9c40) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 40001 (0x9c41) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 40002 (0x9c42) encountered.
TIFFFetchNormalTag: Warning, ASCII value for tag "Tag 32781" does not end in null byte. Forcing it to be null.
TIFFFetchNormalTag: Warning, ASCII value for tag "ImageDescription" does not end in null byte.
TIFFReadDirectoryCheckOrder: Warning, Invalid TIFF directory; tags are not sorted in ascending order.
TIFFReadDirectory: Warning, Unknown field with tag 32781 (0x800d) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 40000 (0x9c40) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 40001 (0x9c41) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 40002 (0x9c42) encountered.
TIFFFetchNormalTag: Warning, ASCII value for tag "Tag 32781" does not end in null byte. Forcing it to be null.
TIFFFetchNormalTag: Warning, ASCII value for tag "ImageDescription" does not end in null byte.
TIFFReadDirectoryCheckOrder: Warning, Invalid TIFF directory; tags are not sorted in ascending order.
TIFFReadDirectory: Warning, Unknown field with tag 32781 (0x800d) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 40000 (0x9c40) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 40001 (0x9c41) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 40002 (0x9c42) encountered.
TIFFFetchNormalTag: Warning, ASCII value for tag "Tag 32781" does not end in null byte. Forcing it to be null.
TIFFFetchNormalTag: Warning, ASCII value for tag "ImageDescription" does not end in null byte.
TIFFReadDirectoryCheckOrder: Warning, Invalid TIFF directory; tags are not sorted in ascending order.
TIFFReadDirectory: Warning, Unknown field with tag 32781 (0x800d) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 40000 (0x9c40) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 40001 (0x9c41) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 40002 (0x9c42) encountered.
TIFFFetchNormalTag: Warning, ASCII value for tag "Tag 32781" does not end in null byte. Forcing it to be null.
TIFFFetchNormalTag: Warning, ASCII value for tag "ImageDescription" does not end in null byte.
@brossetti brossetti added the enhancement New feature or request label Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant