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

Check multiple image frames #67

Merged
merged 10 commits into from
Jun 29, 2022
Merged

Check multiple image frames #67

merged 10 commits into from
Jun 29, 2022

Conversation

howff
Copy link

@howff howff commented May 2, 2022

Loop through all frames of the main image and process them in turn.
Might be better to try/catch inside the frame loop though.

For more info see: #58

@howff howff added the enhancement New feature or request label May 2, 2022
@lgtm-com
Copy link

lgtm-com bot commented May 3, 2022

This pull request introduces 1 alert when merging 10b3ad9 into f81e65a - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

@howff
Copy link
Author

howff commented May 9, 2022

After wrestling with this for too many hours I've come to the conclusion that Magick.NET has a bug in its BMP-format writer. I've got it to work by using PGM format, because leptonica was built without support for anything else (GIF, JPEG, PNG, TIFF, ...). I tried building a new leptonica with more format support but it was rejected, probably because tesseract would also have to be rebuilt. But then we would have to be careful with the tesseract nuget package, although that needs an update anyway. For the moment I just want to get something I can now move into the safe haven for testing on real images.

The main outstanding issue now is the lack of support for decompressing overlay data, and I'm not sure if that's down to a native codec issue or something else.

@jas88
Copy link
Member

jas88 commented May 17, 2022

@howff strange, have you opened a Github issue for it or got a test case? The whole leptonica/tesseract tangle is a pain in other ways.

We might also get some benefit from switching to SharpImage if suitable (since fo-dicom uses that for non-Windows-specific image handling anyway) - ImageMagick is probably massive overkill for our needs, so might be bringing excess baggage we could trim off.

@howff howff requested a review from tznind June 17, 2022 09:37
@howff howff requested a review from jas88 June 28, 2022 09:03
mi.Negate();
memStreamOut.Position = 0;
mi.Write(memStreamOut);
mi.Write($"{fi.FullName}.frame{frameNum}.png", MagickFormat.Png); // XXX debugging
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debugging == remove before merge?

@jas88 jas88 merged commit 08fa56e into main Jun 29, 2022
@jas88 jas88 deleted the feature/frames branch June 29, 2022 22:25
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

Successfully merging this pull request may close these issues.

2 participants