Create R-Set file from image file
creates an R-Set file named
rsetfile = rsetwrite(
rsetfilename from an
ImageAdapter object is a user-defined object that provides
rsetwrite function with a common API to read a particular image file
format. For more details on
ImageAdapter objects, see the
Load a TIFF image file into the workspace.
filename = 'mandi.tif';
Create an R-Set file from the image file. The function creates the R-Set in the current working folder.
rsetfile = rsetwrite(filename);
Display the R-Set file by using the
Zoom in on the R-Set by 65% to view the spatial tiles.
Load a file containing an
ImageAdapter object into the workspace.
Specify a name for the R-Set file to be created.
rsetfilename = 'MandiRSet';
Create an R-Set file from the
ImageAdapter object. The function creates the R-Set in the current working folder.
rsetfile = rsetwrite(adapter,rsetfilename)
rsetfile = 'MandiRSet'
Display the R-Set file using the
Zoom in on the R-Set by 53% to view the spatial tiles.
filename— Name of TIFF or NITF image file
Name of a TIFF or NITF image file, specified as a character vector or string scalar.
rsetfile— Name of R-Set file
Name of the R-Set file, returned as a string scalar. This value specifies the name of the file to which the R-Set is stored.
rsetwrite creates an R-Set by dividing an image into spatial tiles and
resampling the image at different resolution levels. The R-Set file contains a compressed copy
of the full-resolution image data. You can use the
imtool function to open the R-Set file and zoom in to view the tiles at a higher
resolution. When you zoom out, the function displays tiles at a lower resolution. In this way,
an R-Set file balances clarity of the image and memory usage for optimal performance.
When creating an R-Set, a progress bar shows the status of the completion. If you
cancel the creation process before it is complete, the function does not create an R-Set
and returns an empty
rsetwrite supports NITF image files that are uncompressed and
Version 2.0 or higher. This function does not support NITF files with more than three
data bands or with floating-point data. Images with more than one data band are accepted
if they contain unsigned integer data.
You can create an R-Set from an image whose dimensions are smaller than the size of a single R-Set tile. But, the resulting R-Set file might be larger and take longer to load than the original file. The current size of a tile in an R-Set is 512-by-512 pixels.