#include <SDMaskHandler.h>
Public Member Functions | |
SDMaskHandler () | |
Empty constructor. | |
~SDMaskHandler () | |
void | resetMask (SHARED_PTR< SIImageStore > imstore) |
void | fillMask (SHARED_PTR< SIImageStore > imstore, Vector< String > maskStrings) |
void | fillMask (SHARED_PTR< SIImageStore > imstore, String maskString) |
SHARED_PTR< ImageInterface < Float > > | makeMask (const String &maskName, const Quantity threshold, ImageInterface< Float > &tempim) |
Collection of methods translate mask description (text, record, threshold, etc) to mask image where the region(s) of interest are represented by the value (default = 1.0) and the rest of the image is set to 0.0. | |
void | copyAllMasks (const Vector< SHARED_PTR< ImageInterface< Float > > > inImageMasks, ImageInterface< Float > &outImageMask) |
merge mask images to outimage | |
void | copyMask (const ImageInterface< Float > &inimage, ImageInterface< Float > &outimage) |
copy and regrid a mask image to outimage | |
void | expandMask (const ImageInterface< Float > &inImageMask, ImageInterface< Float > &outImageMask) |
expand smaller chan mask image to larger one. | |
void | InMaskToImageRegion (const ImageInterface< Float > &inimage) |
convert internal mask to imageRegion | |
int | makeInteractiveMask (SHARED_PTR< SIImageStore > &imstore, Int &niter, Int &cycleniter, String &threshold, String &cyclethreshold) |
void | makeAutoMask (SHARED_PTR< SIImageStore > imstore) |
Return a reference to an imageinterface for the mask. | |
void | autoMask (SHARED_PTR< SIImageStore > imstore, const String &alg="", const String &threshold="", const Float &fracpeak=0.0, const String &resolution="", const Float &resbybeam=0.0, const Int nmask=0, const Bool autoadjust=False, Float pblimit=0.0) |
Top level autoMask interface. | |
void | autoMaskByThreshold (ImageInterface< Float > &mask, const ImageInterface< Float > &res, const ImageInterface< Float > &psf, const Quantity &resolution, const Float &resbybeam, const Quantity &qthreshold, const Float &fracofpeak, const Record &theStats, const Float &sigma=3.0, const Int nmask=0, const Bool autoadjust=False) |
automask algorithms. | |
void | autoMaskByThreshold2 (ImageInterface< Float > &mask, const ImageInterface< Float > &res, const ImageInterface< Float > &psf, const Quantity &resolution, const Float &resbybeam, const Quantity &qthreshold, const Float &fracofpeak, const Record &theStats, const Float &sigma=3.0, const Int nmask=0) |
no binning version | |
SHARED_PTR< ImageInterface < Float > > | makeMaskFromBinnedImage (const ImageInterface< Float > &image, const Int nx, const Int ny, const Float &fracofpeak, const Float &sigma, const Int nmask, const Bool autoadjust, Double thresh=0.0) |
SHARED_PTR< ImageInterface < Float > > | convolveMask (const ImageInterface< Float > &inmask, Int nxpix, Int nypix) |
SHARED_PTR< ImageInterface < Float > > | pruneRegions (const ImageInterface< Float > &image, Double &thresh, Int nmask=0, Int npix=0) |
void | makePBMask (SHARED_PTR< SIImageStore > imstore, Float pblimit=0.1) |
void | autoMaskWithinPB (SHARED_PTR< SIImageStore > imstore, const String &alg="", const String &threshold="", const Float &fracpeak=0.0, const String &resolution="", const Float &resbybeam=0.0, const Int nmask=0, const Bool autoadjust=False, Float pblimit=0.1) |
Bool | checkMaskImage (ImageInterface< Float > &maskiamge, Bool normalize=True) |
check if input image is a mask image with 0 or a value (if normalize=true, 1) | |
Static Public Member Functions | |
static Bool | regionToImageMask (ImageInterface< Float > &maskImage, Record *regionRec, Matrix< Quantity > &blctrcs, Matrix< Float > &circles, const Float &value=1.0) |
Make a mask image from Record, Matrix of (nboxes,4) where each row contains [blc_x,blc_y, trc_x,trc_y], and Matrix of (ncircles, 3) with the specified 'value'. | |
static void | boxRegionToImageRegion (const ImageInterface< Float > &maskImage, const Matrix< Quantity > &blctrcs, ImageRegion *&boxImageRegions) |
Convert boxes defined with blcs and trcs to ImageRegion. | |
static void | circleRegionToImageRegion (const ImageInterface< Float > &maskImage, const Matrix< Float > &circles, ImageRegion *&circleImageRegions) |
Convert circles (in pixels) to ImageRegion. | |
static void | recordRegionToImageRegion (Record *imageRegRec, ImageRegion *&imageRegion) |
Convert region defined by record to Imageregion. | |
static Bool | regionToMask (ImageInterface< Float > &maskImage, ImageRegion &imageregion, const Float &value) |
Convert ImageRegion to a mask image with the value. | |
static void | regionTextToImageRegion (const String &text, const ImageInterface< Float > ®ionImage, ImageRegion *&imageRegion) |
Read CRTF format text or the text file contains CRTF definitions and convert it to a ImageRegion. | |
static Bool | cloneImShape (const ImageInterface< Float > &inImage, const String &outImageName) |
Protected Attributes | |
InteractiveMasking * | interactiveMasker_p |
Private Attributes | |
Double | itsRms |
Double | itsMax |
Float | itsSidelobeLevel |
Definition at line 46 of file SDMaskHandler.h.
casa::SDMaskHandler::SDMaskHandler | ( | ) |
Empty constructor.
casa::SDMaskHandler::~SDMaskHandler | ( | ) |
void casa::SDMaskHandler::autoMask | ( | SHARED_PTR< SIImageStore > | imstore, | |
const String & | alg = "" , |
|||
const String & | threshold = "" , |
|||
const Float & | fracpeak = 0.0 , |
|||
const String & | resolution = "" , |
|||
const Float & | resbybeam = 0.0 , |
|||
const Int | nmask = 0 , |
|||
const Bool | autoadjust = False , |
|||
Float | pblimit = 0.0 | |||
) |
Top level autoMask interface.
.\.
void casa::SDMaskHandler::autoMaskByThreshold | ( | ImageInterface< Float > & | mask, | |
const ImageInterface< Float > & | res, | |||
const ImageInterface< Float > & | psf, | |||
const Quantity & | resolution, | |||
const Float & | resbybeam, | |||
const Quantity & | qthreshold, | |||
const Float & | fracofpeak, | |||
const Record & | theStats, | |||
const Float & | sigma = 3.0 , |
|||
const Int | nmask = 0 , |
|||
const Bool | autoadjust = False | |||
) |
automask algorithms.
.\.
void casa::SDMaskHandler::autoMaskByThreshold2 | ( | ImageInterface< Float > & | mask, | |
const ImageInterface< Float > & | res, | |||
const ImageInterface< Float > & | psf, | |||
const Quantity & | resolution, | |||
const Float & | resbybeam, | |||
const Quantity & | qthreshold, | |||
const Float & | fracofpeak, | |||
const Record & | theStats, | |||
const Float & | sigma = 3.0 , |
|||
const Int | nmask = 0 | |||
) |
no binning version
void casa::SDMaskHandler::autoMaskWithinPB | ( | SHARED_PTR< SIImageStore > | imstore, | |
const String & | alg = "" , |
|||
const String & | threshold = "" , |
|||
const Float & | fracpeak = 0.0 , |
|||
const String & | resolution = "" , |
|||
const Float & | resbybeam = 0.0 , |
|||
const Int | nmask = 0 , |
|||
const Bool | autoadjust = False , |
|||
Float | pblimit = 0.1 | |||
) |
static void casa::SDMaskHandler::boxRegionToImageRegion | ( | const ImageInterface< Float > & | maskImage, | |
const Matrix< Quantity > & | blctrcs, | |||
ImageRegion *& | boxImageRegions | |||
) | [static] |
Convert boxes defined with blcs and trcs to ImageRegion.
Bool casa::SDMaskHandler::checkMaskImage | ( | ImageInterface< Float > & | maskiamge, | |
Bool | normalize = True | |||
) |
check if input image is a mask image with 0 or a value (if normalize=true, 1)
static void casa::SDMaskHandler::circleRegionToImageRegion | ( | const ImageInterface< Float > & | maskImage, | |
const Matrix< Float > & | circles, | |||
ImageRegion *& | circleImageRegions | |||
) | [static] |
Convert circles (in pixels) to ImageRegion.
static Bool casa::SDMaskHandler::cloneImShape | ( | const ImageInterface< Float > & | inImage, | |
const String & | outImageName | |||
) | [static] |
SHARED_PTR<ImageInterface<Float> > casa::SDMaskHandler::convolveMask | ( | const ImageInterface< Float > & | inmask, | |
Int | nxpix, | |||
Int | nypix | |||
) |
void casa::SDMaskHandler::copyAllMasks | ( | const Vector< SHARED_PTR< ImageInterface< Float > > > | inImageMasks, | |
ImageInterface< Float > & | outImageMask | |||
) |
merge mask images to outimage
void casa::SDMaskHandler::copyMask | ( | const ImageInterface< Float > & | inimage, | |
ImageInterface< Float > & | outimage | |||
) |
copy and regrid a mask image to outimage
void casa::SDMaskHandler::expandMask | ( | const ImageInterface< Float > & | inImageMask, | |
ImageInterface< Float > & | outImageMask | |||
) |
expand smaller chan mask image to larger one.
void casa::SDMaskHandler::fillMask | ( | SHARED_PTR< SIImageStore > | imstore, | |
String | maskString | |||
) |
void casa::SDMaskHandler::fillMask | ( | SHARED_PTR< SIImageStore > | imstore, | |
Vector< String > | maskStrings | |||
) |
void casa::SDMaskHandler::InMaskToImageRegion | ( | const ImageInterface< Float > & | inimage | ) |
convert internal mask to imageRegion
void casa::SDMaskHandler::makeAutoMask | ( | SHARED_PTR< SIImageStore > | imstore | ) |
Return a reference to an imageinterface for the mask.
int casa::SDMaskHandler::makeInteractiveMask | ( | SHARED_PTR< SIImageStore > & | imstore, | |
Int & | niter, | |||
Int & | cycleniter, | |||
String & | threshold, | |||
String & | cyclethreshold | |||
) |
SHARED_PTR<ImageInterface<Float> > casa::SDMaskHandler::makeMask | ( | const String & | maskName, | |
const Quantity | threshold, | |||
ImageInterface< Float > & | tempim | |||
) |
Collection of methods translate mask description (text, record, threshold, etc) to mask image where the region(s) of interest are represented by the value (default = 1.0) and the rest of the image is set to 0.0.
void makeMask(); Create a mask image with maskName from tempim with a threshold applied to the pixel intensity
SHARED_PTR<ImageInterface<Float> > casa::SDMaskHandler::makeMaskFromBinnedImage | ( | const ImageInterface< Float > & | image, | |
const Int | nx, | |||
const Int | ny, | |||
const Float & | fracofpeak, | |||
const Float & | sigma, | |||
const Int | nmask, | |||
const Bool | autoadjust, | |||
Double | thresh = 0.0 | |||
) |
void casa::SDMaskHandler::makePBMask | ( | SHARED_PTR< SIImageStore > | imstore, | |
Float | pblimit = 0.1 | |||
) |
SHARED_PTR<ImageInterface<Float> > casa::SDMaskHandler::pruneRegions | ( | const ImageInterface< Float > & | image, | |
Double & | thresh, | |||
Int | nmask = 0 , |
|||
Int | npix = 0 | |||
) |
static void casa::SDMaskHandler::recordRegionToImageRegion | ( | Record * | imageRegRec, | |
ImageRegion *& | imageRegion | |||
) | [static] |
Convert region defined by record to Imageregion.
static void casa::SDMaskHandler::regionTextToImageRegion | ( | const String & | text, | |
const ImageInterface< Float > & | regionImage, | |||
ImageRegion *& | imageRegion | |||
) | [static] |
Read CRTF format text or the text file contains CRTF definitions and convert it to a ImageRegion.
static Bool casa::SDMaskHandler::regionToImageMask | ( | ImageInterface< Float > & | maskImage, | |
Record * | regionRec, | |||
Matrix< Quantity > & | blctrcs, | |||
Matrix< Float > & | circles, | |||
const Float & | value = 1.0 | |||
) | [static] |
Make a mask image from Record, Matrix of (nboxes,4) where each row contains [blc_x,blc_y, trc_x,trc_y], and Matrix of (ncircles, 3) with the specified 'value'.
Each row of circles are radius, x_center, y_center in pixels. blctrcs and circles are applied to all the spectral and stokes while regions specified in record can specify selections in spectral and stokes axes. static Bool regionToImageMask(const String& maskimage, Record* regionRec, Matrix<Quantity> & blctrcs,
static Bool casa::SDMaskHandler::regionToMask | ( | ImageInterface< Float > & | maskImage, | |
ImageRegion & | imageregion, | |||
const Float & | value | |||
) | [static] |
Convert ImageRegion to a mask image with the value.
void casa::SDMaskHandler::resetMask | ( | SHARED_PTR< SIImageStore > | imstore | ) |
Definition at line 172 of file SDMaskHandler.h.
Double casa::SDMaskHandler::itsMax [private] |
Definition at line 176 of file SDMaskHandler.h.
Double casa::SDMaskHandler::itsRms [private] |
Definition at line 175 of file SDMaskHandler.h.
Float casa::SDMaskHandler::itsSidelobeLevel [private] |
Definition at line 177 of file SDMaskHandler.h.