ImageJ: preserve original pixel values when exporting signed data #2696
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 http://lists.openmicroscopy.org.uk/pipermail/ome-users/2016-December/006286.html
This should resolve some strange behavior when exporting from an
ImagePlus that represents signed data. There are two parts to the fix:
To test, use QA 17471 and the ImageJ macro at the end of the above thread (adjusting the file paths as needed). Without this change, run the macro in ImageJ and verify that the two histograms have different min/max values but the same overall shape. Verify that
showinf -minmax -range 1 1
on the original .dv shows that the pixel type is int16, and thatshowinf -minmax
on the saved TIFF shows that the pixel type is uint16. Min/max values in both cases should match the corresponding ImageJ histogram.With this change, re-run the ImageJ macro and confirm that both histograms are identical.
showinf -minmax
on the saved TIFF should now show pixel type int16, and the min/max values should match the ImageJ histogram.It would probably also be a good idea to do the same test with one of our existing int8 samples (or a fake file), perhaps as well as one or two unsigned datasets just to double-check that nothing was broken by this change.