Open a FITS file and retrieve the first plane of the image array as a TImage object.
void FITS_tutorial1()
{
printf("\n\n--------------------------------\n");
printf("WELCOME TO FITS tutorial #1 !!!!\n");
printf("--------------------------------\n");
printf("We're gonna open a FITS file that contains only the\n");
printf("primary HDU, consisting on an image.\n");
printf("The object you will see is a snapshot of the NGC7662 nebula,\n");
printf("which was taken by the author on November 2009 in Barcelona (CATALONIA).\n\n");
}
if (hdu == 0) {
printf("ERROR: could not access the HDU\n"); return;
}
printf("File successfully open!\n");
printf("....................................\n");
printf("....................................\n");
printf("We can read the image as a matrix of values.\n");
printf("This feature is useful to do image processing, e.g:\n");
printf("histogram equalization, custom filtering, ...\n");
delete mat;
printf("....................................\n");
printf("Now the primary array will be read both as an image and as a histogram,\n");
printf("and they will be shown in a canvas.\n");
delete hdu;
}
- Author
- Claudi Martinez
Definition in file FITS_tutorial1.C.