casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
casa::SubImageFactory< T > Class Template Reference

Static methods for subimage creation. More...

#include <SubImageFactory.h>

Public Member Functions

 SubImageFactory ()=delete
 

Static Public Member Functions

static std::shared_ptr
< casacore::SubImage< T > > 
createSubImageRW (casacore::CountedPtr< casacore::ImageRegion > &outRegion, casacore::CountedPtr< casacore::ImageRegion > &outMask, casacore::ImageInterface< T > &inImage, const casacore::Record &region, const casacore::String &mask, casacore::LogIO *const &os, const casacore::AxesSpecifier &axesSpecifier=casacore::AxesSpecifier(), casacore::Bool extendMask=false, casacore::Bool preserveAxesOrder=false)
 Factory method to create a casacore::SubImage from a region and a casacore::WCLELMask string. More...
 
static std::shared_ptr
< casacore::SubImage< T > > 
createSubImageRW (casacore::ImageInterface< T > &inImage, const casacore::Record &region, const casacore::String &mask, casacore::LogIO *const &os, const casacore::AxesSpecifier &axesSpecifier=casacore::AxesSpecifier(), casacore::Bool extendMask=false, casacore::Bool preserveAxesOrder=false)
 variant on previous method where caller doesn't have to worry about creating pointers it does not need returned. More...
 
static std::shared_ptr< const
casacore::SubImage< T > > 
createSubImageRO (casacore::CountedPtr< casacore::ImageRegion > &outRegion, casacore::CountedPtr< casacore::ImageRegion > &outMask, const casacore::ImageInterface< T > &inImage, const casacore::Record &region, const casacore::String &mask, casacore::LogIO *const &os, const casacore::AxesSpecifier &axesSpecifier=casacore::AxesSpecifier(), casacore::Bool extendMask=false, casacore::Bool preserveAxesOrder=false)
 The const casacore::ImageInterface versions where the resulting casacore::SubImage is not writable. More...
 
static std::shared_ptr< const
casacore::SubImage< T > > 
createSubImageRO (const casacore::ImageInterface< T > &inImage, const casacore::Record &region, const casacore::String &mask, casacore::LogIO *const &os, const casacore::AxesSpecifier &axesSpecifier=casacore::AxesSpecifier(), casacore::Bool extendMask=false, casacore::Bool preserveAxesOrder=false)
 variant on previous method where caller doesn't have to worry about creating pointers it does not need returned. More...
 
static SPIIT createImage (const casacore::ImageInterface< T > &image, const casacore::String &outfile, const casacore::Record &region, const casacore::String &mask, casacore::Bool dropDegenerateAxes, casacore::Bool overwrite, casacore::Bool list, casacore::Bool extendMask, casacore::Bool attachMask=false, const casacore::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. More...
 
static SPIIT createImage (const casacore::ImageInterface< T > &image, const casacore::String &outfile, const casacore::Record &region, const casacore::String &mask, const casacore::AxesSpecifier &axesSpec, casacore::Bool overwrite, casacore::Bool list, casacore::Bool extendMask, casacore::Bool attachMask=false, const casacore::Lattice< T > *const data=nullptr)
 

Static Private Member Functions

static void _getMask (casacore::CountedPtr< casacore::ImageRegion > &outMask, const casacore::String &mask, casacore::Bool extendMask, const casacore::IPosition &imageShape, const casacore::CoordinateSystem &csys)
 

Detailed Description

template<class T>
class casa::SubImageFactory< T >

Static methods for subimage creation.

Intended use:

Public interface

Review Status

Test programs:
tSubImageFactory

Prerequisite

Synopsis

Factory methods for creating subimages

Motivation

Definition at line 63 of file SubImageFactory.h.

Constructor & Destructor Documentation

template<class T >
casa::SubImageFactory< T >::SubImageFactory ( )
delete

Member Function Documentation

template<class T >
static void casa::SubImageFactory< T >::_getMask ( casacore::CountedPtr< casacore::ImageRegion > &  outMask,
const casacore::String mask,
casacore::Bool  extendMask,
const casacore::IPosition imageShape,
const casacore::CoordinateSystem csys 
)
staticprivate
template<class T >
static SPIIT casa::SubImageFactory< T >::createImage ( const casacore::ImageInterface< T > &  image,
const casacore::String outfile,
const casacore::Record region,
const casacore::String mask,
casacore::Bool  dropDegenerateAxes,
casacore::Bool  overwrite,
casacore::Bool  list,
casacore::Bool  extendMask,
casacore::Bool  attachMask = false,
const casacore::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 casacore::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.

template<class T >
static SPIIT casa::SubImageFactory< T >::createImage ( const casacore::ImageInterface< T > &  image,
const casacore::String outfile,
const casacore::Record region,
const casacore::String mask,
const casacore::AxesSpecifier axesSpec,
casacore::Bool  overwrite,
casacore::Bool  list,
casacore::Bool  extendMask,
casacore::Bool  attachMask = false,
const casacore::Lattice< T > *const  data = nullptr 
)
static
template<class T >
static std::shared_ptr<const casacore::SubImage<T> > casa::SubImageFactory< T >::createSubImageRO ( casacore::CountedPtr< casacore::ImageRegion > &  outRegion,
casacore::CountedPtr< casacore::ImageRegion > &  outMask,
const casacore::ImageInterface< T > &  inImage,
const casacore::Record region,
const casacore::String mask,
casacore::LogIO *const &  os,
const casacore::AxesSpecifier axesSpecifier = casacore::AxesSpecifier(),
casacore::Bool  extendMask = false,
casacore::Bool  preserveAxesOrder = false 
)
static

The const casacore::ImageInterface versions where the resulting casacore::SubImage is not writable.

template<class T >
static std::shared_ptr<const casacore::SubImage<T> > casa::SubImageFactory< T >::createSubImageRO ( const casacore::ImageInterface< T > &  inImage,
const casacore::Record region,
const casacore::String mask,
casacore::LogIO *const &  os,
const casacore::AxesSpecifier axesSpecifier = casacore::AxesSpecifier(),
casacore::Bool  extendMask = false,
casacore::Bool  preserveAxesOrder = false 
)
static

variant on previous method where caller doesn't have to worry about creating pointers it does not need returned.

template<class T >
static std::shared_ptr<casacore::SubImage<T> > casa::SubImageFactory< T >::createSubImageRW ( casacore::CountedPtr< casacore::ImageRegion > &  outRegion,
casacore::CountedPtr< casacore::ImageRegion > &  outMask,
casacore::ImageInterface< T > &  inImage,
const casacore::Record region,
const casacore::String mask,
casacore::LogIO *const &  os,
const casacore::AxesSpecifier axesSpecifier = casacore::AxesSpecifier(),
casacore::Bool  extendMask = false,
casacore::Bool  preserveAxesOrder = false 
)
static

Factory method to create a casacore::SubImage from a region and a casacore::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 casacore::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.

template<class T >
static std::shared_ptr<casacore::SubImage<T> > casa::SubImageFactory< T >::createSubImageRW ( casacore::ImageInterface< T > &  inImage,
const casacore::Record region,
const casacore::String mask,
casacore::LogIO *const &  os,
const casacore::AxesSpecifier axesSpecifier = casacore::AxesSpecifier(),
casacore::Bool  extendMask = false,
casacore::Bool  preserveAxesOrder = false 
)
static

variant on previous method where caller doesn't have to worry about creating pointers it does not need returned.


The documentation for this class was generated from the following file: