Am Donnerstag 10 September 2009 13:34:07 schrieb Stefan Krüger:
> Hi
>
> When i create an ImagePyramidReader or am ImageMosaicReader with parameters
> sourceURL and Hints, how to i set/change the transparent input color
> programatically? Before or after the constuction.. i just can't find a way.
>
> >     Hints hints = new Hints();
> >     reader = new ImagePyramidReader(theURL, hints);
>
> I have tried to follow the hints through the process, but i don't get it
> how a Hint given to the ImagePyramidReader can end up as a
> GeneralParameterValue in calls to
>
> > public GridCoverage read(GeneralParameterValue[] params) throws
> > IOException {
>
> because it looks like the readParams are just set once in the setInfo()
> method
>
> of the *Format:
> >        // reading parameters
> >        readParameters = new ParameterGroup(new
> > DefaultParameterDescriptorGroup(mInfo, new GeneralParameterDescriptor[]{
> >                     READ_GRIDGEOMETRY2D,
> >                     INPUT_TRANSPARENT_COLOR,
> >                INPUT_IMAGE_THRESHOLD_VALUE,
> >                OUTPUT_TRANSPARENT_COLOR,
> >                USE_JAI_IMAGEREAD,
> >                BACKGROUND_VALUES,
> >                SUGGESTED_TILE_SIZE,
> >                ALLOW_MULTITHREADING,
> >                MAX_ALLOWED_TILES}));
>
> I thought about overwriting the setInfo() method in ImageMosaicFormat, but
> it is a final class.
>
> Personally i have just added a setInputTransparentColor(Color c) method to
> the ImageMosaicReader and ImagePyramidReader classes, but as i am preparing
> a patch for better URL handling
> ( http://jira.codehaus.org/browse/GEOT-2695 ) i want to do it the GT way as
> much as possible.
>
> Greetings,
> Steve


Hi. I looked at it more and i think it is not possible. If nobody rejects i 
will open a JIRA and add a patch to add simple setInputTransparentColor and 
setOutputTransparentColor to ImagePyramidReader and ImageMosaicReader. If the 
color is set on the PyramidReader, it will propagate it to all MosaicReaders 
used.


Greetz
Steve

-- 
reclaim your net - http://tor.eff.org
enforce privacy - http://www.pgpi.org
pgp key id: 51B576FD - http://pgp.mit.edu

Please note that according to the German law on data retention,
information on every electronic information exchange with me is
retained for a period of six months.



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to