Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

matlab.io.fits.setCompressionType

Set image compression type

Syntax

setCompressionType(fptr,comptype)

Description

setCompressionType(fptr,comptype) specifies the image compression algorithm that should be used when writing a FITS image.

Supported values for comptype include:

'GZIP'
'GZIP2'
'RICE'
'PLIO'
'HCOMPRESS'
'NOCOMPRESS'

This function corresponds to the fits_set_compression_type function in the CFITSIO library C API.

Examples

import matlab.io.*
fptr = fits.createFile('myfile.fits');
fits.setCompressionType(fptr,'GZIP2');
fits.createImg(fptr,'long_img',[256 512]);
data = reshape(1:256*512,[256 512]);
data = int32(data);
fits.writeImg(fptr,data);
fits.closeFile(fptr);
fitsdisp('myfile.fits','mode','full');

See Also

|

Was this topic helpful?