P. 1
ProgrammingJavaTMAdvanced Imaging

ProgrammingJavaTMAdvanced Imaging

|Views: 30|Likes:

More info:

Published by: Optionz Sick's Banditz on Jul 05, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/24/2013

pdf

text

original

TheMultiResolutionRenderableImageclassproducesrenderingsbasedona
setofsuppliedRenderedImagesatvariousresolutions.The
MultiResolutionRenderableImageisconstructedfromaspecifieddimension
(height;thewidthisderivedbythesourceimageaspectratioandisnot
specified)andavectorofrenderedImagesofprogressivelylowerresolution.

4.2.10

Multi-resolution Renderable Images

IMAGE ACQUISITION AND DISPLAY

96

Programming in Java Advanced Imaging

API:javax.media.jai.MultiResolutionRenderableImage

public MultiResolutionRenderableImage(Vector renderedSources,
float minX, float minY, float height)

constructsaMultiResolutionRenderableImagewithgivendimensionsfrom
aVector of progressively lower resolution versions of a RenderedImage.

RenderedImage createScaledRendering(int width, int height,
RenderingHints hints)

returns a rendering with a given width, height, and rendering hints. If a JAI
renderinghintnamedJAI.KEY_INTERPOLATIONisprovided,itscorresponding
InterpolationobjectisusedasanargumenttotheJAIoperatorusedtoscale
theimage.Ifnosuchhintispresent,aninstanceofInterpolationNearestis
used.

RenderedImage createDefaultRendering()

returns a 100-pixel high rendering with no rendering hints.

RenderedImage createRendering(RenderContext renderContext)

returnsarenderingbasedonaRenderContext.IfaJAIrenderinghintnamed
JAI.KEY_INTERPOLATION is provided, its correspondingInterpolation
objectisusedasanargumenttotheJAIoperatorusedtoscaletheimage.Ifno
such hint is present, an instance ofInterpolationNearest is used.

Parameters:

rendered-

Sources

AVectorofRenderedImages.

minX

Theminimumxcoordinateofthe
Renderable,asafloat.

minY

Theminimumycoordinateofthe
Renderable,asafloat.

height

TheheightoftheRenderable,asafloat.

Parameters:

width

Thewidthoftherenderinginpixels.

height

Theheightoftherenderinginpixels.

hints

AHashtableofrenderinghints.

Parameters:

render-

Context

ARenderContextdescribingthetransform
andrenderinghints.

IMAGE ACQUISITION AND DISPLAY

Streams

97

Release 1.0.1, November 1999

Object getProperty(String name)

getsapropertyfromthepropertysetofthisimage.Ifthepropertynameisnot
recognized,java.awt.Image.UndefinedProperty will be returned.

String[] getPropertyNames()

returns a list of the properties recognized by this image.

float getWidth()

returns the floating-point width of theRenderableImage.

float getHeight()

returns the floating-point height of theRenderableImage.

float getMinX()

returns the floating-point minimumx coordinate of theRenderableImage.

float getMaxX()

returns the floating-point maximumx coordinate of theRenderableImage.

float getMinY()

returns the floating-point minimumy coordinate of theRenderableImage.

float getMaxY()

returns the floating-point maximumy coordinate of theRenderableImage.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->