ExtendImage.h

Classes

ExtendImage -- An extension of an ImageInterface object. (full description)

template <class T> class ExtendImage: public ImageInterface<T>

Interface

Public Members
ExtendImage()
ExtendImage (const ImageInterface<T>& image, const T& newShape, const IPosition& newCsys)
ExtendImage (const ExtendImage<T>& other)
virtual ~ExtendImage()
ExtendImage<T>& operator= (const ExtendImage<T>& other)
virtual ImageInterface<T>* cloneII() const
virtual String imageType() const
virtual Bool isMasked() const
virtual Bool hasPixelMask() const
virtual const Lattice<Bool>& pixelMask() const
virtual Lattice<Bool>& pixelMask()
virtual const LatticeRegion* getRegionPtr() const
virtual Bool isPersistent() const
virtual Bool isPaged() const
virtual Bool isWritable() const
virtual IPosition shape() const
virtual uInt advisedMaxPixels() const
virtual void resize(const TiledShape& newShape)
virtual String name (Bool stripPath=False) const
virtual Bool ok() const
virtual Bool doGetSlice (Array<T>& buffer, const Slicer& section)
virtual void doPutSlice (const Array<T>& sourceBuffer, const IPosition& where, const IPosition& stride)
virtual Bool doGetMaskSlice (Array<Bool>& buffer, const Slicer& section)
virtual LatticeIterInterface<T>* makeIter (const T& navigator, Bool useRef) const
virtual IPosition doNiceCursorShape (uInt maxPixels) const
virtual Bool lock (FileLocker::LockType, uInt nattempts)
virtual void unlock()
virtual Bool hasLock (FileLocker::LockType) const
virtual void resync()
virtual void flush()
virtual void tempClose()
virtual void reopen()

Description

Review Status

Programs:
Tests:

Prerequisite

Synopsis

Class ExtendImage can be used to (virtually) extend an image along axes with length 1 and/or to add new axes. In this way such an image can be made conformant with another image. E.g. it can be used to extend the continuum channel to subtract it from each channel in an image cube.

Example


 

Motivation

Used by LEL to handle images with different dimensionalities.

Member Description

ExtendImage()

The default constructor

ExtendImage (const ImageInterface<T>& image, const T& newShape, const IPosition& newCsys)

Create a ExtendImage from a Image. The coordinate system of the given image should be a subset of the new coordinate system. The same is true for the shape.

ExtendImage (const ExtendImage<T>& other)

Copy constructor (reference semantics).

virtual ~ExtendImage()

ExtendImage<T>& operator= (const ExtendImage<T>& other)

Assignment (reference semantics).

virtual ImageInterface<T>* cloneII() const

Make a copy of the object (reference semantics).

virtual String imageType() const

Get the image type (returns name of derived class).

virtual Bool isMasked() const

Is the ExtendImage masked? It is if its parent image is masked.

virtual Bool hasPixelMask() const

Does the image object have a pixelmask? It does if its parent has a pixelmask.

virtual const Lattice<Bool>& pixelMask() const
virtual Lattice<Bool>& pixelMask()

Get access to the pixelmask in use (thus to the pixelmask of the parent). An exception is thrown if the parent does not have a pixelmask.

virtual const LatticeRegion* getRegionPtr() const

Get the region used (always returns 0).

virtual Bool isPersistent() const

A ExtendImage is not persistent.

virtual Bool isPaged() const

Is the ExtendImage paged to disk?

virtual Bool isWritable() const

An ExtendImage is not writable

virtual IPosition shape() const

Returns the shape of the ExtendImage

virtual uInt advisedMaxPixels() const

This function returns the recommended maximum number of pixels to include in the cursor of an iterator.

virtual void resize(const TiledShape& newShape)

Function which changes the shape of the ExtendImage. Throws an exception as resizing an ExtendImage is not possible.

virtual String name (Bool stripPath=False) const

Return the name of the parent ImageInterface object.

virtual Bool ok() const

Check class invariants.

virtual Bool doGetSlice (Array<T>& buffer, const Slicer& section)

Do the actual getting of an array of values.

virtual void doPutSlice (const Array<T>& sourceBuffer, const IPosition& where, const IPosition& stride)

Putting data is not possible.

virtual Bool doGetMaskSlice (Array<Bool>& buffer, const Slicer& section)

Get a section of the mask.

virtual LatticeIterInterface<T>* makeIter (const T& navigator, Bool useRef) const

This function is used by the LatticeIterator class to generate an iterator of the correct type for this Lattice. Not recommended for general use.

virtual IPosition doNiceCursorShape (uInt maxPixels) const

Get the best cursor shape.

virtual Bool lock (FileLocker::LockType, uInt nattempts)
virtual void unlock()
virtual Bool hasLock (FileLocker::LockType) const
virtual void resync()
virtual void flush()
virtual void tempClose()
virtual void reopen()

Handle the (un)locking and syncing, etc..