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

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

I've done some work on this and it is starting to get larger in scope that I 
would prefer.   I am leaning to doing this in two patches (pull requests) if 
that is okay with the Apache team.

As noted above, the floating-point specification is not, properly speaking, an 
image format.  Really, it's a way of bundling data in a TIFF file so as to take 
advantage of the mature support for metadata used in Geographic Information 
Systems (GIS) via the GeoTIFF convention.

Anyway, the TIFF specification does not address any way to render 
floating-point data.  The existing code base implements a family of classes 
called PhotometricInterpreters that map internal data to color. Since rendering 
floating-point data is really outside the scope of the Commons Imaging API, 
I've implemented a specification that allows the application to pass in a 
custom PhotometricInterpreter.

My plan is to submit a pull request with the following changes:
# Logic to support extraction of floating point data from the US Geological 
Survey data elevation source TIFF files
# Logic to support an application specifying a custom PhotometricInterpreter
# An implementation of a usable interpreter (to serve as either an example, or 
a tool)
# A sample image for processing and test cases.

I am still trying to figure out a good test case for this data.  The best I 
have so far is extract data and save as a JPEG.

One that code change finds its way into the Commons code base (if it's 
accepted), I will submit a second code change to support direct extraction of 
numerical data.

Does anyone have objections to this plan?

Thanks.

> 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
>
>
> 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)

Reply via email to