-
Notifications
You must be signed in to change notification settings - Fork 59
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
Check compression method used in the image (#17) #19
Merged
rapids-bot
merged 1 commit into
rapidsai:branch-0.20
from
gigony:check_supported_formats
May 5, 2021
Merged
Check compression method used in the image (#17) #19
rapids-bot
merged 1 commit into
rapidsai:branch-0.20
from
gigony:check_supported_formats
May 5, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SVS format is not supported for now but we loosen the restriction by delegating its process to libtiff's TIFFRGBAImageGet() method. cuCIM assumes that only one image with Subfile Type(=0) is available in the image file but apparently, some SVS files have also only one Subfile Type with zero so bypassing the check. This patch explicitly checks SVS format and compression methods and raises an exception if the given file doesn't match the criteria. Once SVS format is supported, those changes need to be updated to not raise exceptions for SVS files.
quasiben
approved these changes
Apr 23, 2021
@gigony can this wait until Monday to get merged ? If not, we can ask ops to merge for us while John is out on PTO |
Sure, it is absolutely okay to be merged later. Thank you! |
rerun tests |
jakirkham
approved these changes
May 5, 2021
@gpucibot merge |
rapids-bot bot
pushed a commit
that referenced
this pull request
Sep 30, 2021
Due to #17 ([BUG] Compression scheme 33003 tile decoding is not implemented), #19 (Check compression method used in the image) was merged so cuCIM has been handling only particular formats (only jpeg/deflate-compressed image). If the input TIFF image has no-compressed RAW tile image, cuCIM showed the following error message: > RuntimeError: This format (compression: 1, sample_per_pixel: 1, planar_config: 1, photometric: 1) is not supported yet!. https://github.com/Project-MONAI/MONAI/pull/2987/checks?check_run_id=3667530814#step:7:15641 This patch is to support raw RGB tiled TIFF with fast-path, re-allowing non-compressed image with slow-path (in case the input is not tiled RGB image). This supports Project-MONAI/MONAI#2987. Authors: - Gigon Bae (https://github.com/gigony) Approvers: - Gregory R. Lee (https://github.com/grlee77) - https://github.com/jakirkham URL: #108
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SVS format is not supported for now but we loosen the restriction by
delegating its process to libtiff's TIFFRGBAImageGet() method.
cuCIM assumes that only one image with Subfile Type(=0) is available in
the image file but apparently, some SVS files have also only one Subfile
Type with zero so bypassing the check.
This patch explicitly checks SVS format and compression methods and
raises an exception if the given file doesn't match the criteria.
Once SVS format is supported, those changes need to be updated to not
raise exceptions for SVS files.
Resolves: #17