Handling 16bit image depth data correctly#5
Closed
CV-GPhL wants to merge 6 commits into
Closed
Conversation
Added missing include file (for compilation with Intel Compiler v16)
Added missing include (for compilation with Intel v16 compiler)
Added missing include file (for compilation with Intel v16 compiler)
…ently active/inactive pixels stored in image data array as 2^32-1) Without that change those data items will be passed to the data processing software incorrectly: for details see https://www.globalphasing.com/autoproc/wiki/index.cgi?DataProcessingHdf5Eiger16bit201910
pilipp
reviewed
Nov 8, 2019
|
|
||
| template<class T> void applyMaskAndTransformToInt32(const T * indata, int outdata[], const uint32_t * maskData, size_t size) { | ||
| constexpr size_t maxSigned = (size_t)std::numeric_limits<int32_t>::max(); | ||
| template<class T> void applyMaskAndTransformToInt32(const T * indata, int outdata[], const uint32_t * maskData, size_t size, size_t maxSigned) { |
Contributor
There was a problem hiding this comment.
simpler:
#include <type_traits>
constexpr size_t maxSigned = (size_t)std::numeric_limits<std::make_signed<T>::type>::max();
Author
There was a problem hiding this comment.
Absolutely: I'm no C++ expert by a (very) long stretch ... The main idea was to show you what I did to resolve the 16/32-bit issue and you can take the lead in providing the "proper" solution here.
Contributor
|
The change has been performed in a different PR. |
This file contains hidden or 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
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.
See
https://www.globalphasing.com/autoproc/wiki/index.cgi?DataProcessingHdf5Eiger16bit201910