You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Lucas (Jira)" <ji...@apache.org> on 2020/04/05 12:26:00 UTC

[jira] [Commented] (IMAGING-251) Support TIFF standard floating point data

    [ https://issues.apache.org/jira/browse/IMAGING-251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17075816#comment-17075816 ] 

Gary Lucas commented on IMAGING-251:
------------------------------------

I have submitted a Pull Request with initial changes to support access to TIFF images with floating-point data formats. The work I submitted enables Commons Imaging to read BufferedImages from some floating-point sources, though I am still looking for example files of other variations so that I can broaden the capabilities of the code.   I am also working on the numerical data-access functionality that was the reason for this original issue.

One of the features of the  new code is that it allows an application to specify a palette for mapping floating-point values to colors. This is a new feature for the Commons Imaging TIFF support.  The palette is specified by providing the API with a custom "Photometric Interpreter".  Ordinarily, Commons Imaging uses its built-in interpreters to map image data to colors. This change permits an application to supply interpreters based on information (user preferences) that is outside the scope of the TIFF file. I have included a simple example application called ReadAndRenderFloatingPoint.java which is located in the test space in the standard Commons Imaging code base. 

I've attached a picture showing the results from a US Geological Survey elevation data product.  This example was built using a list of palette specifications.  One specification maps all negative (ocean) elevations to blue. The other specification maps positive (land) elevations to shades of gray.   I came up with the design for this API by looking at the on-line help for a number of applications including ArcGIS, R, Matlab, and GRASS.  

!Imaging252_USGS_n38w077.jpg!

 

> Support TIFF standard floating point data
> -----------------------------------------
>
>                 Key: IMAGING-251
>                 URL: https://issues.apache.org/jira/browse/IMAGING-251
>             Project: Commons Imaging
>          Issue Type: New Feature
>          Components: Format: TIFF
>    Affects Versions: 1.x
>            Reporter: Gary Lucas
>            Priority: Major
>             Fix For: 1.x
>
>         Attachments: Imaging252_USGS_n38w077.jpg
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Commons Imaging does not support the floating-point format included in the TIFF specification. There are prominent data sources that issue products in this format. The ability to support this information would open up new application areas for Commons Imaging.
> TIFF is often used as a mechanism for distributing data from geophysical applications in the form of GeoTIFF files.  Some of this is not imagery, but data. For example, the US Geological Survey is currently releasing high-resolution elevation data grids for the 3DEP program under the name Cloud-Optimized GeoTIFF (COG). It is a substantial data set with significant potential commercial and academic applications.
> To access this data means modifying the TIFF DataReaderStrips and DataReaderTile classes to recognize floating point data (which is typically indicated using TIFF tag #339, SampleFormat). Also, returning the data in the form of a BufferedImage makes no sense at all, so the API on the TiffImageParser and supporting classes would need additional methods to return arrays of floats.  The good news here is that that requirement would mean adding new methods to the classes rather than making significant changes to existing classes. So the probability of unintended consequences or new bugs in existing code would be minimized.
> Specification details for floating-point are given in the main TIFF-6 documentations and Adobe Photoshop TIFF Technical Note 3.
>  
> I am willing to volunteer to make these changes provided that there is interest and a high probability that my contributions would be evaluated and, if suitable, integrated into the Commons Imaging code base. 
> Thank you for your attention in this matter.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)