blob: cd42555a2bb4bc47e99a38501e66c0ff2845bbcd [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (19) -->
<title>ComputedImage (Apache SIS 1.3 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.sis.image, class: ComputedImage">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.image.ComputedImage class">
<meta name="keywords" content="SOURCE_PADDING_KEY">
<meta name="keywords" content="sampleModel">
<meta name="keywords" content="getSource()">
<meta name="keywords" content="getSources()">
<meta name="keywords" content="getSampleModel()">
<meta name="keywords" content="getTileWidth()">
<meta name="keywords" content="getTileHeight()">
<meta name="keywords" content="getTile()">
<meta name="keywords" content="computeTile()">
<meta name="keywords" content="createTile()">
<meta name="keywords" content="prefetch()">
<meta name="keywords" content="hasTileWriters()">
<meta name="keywords" content="isTileWritable()">
<meta name="keywords" content="getWritableTileIndices()">
<meta name="keywords" content="markTileWritable()">
<meta name="keywords" content="markDirtyTiles()">
<meta name="keywords" content="clearErrorFlags()">
<meta name="keywords" content="sourceTileChanged()">
<meta name="keywords" content="dispose()">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../sis.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/ComputedImage.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html#class">Help</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Summary:</p>
<ul>
<li>Nested</li>
<li><a href="#field-summary">Field</a></li>
<li><a href="#constructor-summary">Constr</a></li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li><a href="#field-detail">Field</a></li>
<li><a href="#constructor-detail">Constr</a></li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><a href="../../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.image</a></div>
<h1 title="Class ComputedImage" class="title">Class ComputedImage</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
<div class="inheritance"><a href="PlanarImage.html" title="class in org.apache.sis.image">PlanarImage</a>
<div class="inheritance">ComputedImage</div>
</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">Rendered­Image</a></code>, <code><a href="../util/Disposable.html" title="interface in org.apache.sis.util">Disposable</a></code></dd>
</dl>
<dl class="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="ResampledImage.html" title="class in org.apache.sis.image">Resampled­Image</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">ComputedImage</span>
<span class="extends-implements">extends <a href="PlanarImage.html" title="class in org.apache.sis.image">PlanarImage</a>
implements <a href="../util/Disposable.html" title="interface in org.apache.sis.util">Disposable</a></span></div>
<div class="block">An image with tiles computed on-the-fly and cached for future reuse.
Computations are performed on a tile-by-tile basis (potentially in different threads)
and the results are stored in a cache shared by all images in the runtime environment.
Tiles may be discarded at any time or may become dirty if a source has been modified,
in which case those tiles will be recomputed when needed again.
<p><code>Computed­Image</code> may have an arbitrary number of source images, including zero.
A <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/TileObserver.html" title="class or interface in java.awt.image" class="external-link"><code>Tile­Observer</code></a> is automatically registered to all sources that are instances of
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image</code></a>. If one of those sources sends a change event, then all
<code>Computed­Image</code> tiles that may be impacted by that change are marked as <cite>dirty</cite>
and will be computed again when needed.</p>
<p>When this <code>Computed­Image</code> is garbage collected, all cached tiles are discarded
and the above-cited <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/TileObserver.html" title="class or interface in java.awt.image" class="external-link"><code>Tile­Observer</code></a> is automatically removed from all sources.
This cleanup can be requested without waiting for garbage collection by invoking the
<a href="#dispose()"><code>dispose()</code></a> method, but that call should be done only if the caller is certain
that this <code>Computed­Image</code> will not be used anymore.</p>
<h2>Pixel coordinate system</h2>
Default implementation assumes that the pixel in upper-left left corner is located at coordinates (0,0).
This assumption is consistent with <a href="../coverage/grid/GridCoverage.html#render(org.apache.sis.coverage.grid.GridExtent)"><code>Grid­Coverage​.render(Grid­Extent)</code></a>
contract, which produces an image located at (0,0) when the image region matches the <code>Grid­Extent</code>.
However, subclasses can use a non-zero origin by overriding the methods documented in the
<cite>Sub-classing</cite> section below.
<p>If this <code>Computed­Image</code> does not have any <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image</code></a> source, then there is
no other assumption on the pixel coordinate system. But if there is writable sources, then the default
implementation assumes that source images occupy the same region as this <code>Computed­Image</code>:
all pixels at coordinates (<var>x</var>, <var>y</var>) in this <code>Computed­Image</code> depend on pixels
at the same (<var>x</var>, <var>y</var>) coordinates in the source images,
possibly shifted or expanded to neighborhood pixels as described in <a href="#SOURCE_PADDING_KEY"><code>SOURCE_PADDING_KEY</code></a>.
If this assumption does not hold, then subclasses should override the
<a href="#sourceTileChanged(java.awt.image.RenderedImage,int,int)"><code>source­Tile­Changed(Rendered­Image, int, int)</code></a> method.</p>
<h2>Sub-classing</h2>
<p>Subclasses need to implement at least the following methods:</p>
<ul>
<li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html#getWidth()" title="class or interface in java.awt.image" class="external-link"><code>Rendered­Image​.get­Width()</code></a> — the image width in pixels.</li>
<li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html#getHeight()" title="class or interface in java.awt.image" class="external-link"><code>Rendered­Image​.get­Height()</code></a> — the image height in pixels.</li>
<li><a href="#computeTile(int,int,java.awt.image.WritableRaster)"><code>compute­Tile(int, int, Writable­Raster)</code></a> — invoked when a
requested tile is not in the cache or needs to be updated.</li>
</ul>
<p>If pixel coordinates or tile indices do not start at zero,
then subclasses shall also override the following methods:</p>
<ul>
<li><a href="PlanarImage.html#getMinX()"><code>Planar­Image​.get­Min­X()</code></a> — the minimum <var>x</var> coordinate (inclusive) of the image.</li>
<li><a href="PlanarImage.html#getMinY()"><code>Planar­Image​.get­Min­Y()</code></a> — the minimum <var>y</var> coordinate (inclusive) of the image.</li>
<li><a href="PlanarImage.html#getMinTileX()"><code>Planar­Image​.get­Min­Tile­X()</code></a> — the minimum tile index in the <var>x</var> direction.</li>
<li><a href="PlanarImage.html#getMinTileY()"><code>Planar­Image​.get­Min­Tile­Y()</code></a> — the minimum tile index in the <var>y</var> direction.</li>
</ul>
<h2>Writable computed images</h2>
<code>Computed­Image</code> can itself be a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image</code></a> if subclasses decide so.
A writable computed image is an image which can retro-propagate sample value changes to the source images.
This class provides <a href="#hasTileWriters()"><code>has­Tile­Writers()</code></a>, <a href="#getWritableTileIndices()"><code>get­Writable­Tile­Indices()</code></a>, <a href="#isTileWritable(int,int)"><code>is­Tile­Writable(int, int)</code></a>
and <a href="#markTileWritable(int,int,boolean)"><code>mark­Tile­Writable(int, int, boolean)</code></a> methods for <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image</code></a> implementations convenience.
<p>Apache SIS <a href="https://issues.apache.org/jira/browse/SIS-487">does not yet define a synchronization policy</a>
between <a href="#getTile(int,int)"><code>get­Tile(…)</code></a> method and <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html#getWritableTile(int,int)" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image​​.get­Writable­Tile</code></a>/<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html#releaseWritableTile(int,int)" title="class or interface in java.awt.image" class="external-link"><code>release­Writable­Tile(…)</code></a> methods.
For example if a call to <code>get­Tile(tile­X, tile­Y)</code> is followed by a call to <code>get­Writable­Tile(tile­X, tile­Y)</code>
in another thread, there is no guarantee about whether or not the sample values seen in the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/Raster.html" title="class or interface in java.awt.image" class="external-link"><code>Raster</code></a> would be
isolated from the write operations done concurrently in the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRaster.html" title="class or interface in java.awt.image" class="external-link"><code>Writable­Raster</code></a>.
A future SIS version may define a policy (possibly based on <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/concurrent/locks/ReadWriteLock.html" title="class or interface in java.util.concurrent.locks" class="external-link"><code>Read­Write­Lock</code></a>).</p>
<p>Note that despite above-cited issue, all methods in this <code>Computed­Image</code> class are thread-safe.
What is not thread-safe is writing into a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRaster.html" title="class or interface in java.awt.image" class="external-link"><code>Writable­Raster</code></a> from outside the <a href="#computeTile(int,int,java.awt.image.WritableRaster)"><code>compute­Tile(…)</code></a> method, or reading a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/Raster.html" title="class or interface in java.awt.image" class="external-link"><code>Raster</code></a> after it <a href="#markDirtyTiles(java.awt.Rectangle)">became dirty</a>
if the change to dirty state happened after the call to <a href="#getTile(int,int)"><code>get­Tile(…)</code></a>.</p></div>
<dl class="notes">
<dt>Since:</dt>
<dd>1.1</dd>
<p><font size="-1">Defined in the <code>sis-feature</code> module</font></p>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/SampleModel.html" title="class or interface in java.awt.image" class="external-link">Sample­Model</a></code></div>
<div class="col-second even-row-color"><code><a href="#sampleModel" class="member-name-link">sample­Model</a></code></div>
<div class="col-last even-row-color">
<div class="block">The sample model shared by all tiles in this image.</div>
</div>
<div class="col-first odd-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color"><code><a href="#SOURCE_PADDING_KEY" class="member-name-link">SOURCE_PADDING_KEY</a></code></div>
<div class="col-last odd-row-color">
<div class="block">The property for declaring the amount of additional source pixels needed on each side of a destination pixel.</div>
</div>
</div>
<div class="inherited-list">
<h3 id="fields-inherited-from-class-PlanarImage">Fields inherited from class&nbsp;<a href="PlanarImage.html" title="class in org.apache.sis.image">PlanarImage</a></h3>
<code><a href="PlanarImage.html#GRID_GEOMETRY_KEY">GRID_GEOMETRY_KEY</a>, <a href="PlanarImage.html#MASK_KEY">MASK_KEY</a>, <a href="PlanarImage.html#POSITIONAL_ACCURACY_KEY">POSITIONAL_ACCURACY_KEY</a>, <a href="PlanarImage.html#SAMPLE_RESOLUTIONS_KEY">SAMPLE_RESOLUTIONS_KEY</a>, <a href="PlanarImage.html#STATISTICS_KEY">STATISTICS_KEY</a></code></div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier</div>
<div class="table-header col-second">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected </code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.awt.image.SampleModel,java.awt.image.RenderedImage...)" class="member-name-link">Computed­Image</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/SampleModel.html" title="class or interface in java.awt.image" class="external-link">Sample­Model</a>&nbsp;sample­Model,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">Rendered­Image</a>...&nbsp;sources)</code></div>
<div class="col-last even-row-color">
<div class="block">Creates an initially empty image with the given sample model.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#clearErrorFlags(java.awt.Rectangle)" class="member-name-link">clear­Error­Flags</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Rectangle.html" title="class or interface in java.awt" class="external-link">Rectangle</a>&nbsp;tiles)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Clears the error status of all tiles in the given range of indices.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>protected abstract <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/Raster.html" title="class or interface in java.awt.image" class="external-link">Raster</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#computeTile(int,int,java.awt.image.WritableRaster)" class="member-name-link">compute­Tile</a><wbr>(int&nbsp;tile­X,
int&nbsp;tile­Y,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRaster.html" title="class or interface in java.awt.image" class="external-link">Writable­Raster</a>&nbsp;previous)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Invoked when a tile need to be computed or updated.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRaster.html" title="class or interface in java.awt.image" class="external-link">Writable­Raster</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#createTile(int,int)" class="member-name-link">create­Tile</a><wbr>(int&nbsp;tile­X,
int&nbsp;tile­Y)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Creates an initially empty tile at the given tile grid position.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#dispose()" class="member-name-link">dispose</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Advises this image that its tiles will no longer be requested.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/SampleModel.html" title="class or interface in java.awt.image" class="external-link">Sample­Model</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSampleModel()" class="member-name-link">get­Sample­Model</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the sample model associated with this image.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">Rendered­Image</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSource(int)" class="member-name-link">get­Source</a><wbr>(int&nbsp;index)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the source at the given index.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Vector.html" title="class or interface in java.util" class="external-link">Vector</a>&lt;<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">Rendered­Image</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSources()" class="member-name-link">get­Sources</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the immediate sources of image data for this image (may be <code>null</code>).</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/Raster.html" title="class or interface in java.awt.image" class="external-link">Raster</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getTile(int,int)" class="member-name-link">get­Tile</a><wbr>(int&nbsp;tile­X,
int&nbsp;tile­Y)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a tile of this image, computing it when needed.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getTileHeight()" class="member-name-link">get­Tile­Height</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the height of tiles in this image.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getTileWidth()" class="member-name-link">get­Tile­Width</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the width of tiles in this image.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Point.html" title="class or interface in java.awt" class="external-link">Point</a>[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getWritableTileIndices()" class="member-name-link">get­Writable­Tile­Indices</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the indices of all tiles under computation or checked out for writing, or <code>null</code> if none.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hasTileWriters()" class="member-name-link">has­Tile­Writers</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns whether any tile is under computation or is checked out for writing.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isTileWritable(int,int)" class="member-name-link">is­Tile­Writable</a><wbr>(int&nbsp;tile­X,
int&nbsp;tile­Y)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns whether the specified tile is currently under computation or checked out for writing.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#markDirtyTiles(java.awt.Rectangle)" class="member-name-link">mark­Dirty­Tiles</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Rectangle.html" title="class or interface in java.awt" class="external-link">Rectangle</a>&nbsp;tiles)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Marks all tiles in the given range of indices as in need of being recomputed.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#markTileWritable(int,int,boolean)" class="member-name-link">mark­Tile­Writable</a><wbr>(int&nbsp;tile­X,
int&nbsp;tile­Y,
boolean&nbsp;writing)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets or clears whether a tile is checked out for writing.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected <a href="../util/Disposable.html" title="interface in org.apache.sis.util">Disposable</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#prefetch(java.awt.Rectangle)" class="member-name-link">prefetch</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Rectangle.html" title="class or interface in java.awt" class="external-link">Rectangle</a>&nbsp;tiles)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Notifies this image that tiles will be computed soon in the given region.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sourceTileChanged(java.awt.image.RenderedImage,int,int)" class="member-name-link">source­Tile­Changed</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">Rendered­Image</a>&nbsp;source,
int&nbsp;tile­X,
int&nbsp;tile­Y)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Invoked when a tile of a source image has been updated.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-PlanarImage">Methods inherited from class&nbsp;<a href="PlanarImage.html" title="class in org.apache.sis.image">PlanarImage</a></h3>
<code><a href="PlanarImage.html#copyData(java.awt.image.WritableRaster)">copy­Data</a>, <a href="PlanarImage.html#getBounds()">get­Bounds</a>, <a href="PlanarImage.html#getData()">get­Data</a>, <a href="PlanarImage.html#getData(java.awt.Rectangle)">get­Data</a>, <a href="PlanarImage.html#getMinTileX()">get­Min­Tile­X</a>, <a href="PlanarImage.html#getMinTileY()">get­Min­Tile­Y</a>, <a href="PlanarImage.html#getMinX()">get­Min­X</a>, <a href="PlanarImage.html#getMinY()">get­Min­Y</a>, <a href="PlanarImage.html#getNumXTiles()">get­Num­XTiles</a>, <a href="PlanarImage.html#getNumYTiles()">get­Num­YTiles</a>, <a href="PlanarImage.html#getProperty(java.lang.String)">get­Property</a>, <a href="PlanarImage.html#getPropertyNames()">get­Property­Names</a>, <a href="PlanarImage.html#getTileGridXOffset()">get­Tile­Grid­XOffset</a>, <a href="PlanarImage.html#getTileGridYOffset()">get­Tile­Grid­YOffset</a>, <a href="PlanarImage.html#toString()">to­String</a>, <a href="PlanarImage.html#verify()">verify</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Object">Methods inherited from class&nbsp;<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">get­Class</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hash­Code</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notify­All</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-RenderedImage">Methods inherited from interface&nbsp;<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">RenderedImage</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html#getColorModel()" title="class or interface in java.awt.image" class="external-link">get­Color­Model</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html#getHeight()" title="class or interface in java.awt.image" class="external-link">get­Height</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html#getWidth()" title="class or interface in java.awt.image" class="external-link">get­Width</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="SOURCE_PADDING_KEY">
<h3>SOURCE_PADDING_KEY</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">SOURCE_PADDING_KEY</span></div>
<div class="block">The property for declaring the amount of additional source pixels needed on each side of a destination pixel.
This property can be used for calculations that require only a fixed rectangular source region around a source
pixel in order to compute each destination pixel. A given destination pixel (<var>x</var>, <var>y</var>) may be
computed from the neighborhood of source pixels beginning at
(<var>x</var> - <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Insets.html#left" title="class or interface in java.awt" class="external-link"><code>Insets​.left</code></a>,
<var>y</var> - <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Insets.html#top" title="class or interface in java.awt" class="external-link"><code>Insets​.top</code></a>) and extending to
(<var>x</var> + <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Insets.html#right" title="class or interface in java.awt" class="external-link"><code>Insets​.right</code></a>,
<var>y</var> + <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Insets.html#bottom" title="class or interface in java.awt" class="external-link"><code>Insets​.bottom</code></a>) inclusive.
Those <code>left</code>, <code>top</code>, <code>right</code> and <code>bottom</code> attributes can be positive, zero or negative,
but their sums shall be positive with (<code>left</code> + <code>right</code>) ≥ 0 and (<code>top</code> + <code>bottom</code>) ≥ 0.
<p>The property value shall be an instance of <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Insets.html" title="class or interface in java.awt" class="external-link"><code>Insets</code></a> or <code>Insets[]</code>.
The array form can be used when a different padding is required for each source image.
In that case, the image source index is used as the index for accessing the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Insets.html" title="class or interface in java.awt" class="external-link"><code>Insets</code></a> element in the array.
Null or <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Image.html#UndefinedProperty" title="class or interface in java.awt" class="external-link">undefined</a> elements mean that no padding is applied.
If the array length is shorter than the number of source images, missing elements are considered as null.</p></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="PlanarImage.html#getProperty(java.lang.String)"><code>Planar­Image​.get­Property(String)</code></a></li>
<li><a href="#sourceTileChanged(java.awt.image.RenderedImage,int,int)"><code>source­Tile­Changed(Rendered­Image, int, int)</code></a></li>
<li><a href="../../../../constant-values.html#org.apache.sis.image.ComputedImage.SOURCE_PADDING_KEY">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="sampleModel">
<h3>sampleModel</h3>
<div class="member-signature"><span class="modifiers">protected final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/SampleModel.html" title="class or interface in java.awt.image" class="external-link">SampleModel</a></span>&nbsp;<span class="element-name">sampleModel</span></div>
<div class="block">The sample model shared by all tiles in this image.
The <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/SampleModel.html#getWidth()" title="class or interface in java.awt.image" class="external-link">sample model width</a>
determines this <a href="#getTileWidth()">image tile width</a>,
and the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/SampleModel.html#getHeight()" title="class or interface in java.awt.image" class="external-link">sample model height</a>
determines this <a href="#getTileHeight()">image tile height</a>.
<div class="note"><b>Design note:</b>
<code>Computed­Image</code> requires the sample model to have exactly the desired tile size
otherwise tiles created by <a href="#createTile(int,int)"><code>create­Tile(int, int)</code></a> will consume more memory
than needed.</div></div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(java.awt.image.SampleModel,java.awt.image.RenderedImage...)">
<h3>ComputedImage</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="element-name">ComputedImage</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/SampleModel.html" title="class or interface in java.awt.image" class="external-link">SampleModel</a>&nbsp;sampleModel,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">RenderedImage</a>...&nbsp;sources)</span></div>
<div class="block">Creates an initially empty image with the given sample model.
The default tile size will be the width and height of the given sample model
(this default setting minimizes the amount of memory consumed by <a href="#createTile(int,int)"><code>create­Tile(int, int)</code></a>).
This constructor automatically registers a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/TileObserver.html" title="class or interface in java.awt.image" class="external-link"><code>Tile­Observer</code></a>
for all sources that are <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image</code></a> instances.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>sample­Model</code> - the sample model shared by all tiles in this image.</dd>
<dd><code>sources</code> - sources of this image (may be an empty array), or a null array if unknown.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getSource(int)">
<h3>getSource</h3>
<div class="member-signature"><span class="modifiers">protected final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">RenderedImage</a></span>&nbsp;<span class="element-name">getSource</span><wbr><span class="parameters">(int&nbsp;index)</span></div>
<div class="block">Returns the source at the given index.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>index</code> - index of the desired source.</dd>
<dt>Returns:</dt>
<dd>source at the given index.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</a></code> - if the given index is out of bounds.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getSources()">
<h3>getSources</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Vector.html" title="class or interface in java.util" class="external-link">Vector</a>&lt;<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">RenderedImage</a>&gt;</span>&nbsp;<span class="element-name">getSources</span>()</div>
<div class="block">Returns the immediate sources of image data for this image (may be <code>null</code>).
This method returns all sources specified at construction time.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html#getSources()" title="class or interface in java.awt.image" class="external-link">get­Sources</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">Rendered­Image</a></code></dd>
<dt>Overrides:</dt>
<dd><code><a href="PlanarImage.html#getSources()">get­Sources</a></code>&nbsp;in class&nbsp;<code><a href="PlanarImage.html" title="class in org.apache.sis.image">Planar­Image</a></code></dd>
<dt>Returns:</dt>
<dd>the immediate sources, or an empty vector is none, or <code>null</code> if unknown.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getSampleModel()">
<h3>getSampleModel</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/SampleModel.html" title="class or interface in java.awt.image" class="external-link">SampleModel</a></span>&nbsp;<span class="element-name">getSampleModel</span>()</div>
<div class="block">Returns the sample model associated with this image.
All rasters returned from this image will have this sample model.
In <code>Computed­Image</code> implementation, the sample model determines the tile size
(this is not necessarily true for all <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link"><code>Rendered­Image</code></a> implementations).</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html#getSampleModel()" title="class or interface in java.awt.image" class="external-link">get­Sample­Model</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">Rendered­Image</a></code></dd>
<dt>Returns:</dt>
<dd>the sample model of this image.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getTileWidth()">
<h3>getTileWidth</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getTileWidth</span>()</div>
<div class="block">Returns the width of tiles in this image. The default implementation returns <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/SampleModel.html#getWidth()" title="class or interface in java.awt.image" class="external-link"><code>Sample­Model​.get­Width()</code></a>.
<div class="note"><b>Note:</b>
a raster can have a smaller width than its sample model, for example when a raster is a view over a subregion
of another raster. But this is not recommended in the particular case of this <code>Computed­Image</code> class,
because it would cause <a href="#createTile(int,int)"><code>create­Tile(int, int)</code></a> to consume more memory than necessary.</div></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html#getTileWidth()" title="class or interface in java.awt.image" class="external-link">get­Tile­Width</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">Rendered­Image</a></code></dd>
<dt>Returns:</dt>
<dd>the width of this image in pixels.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getTileHeight()">
<h3>getTileHeight</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getTileHeight</span>()</div>
<div class="block">Returns the height of tiles in this image. The default implementation returns <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/SampleModel.html#getHeight()" title="class or interface in java.awt.image" class="external-link"><code>Sample­Model​.get­Height()</code></a>.
<div class="note"><b>Note:</b>
a raster can have a smaller height than its sample model, for example when a raster is a view over a subregion
of another raster. But this is not recommended in the particular case of this <code>Computed­Image</code> class,
because it would cause <a href="#createTile(int,int)"><code>create­Tile(int, int)</code></a> to consume more memory than necessary.</div></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html#getTileHeight()" title="class or interface in java.awt.image" class="external-link">get­Tile­Height</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">Rendered­Image</a></code></dd>
<dt>Returns:</dt>
<dd>the height of this image in pixels.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getTile(int,int)">
<h3>getTile</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/Raster.html" title="class or interface in java.awt.image" class="external-link">Raster</a></span>&nbsp;<span class="element-name">getTile</span><wbr><span class="parameters">(int&nbsp;tileX,
int&nbsp;tileY)</span></div>
<div class="block">Returns a tile of this image, computing it when needed.
This method performs the first of the following actions that apply:
<ol>
<li>If the requested tile is present in the cache and is not dirty, then that tile is returned immediately.</li>
<li>Otherwise if the requested tile is being <a href="#computeTile(int,int,java.awt.image.WritableRaster)">computed</a> in another thread,
then this method blocks until the other thread completed its work and returns its result.
If the other thread failed to compute the tile, an <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/ImagingOpException.html" title="class or interface in java.awt.image" class="external-link"><code>Imaging­Op­Exception</code></a> is thrown.</li>
<li>Otherwise this method computes the tile and caches the result before to return it.
If an error occurred, an <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/ImagingOpException.html" title="class or interface in java.awt.image" class="external-link"><code>Imaging­Op­Exception</code></a> is thrown.</li>
</ol>
<h4>Race conditions with write operations</h4>
If this image implements the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image</code></a> interface, then a user may acquire the same
tile for a write operation after this method returned. In such case there is no consistency guarantee
on sample values: the tile returned by this method may show data in an unspecified stage during the
write operation. A synchronization policy <a href="https://issues.apache.org/jira/browse/SIS-487">may
be defined in a future Apache SIS version</a>.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html#getTile(int,int)" title="class or interface in java.awt.image" class="external-link">get­Tile</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">Rendered­Image</a></code></dd>
<dt>Parameters:</dt>
<dd><code>tile­X</code> - the column index of the tile to get.</dd>
<dd><code>tile­Y</code> - the row index of the tile to get.</dd>
<dt>Returns:</dt>
<dd>the tile at the given index (never null).</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</a></code> - if a given tile index is out of bounds.</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/ImagingOpException.html" title="class or interface in java.awt.image" class="external-link">Imaging­Op­Exception</a></code> - if an error occurred while computing the image.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="computeTile(int,int,java.awt.image.WritableRaster)">
<h3>computeTile</h3>
<div class="member-signature"><span class="modifiers">protected abstract</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/Raster.html" title="class or interface in java.awt.image" class="external-link">Raster</a></span>&nbsp;<span class="element-name">computeTile</span><wbr><span class="parameters">(int&nbsp;tileX,
int&nbsp;tileY,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRaster.html" title="class or interface in java.awt.image" class="external-link">WritableRaster</a>&nbsp;previous)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Exception.html" title="class or interface in java.lang" class="external-link">Exception</a></span></div>
<div class="block">Invoked when a tile need to be computed or updated. This method is invoked by <a href="#getTile(int,int)"><code>get­Tile(int, int)</code></a>
when the requested tile is not in the cache, or when a writable source notified us that its data changed.
The returned tile will be automatically cached.
<p>A typical implementation is as below:</p>
<blockquote><pre>@Override
<font color="green">protected</font> Raster <b>computeTile</b>(<font color="green">int</font> tileX, <font color="green">int</font> tileY, WritableRaster tile) {
<font color="green">if</font> (tile == <font color="green">null</font>) {
tile = <b>createTile</b>(tileX, tileY);
}
<i><font color="gray">// Do calculation here and write results in tile.</font></i>
<font color="green">return</font> tile;
}</pre></blockquote>
<h4>Error handling</h4>
If this method throws an exception or returns <code>null</code>, then <a href="#getTile(int,int)"><code>get­Tile(…)</code></a>
will set an error flag on the tile and throw an <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/ImagingOpException.html" title="class or interface in java.awt.image" class="external-link"><code>Imaging­Op­Exception</code></a> with the exception thrown
by <code>compute­Tile(…)</code> as its cause. Future invocations of <code>get­Tile(tile­X, tile­Y)</code> with the
same tile indices will cause an <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/ImagingOpException.html" title="class or interface in java.awt.image" class="external-link"><code>Imaging­Op­Exception</code></a> to be thrown immediately without invocation
of <code>compute(tile­X, tile­Y)</code>. If the error has been fixed, then users can invoke
<a href="#clearErrorFlags(java.awt.Rectangle)"><code>clear­Error­Flags(Rectangle)</code></a> for allowing the tile to be computed again.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>tile­X</code> - the column index of the tile to compute.</dd>
<dd><code>tile­Y</code> - the row index of the tile to compute.</dd>
<dd><code>previous</code> - if the tile already exists but needs to be updated, the tile to update. Otherwise <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>computed tile for the given indices. May be the <code>previous</code> tile after update but cannot be null.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Exception.html" title="class or interface in java.lang" class="external-link">Exception</a></code> - if an error occurred while computing the tile.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createTile(int,int)">
<h3>createTile</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRaster.html" title="class or interface in java.awt.image" class="external-link">WritableRaster</a></span>&nbsp;<span class="element-name">createTile</span><wbr><span class="parameters">(int&nbsp;tileX,
int&nbsp;tileY)</span></div>
<div class="block">Creates an initially empty tile at the given tile grid position.
This is a helper method for <a href="#computeTile(int,int,java.awt.image.WritableRaster)"><code>compute­Tile(int, int, Writable­Raster)</code></a> implementations.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>tile­X</code> - the column index of the tile to create.</dd>
<dd><code>tile­Y</code> - the row index of the tile to create.</dd>
<dt>Returns:</dt>
<dd>initially empty tile for the given indices (cannot be null).</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="prefetch(java.awt.Rectangle)">
<h3>prefetch</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="../util/Disposable.html" title="interface in org.apache.sis.util">Disposable</a></span>&nbsp;<span class="element-name">prefetch</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Rectangle.html" title="class or interface in java.awt" class="external-link">Rectangle</a>&nbsp;tiles)</span></div>
<div class="block">Notifies this image that tiles will be computed soon in the given region.
This method is invoked by <a href="ImageProcessor.html#prefetch(java.awt.image.RenderedImage,java.awt.Rectangle)"><code>Image­Processor​.prefetch(Rendered­Image, Rectangle)</code></a>
before to request (potentially in multi-threads) all tiles in the area of interest.
If the returned <code>Disposable</code> is non-null, <code>Image­Processor</code> guarantees
that the <a href="../util/Disposable.html#dispose()"><code>Disposable​.dispose()</code></a> method will be invoked after the prefetch
operation completed, successfully or not.
<p>The default implementation does nothing. Subclasses can override this method
if they need to allocate and release resources once for a group of tiles.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>tiles</code> - indices of the tiles which will be prefetched.</dd>
<dt>Returns:</dt>
<dd>handler on which to invoke <code>dispose()</code> after the prefetch operation
completed (successfully or not), or <code>null</code> if none.</dd>
<dt>Since:</dt>
<dd>1.2</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="hasTileWriters()">
<h3>hasTileWriters</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">hasTileWriters</span>()</div>
<div class="block">Returns whether any tile is under computation or is checked out for writing.
There is two reasons why this method may return <code>true</code>:
<ul>
<li>At least one <a href="#computeTile(int,int,java.awt.image.WritableRaster)"><code>compute­Tile(…)</code></a>
call is running in another thread.</li>
<li>There is at least one call to <code><a href="#markTileWritable(int,int,boolean)">mark­Tile­Writable</a>(tile­X, tile­Y, true)</code> call without matching call to
<code>mark­Tile­Writable(tile­X, tile­Y, false)</code>. This second case may happen
if this <code>Computed­Image</code> is also a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image</code></a>.</li>
</ul></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>whether any tiles are under computation or checked out for writing.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="#markTileWritable(int,int,boolean)"><code>mark­Tile­Writable(int, int, boolean)</code></a></li>
<li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html#hasTileWriters()" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image​.has­Tile­Writers()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isTileWritable(int,int)">
<h3>isTileWritable</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isTileWritable</span><wbr><span class="parameters">(int&nbsp;tileX,
int&nbsp;tileY)</span></div>
<div class="block">Returns whether the specified tile is currently under computation or checked out for writing.
There is two reasons why this method may return <code>true</code>:
<ul>
<li><code><a href="#computeTile(int,int,java.awt.image.WritableRaster)">compute­Tile</a>(tile­X, tile­Y, …)</code>
is running in another thread.</li>
<li>There is at least one call to <code><a href="#markTileWritable(int,int,boolean)">mark­Tile­Writable</a>(tile­X, tile­Y, true)</code> call without matching call to
<code>mark­Tile­Writable(tile­X, tile­Y, false)</code>. This second case may happen
if this <code>Computed­Image</code> is also a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image</code></a>.</li>
</ul></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>tile­X</code> - the X index of the tile to check.</dd>
<dd><code>tile­Y</code> - the Y index of the tile to check.</dd>
<dt>Returns:</dt>
<dd>whether the specified tile is under computation or checked out for writing.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="#markTileWritable(int,int,boolean)"><code>mark­Tile­Writable(int, int, boolean)</code></a></li>
<li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html#isTileWritable(int,int)" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image​.is­Tile­Writable(int, int)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getWritableTileIndices()">
<h3>getWritableTileIndices</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Point.html" title="class or interface in java.awt" class="external-link">Point</a>[]</span>&nbsp;<span class="element-name">getWritableTileIndices</span>()</div>
<div class="block">Returns the indices of all tiles under computation or checked out for writing, or <code>null</code> if none.
This method lists all tiles for which the condition documented in <a href="#isTileWritable(int,int)"><code>is­Tile­Writable(int, int)</code></a> is
<code>true</code>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>an array containing the indices of tiles that are under computation or checked out for writing,
or <code>null</code> if none.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="#markTileWritable(int,int,boolean)"><code>mark­Tile­Writable(int, int, boolean)</code></a></li>
<li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html#getWritableTileIndices()" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image​.get­Writable­Tile­Indices()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="markTileWritable(int,int,boolean)">
<h3>markTileWritable</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">markTileWritable</span><wbr><span class="parameters">(int&nbsp;tileX,
int&nbsp;tileY,
boolean&nbsp;writing)</span></div>
<div class="block">Sets or clears whether a tile is checked out for writing.
This method is provided for subclasses that implement the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image</code></a> interface.
This method can be used as below:
<blockquote><pre><font color="green">class</font> MyImage <font color="green">extends</font> ComputedImage <font color="green">implements</font> WritableRenderedImage {
<i><font color="gray">// Constructor omitted for brevity.</font></i>
@Override
<font color="green">public</font> WritableRaster <b>getWritableTile</b>(<font color="green">int</font> tileX, <font color="green">int</font> tileY) {
WritableRaster raster = ...; <i><font color="gray">// Get the writable tile here.</font></i>
<b>markTileWritable</b>(tileX, tileY, <font color="green">true</font>);
<font color="green">return</font> raster;
}
@Override
<font color="green">public</font> <font color="green">void</font> <b>releaseWritableTile</b>(<font color="green">int</font> tileX, <font color="green">int</font> tileY) {
<b>markTileWritable</b>(tileX, tileY, <font color="green">false</font>);
<i><font color="gray">// Release the raster here.</font></i>
}
}</pre></blockquote></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>tile­X</code> - the <var>x</var> index of the tile to acquire or release.</dd>
<dd><code>tile­Y</code> - the <var>y</var> index of the tile to acquire or release.</dd>
<dd><code>writing</code> - <code>true</code> for acquiring the tile, or <code>false</code> for releasing it.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the tile goes from having no writers to having one writer
(may happen if <code>writing</code> is <code>true</code>), or goes from having one
writer to no writers (may happen if <code>writing</code> is <code>false</code>).</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html#getWritableTile(int,int)" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image​.get­Writable­Tile(int, int)</code></a></li>
<li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html#releaseWritableTile(int,int)" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image​.release­Writable­Tile(int, int)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="markDirtyTiles(java.awt.Rectangle)">
<h3>markDirtyTiles</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">markDirtyTiles</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Rectangle.html" title="class or interface in java.awt" class="external-link">Rectangle</a>&nbsp;tiles)</span></div>
<div class="block">Marks all tiles in the given range of indices as in need of being recomputed.
The tiles will not be recomputed immediately, but only on next invocation of
<a href="#getTile(int,int)"><code>get­Tile(tile­X, tile­Y)</code></a> if the <code>(tile­X, tile­Y)</code> indices
are <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Rectangle.html#contains(int,int)" title="class or interface in java.awt" class="external-link">contained</a> if the specified rectangle.
<p>Subclasses can invoke this method when the tiles in the given range depend on source data
that changed, typically (but not necessarily) <a href="#getSources()">source images</a>.
Note that there is no need to invoke this method if the source images are instances of
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image</code></a>, because <code>Computed­Image</code> already has <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/TileObserver.html" title="class or interface in java.awt.image" class="external-link"><code>Tile­Observer</code></a>
for them.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>tiles</code> - indices of tiles to mark as dirty.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if at least one tile has been marked dirty.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clearErrorFlags(java.awt.Rectangle)">
<h3>clearErrorFlags</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">clearErrorFlags</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Rectangle.html" title="class or interface in java.awt" class="external-link">Rectangle</a>&nbsp;tiles)</span></div>
<div class="block">Clears the error status of all tiles in the given range of indices.
Those tiles will be marked as dirty and recomputed next time the the
<a href="#getTile(int,int)"><code>get­Tile(int, int)</code></a> method is invoked.
The status of valid tiles is unchanged by this method call.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>tiles</code> - indices of tiles for which to clear the error status.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if at least one tile got its error flag cleared.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="#computeTile(int,int,java.awt.image.WritableRaster)"><code>compute­Tile(int, int, Writable­Raster)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="sourceTileChanged(java.awt.image.RenderedImage,int,int)">
<h3>sourceTileChanged</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">sourceTileChanged</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image" class="external-link">RenderedImage</a>&nbsp;source,
int&nbsp;tileX,
int&nbsp;tileY)</span></div>
<div class="block">Invoked when a tile of a source image has been updated. This method should <a href="#markDirtyTiles(java.awt.Rectangle)">mark as dirty</a> all tiles of this <code>Computed­Image</code> that depend on the updated tile.
<p>The default implementation assumes that source images use pixel coordinate systems aligned with this
<code>Computed­Image</code> in such a way that all pixels at coordinates (<var>x</var>, <var>y</var>) in the
<code>source</code> image are used for calculation of pixels at the same (<var>x</var>, <var>y</var>) coordinates
in this <code>Computed­Image</code>, possibly expanded to neighborhood pixels if the <a href="#SOURCE_PADDING_KEY">"org.apache.sis.SourcePadding"</a>
property is defined. If this assumption does not hold, then subclasses should override this method and invoke
<a href="#markDirtyTiles(java.awt.Rectangle)"><code>mark­Dirty­Tiles(Rectangle)</code></a> themselves.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>source</code> - the image that own the tile which has been updated.</dd>
<dd><code>tile­X</code> - the <var>x</var> index of the tile that has been updated.</dd>
<dd><code>tile­Y</code> - the <var>y</var> index of the tile that has been updated.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="dispose()">
<h3>dispose</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">dispose</span>()</div>
<div class="block">Advises this image that its tiles will no longer be requested. This method removes all
tiles from the cache and stops observation of <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/image/WritableRenderedImage.html" title="class or interface in java.awt.image" class="external-link"><code>Writable­Rendered­Image</code></a> sources.
This image should not be used anymore after this method call.
<p><b>Note:</b> keep in mind that this image may be referenced as a source of other images.
In case of doubt, it may be safer to rely on the garbage collector instead of invoking this method.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../util/Disposable.html#dispose()">dispose</a></code>&nbsp;in interface&nbsp;<code><a href="../util/Disposable.html" title="interface in org.apache.sis.util">Disposable</a></code></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2010&#x2013;2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>