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.setHCompSmooth

Set smoothing for images compressed with HCOMPRESS

Syntax

setHCompSmooth(fptr,smooth)

Description

setHCompSmooth(fptr,smooth) sets the smoothing to be used when compressing an image with the HCOMPRESS algorithm. Setting either the scale or smoothing parameter causes the algorithm to operate in lossy mode.

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

Examples

import matlab.io.*
data = int32(50*ones(256,512,'double') + 10 * rand([256 512]));
fptr = fits.createFile('myfile.fits');
fits.setCompressionType(fptr,'HCOMPRESS');
fits.setHCompSmooth(fptr,1);
fits.createImg(fptr,'long_img',[256 512]);
fits.writeImg(fptr,data);
fits.closeFile(fptr);
fitsdisp('myfile.fits','mode','full');
Was this topic helpful?