This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Data type of image


datatype = getImgType(fptr)


datatype = getImgType(fptr) gets the data type of an image. datatype can be one of the following:


This function corresponds to the fits_get_img_type (ffgidt) function in the CFITSIO library C API.


fptr = fits.openFile('tst0012.fits');
hdus = [1 3 4];
for j = hdus;
    htype = fits.movAbsHDU(fptr,j);
    dtype = fits.getImgType(fptr);
    fprintf('HDU %d:  "%s", "%s"\n', j, htype, dtype);

See Also