Create reduced resolution data set from image file
rsetfile = rsetwrite(File_Name)
rsetfile = rsetwrite(File_Name, output_filename)
rsetfile = rsetwrite(adapter, output_filename)
rsetfile = rsetwrite(File_Name), where
a TIFF or NITF image file, creates a reduced resolution data set (R-Set)
from the specified file. The R-Set file is written to the current
working directory with a name based on the input file name. For example,
'VeryLargeImage.rset'. If an image file contains
multiple images, only the first one is used.
rsetfile = rsetwrite(File_Name, output_filename) creates
an R-Set from the specified image file, using
the name of the new file. In this case,
the same string.
rsetfile = rsetwrite(adapter, output_filename) creates
an R-Set from the specified Image Adapter object,
Image Adapters are user-defined classes that provide
common API for reading a particular image file format. See the documentation
ImageAdapter for more
Visualize a very large image by using an R-Set. Replace
the example below with the name of your file:
big_file = 'MyReallyBigImage.tif'; rset_file = rsetwrite(big_file); imtool(rset_file)
Create R-Set files for every TIFF in a directory containing very large images. Put the R-Set files into a temporary directory:
d = dir('*.tif*'); image_dir = pwd; cd(tempdir) for p = 1:numel(d) big_file = fullfile(image_dir, d(p).name); rsetwrite(big_file); end
rsetwrite creates an R-Set file by dividing
an image into spatial tiles and resampling the image at different
resolution levels. When you open the R-Set file in the Image Tool
and zoom in, you view tiles at a higher resolution. When you zoom
out, you view tiles at a lower resolution. In this way, clarity of
the image and memory usage are balanced for optimal performance. The
R-Set file contains a compressed copy of the full-resolution data.
Because R-Set creation can be time consuming, a progress bar
shows the status of the operation. If you cancel the operation, processing
stops, no file is written, and the
will be empty.
rsetwrite supports NITF image files that
are uncompressed and Version 2.0 or higher. It does not support NITF
files with more than three bands or with floating point data. Images
with more than one data band are OK if they contain unsigned integer
While it is possible to create an R-Set from an image where the dimensions are smaller than the size of a single R-Set tile, the resulting R-set file will likely be larger and take longer to load than the original file. The current size of an R-Set tile is 512 x 512 pixels.