Static methods for subimage creation. More...
#include <SubImageFactory.h>
Public Member Functions | |
SubImageFactory () | |
Static Public Member Functions | |
static SHARED_PTR< SubImage< T > > | createSubImageRW (CountedPtr< ImageRegion > &outRegion, CountedPtr< ImageRegion > &outMask, ImageInterface< T > &inImage, const Record ®ion, const String &mask, LogIO *const &os, const AxesSpecifier &axesSpecifier=AxesSpecifier(), Bool extendMask=False, Bool preserveAxesOrder=False) |
Factory method to create a SubImage from a region and a WCLELMask string. | |
static SHARED_PTR< SubImage< T > > | createSubImageRW (ImageInterface< T > &inImage, const Record ®ion, const String &mask, LogIO *const &os, const AxesSpecifier &axesSpecifier=AxesSpecifier(), Bool extendMask=False, Bool preserveAxesOrder=False) |
variant on previous method where caller doesn't have to worry about creating pointers it does not need returned. | |
static SHARED_PTR< const SubImage< T > > | createSubImageRO (CountedPtr< ImageRegion > &outRegion, CountedPtr< ImageRegion > &outMask, const ImageInterface< T > &inImage, const Record ®ion, const String &mask, LogIO *const &os, const AxesSpecifier &axesSpecifier=AxesSpecifier(), Bool extendMask=False, Bool preserveAxesOrder=False) |
The const ImageInterface versions where the resulting SubImage is not writable. | |
static SHARED_PTR< const SubImage< T > > | createSubImageRO (const ImageInterface< T > &inImage, const Record ®ion, const String &mask, LogIO *const &os, const AxesSpecifier &axesSpecifier=AxesSpecifier(), Bool extendMask=False, Bool preserveAxesOrder=False) |
variant on previous method where caller doesn't have to worry about creating pointers it does not need returned. | |
static SPIIT | createImage (const ImageInterface< T > &image, const String &outfile, const Record ®ion, const String &mask, Bool dropDegenerateAxes, Bool overwrite, Bool list, Bool extendMask, Bool attachMask=False, const Lattice< T > *const data=nullptr) |
return a true copy (ie underlying data is a copy of the original, not a reference) of the subimage selected in the given region. | |
static SPIIT | createImage (const ImageInterface< T > &image, const String &outfile, const Record ®ion, const String &mask, const AxesSpecifier &axesSpec, Bool overwrite, Bool list, Bool extendMask, Bool attachMask=False, const Lattice< T > *const data=nullptr) |
Static Private Member Functions | |
static void | _getMask (CountedPtr< ImageRegion > &outMask, const String &mask, Bool extendMask, const IPosition &imageShape, const CoordinateSystem &csys) |
Static methods for subimage creation.
Public interface
Factory methods for creating subimages
Definition at line 63 of file SubImageFactory.h.
casa::SubImageFactory< T >::SubImageFactory | ( | ) |
static void casa::SubImageFactory< T >::_getMask | ( | CountedPtr< ImageRegion > & | outMask, | |
const String & | mask, | |||
Bool | extendMask, | |||
const IPosition & | imageShape, | |||
const CoordinateSystem & | csys | |||
) | [static, private] |
static SPIIT casa::SubImageFactory< T >::createImage | ( | const ImageInterface< T > & | image, | |
const String & | outfile, | |||
const Record & | region, | |||
const String & | mask, | |||
const AxesSpecifier & | axesSpec, | |||
Bool | overwrite, | |||
Bool | list, | |||
Bool | extendMask, | |||
Bool | attachMask = False , |
|||
const Lattice< T > *const | data = nullptr | |||
) | [static] |
static SPIIT casa::SubImageFactory< T >::createImage | ( | const ImageInterface< T > & | image, | |
const String & | outfile, | |||
const Record & | region, | |||
const String & | mask, | |||
Bool | dropDegenerateAxes, | |||
Bool | overwrite, | |||
Bool | list, | |||
Bool | extendMask, | |||
Bool | attachMask = False , |
|||
const Lattice< T > *const | data = nullptr | |||
) | [static] |
return a true copy (ie underlying data is a copy of the original, not a reference) of the subimage selected in the given region.
A PagedImage is returned if outfile is not blank or a TempImage is returned if it is. If attachMask
is True, attach a pixel mask to the newly created image if it otherwise wouldn't have a pixel mask. All the values in this mask will be True. If specified, data values will be copied from the data
lattice. Note that data values only are copied from this lattice if it is specified; the mask values are still copied from the input image. The data lattice must be the same shape as the output image.
static SHARED_PTR<const SubImage<T> > casa::SubImageFactory< T >::createSubImageRO | ( | const ImageInterface< T > & | inImage, | |
const Record & | region, | |||
const String & | mask, | |||
LogIO *const & | os, | |||
const AxesSpecifier & | axesSpecifier = AxesSpecifier() , |
|||
Bool | extendMask = False , |
|||
Bool | preserveAxesOrder = False | |||
) | [static] |
variant on previous method where caller doesn't have to worry about creating pointers it does not need returned.
static SHARED_PTR<const SubImage<T> > casa::SubImageFactory< T >::createSubImageRO | ( | CountedPtr< ImageRegion > & | outRegion, | |
CountedPtr< ImageRegion > & | outMask, | |||
const ImageInterface< T > & | inImage, | |||
const Record & | region, | |||
const String & | mask, | |||
LogIO *const & | os, | |||
const AxesSpecifier & | axesSpecifier = AxesSpecifier() , |
|||
Bool | extendMask = False , |
|||
Bool | preserveAxesOrder = False | |||
) | [static] |
The const ImageInterface versions where the resulting SubImage is not writable.
static SHARED_PTR<SubImage<T> > casa::SubImageFactory< T >::createSubImageRW | ( | ImageInterface< T > & | inImage, | |
const Record & | region, | |||
const String & | mask, | |||
LogIO *const & | os, | |||
const AxesSpecifier & | axesSpecifier = AxesSpecifier() , |
|||
Bool | extendMask = False , |
|||
Bool | preserveAxesOrder = False | |||
) | [static] |
variant on previous method where caller doesn't have to worry about creating pointers it does not need returned.
static SHARED_PTR<SubImage<T> > casa::SubImageFactory< T >::createSubImageRW | ( | CountedPtr< ImageRegion > & | outRegion, | |
CountedPtr< ImageRegion > & | outMask, | |||
ImageInterface< T > & | inImage, | |||
const Record & | region, | |||
const String & | mask, | |||
LogIO *const & | os, | |||
const AxesSpecifier & | axesSpecifier = AxesSpecifier() , |
|||
Bool | extendMask = False , |
|||
Bool | preserveAxesOrder = False | |||
) | [static] |
Factory method to create a SubImage from a region and a WCLELMask string.
Moved from ImageAnalysis outRegion
Pointer to the corresponding region. Pointer is created internally by new(); it is the caller's responsibility to delete it. outMask
Pointer to corresponding mask. Pointer is created internally via new(); it is the caller's responsibility to delete it. inImage
input image for which a subimage is desired. region
Input region record from which to make the subimage. mask
LEL mask description. os
Pointer to logger to which to log messages. If null, no logging (except exceptions). writableIfPossible
make the subimage writable. If input image is not writable, this will always be False. axesSpecifier
Specifier for output axes. extendMask
If the mask has one or more of degenerate axes whereas the corresponding axes of inImage
are not, extend the mask to match the shape of the input image. preserveAxesOrder
. Only used when dropping degenerate axes and coordinate order and axes order are not the same. In that case, if False, the pixel/world axes order of the returned image will be different from the input, if True it will be the same. If not dropping degenerate axes or if coordinate order and axes order are the same in the input image's coordinate system, the output axex order will always be preserved.