Hi Alberto,
I have had similar problems with MRSID. It sounds like we need to define
an image depth rescaling transformation that is applied to the per-layer
window image buffer. It doesn't sound too difficult in principle.
regards,
Larry
On Mon, Jun 28, 2010 at 10:49 AM, Alberto De Luca <
i...@geomaticaeambiente.it> wrote:
> Dear OJ developers,
>
> I was working on the Sextante classes, trying to enhance raster support and
> visualization capabilities. Having a powerful raster management is important
> so we can port to OJ all the raster plugins we developed for the OJ-derived
> AdB-ToolBox (we exchanged some emails on the topic a while ago).
>
> So, as a first attempt, I tried to add ESRI FLT raster support, adding some
> lines of code to the RasterImageLayer class. I am here facing a dilemma
> though.
>
> The loadImage method returns a planarimage, which is then displayed on the
> screen.
> If I read the FLT file into a TiledImage whose SampleModel is
> DataBuffer.TYPE_FLOAT (to match the data model of the FLT file) and return
> it to be displayed, OJ loads it ok, but the raster displayed is completely
> blank. I know it's there because I can export its envelope and I can read
> cell values (using the OpenJUMPSextanteRasterLayer class), values that
> exactly match the values stored in the FLT file.
> If after creating the TiledImage I rescale it into a 0-255 range
> PlanarImage, I can display it ok (as a grayscale for example) but then when
> I read the cell values from the raster layer, they're clearly different from
> the original FLT values.
>
> My question is: is there a way to have a correct visualization while
> maintaining access to the actual cell values? In
> www.lac.inpe.br/JIPCookbook/2200-display-surrogate.jsp they suggest the
> use of the javax.media.jai.iterator.RandomIter class to access cell values
> after the image has been rescaled. Would this be appropriate in OJ?
>
> In the attached GridFloat.java you can find the code used to read the FLT
> grid (see the readGrid and the getPlanarImage methods). Also attached you
> can find my modified RasterImageLayer class (see in particular the loadImage
> method).
>
> Please consider I'm not a good programmer, so I might just be on a
> completely wrong track...
> Thanks
> Alberto
>
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel