casacore::RebinImage< T > Class Template Reference

Rebin an image. More...

#include <RebinImage.h>

Inheritance diagram for casacore::RebinImage< T >:
casacore::ImageInterface< T > casacore::MaskedLattice< T > casacore::Lattice< T > casacore::LatticeBase

List of all members.

Public Member Functions

 RebinImage ()
 Default constructor (object useless).
 RebinImage (const ImageInterface< T > &, const IPosition &factors)
 Constructor.
 RebinImage (const RebinImage< T > &other)
 Copy constructor (reference semantics).
virtual ~RebinImage ()
RebinImage< T > & operator= (const RebinImage< 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 RebinImage 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
 Get access to the pixelmask in use (thus to the pixelmask of the parent).
virtual Lattice< Bool > & pixelMask ()
virtual const LatticeRegiongetRegionPtr () const
 Get the region used (always returns 0).
virtual Bool isPersistent () const
 A RebinImage is not persistent.
virtual Bool isPaged () const
 Is the RebinImage paged to disk?
virtual Bool isWritable () const
 An RebinImage is not writable.
virtual IPosition shape () const
 Returns the shape of the RebinImage.
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 RebinImage.
virtual String name (Bool stripPath=False) const
 Return the name of the parent ImageInterface object.
virtual Bool ok () const
 Check class invariants.
virtual ImageAttrHandlerattrHandler (Bool createHandler=False)
 Get access to the attribute handler (of the parent image).
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 as the lattice is not writable.
virtual Bool doGetMaskSlice (Array< Bool > &buffer, const Slicer &section)
 Get a section of the mask.
virtual LatticeIterInterface< T > * makeIter (const LatticeNavigator &navigator, Bool useRef) const
 This function is used by the LatticeIterator class to generate an iterator of the correct type for this Lattice.
virtual IPosition doNiceCursorShape (uInt maxPixels) const
 Get the best cursor shape.
virtual Bool lock (FileLocker::LockType, uInt nattempts)
 Handle the (un)locking and syncing, etc.
virtual void unlock ()
virtual Bool hasLock (FileLocker::LockType) const
virtual void resync ()
 Resynchronize the Lattice object with the lattice file.
virtual void flush ()
 Flush the data (but do not unlock).
virtual void tempClose ()
 Temporarily close the lattice.
virtual void reopen ()
 Explicitly reopen the temporarily closed lattice.

Private Attributes

ImageInterface< T > * itsImagePtr
RebinLattice< T > * itsRebinPtr

Detailed Description

template<class T>
class casacore::RebinImage< T >

Rebin an image.

Intended use:

Public interface

Review Status

Test programs:
tRebinImage

Prerequisite

Synopsis

Class RebinImage can be used to rebin (data averaged over bin) an image by integer amounts per axis.

Example

 IPosition factors(2,2,2);
 PagedImage<Float> imageIn(String("myImage")):
 RebinLattice<Float> rb(imageIn, factors);
 IPosition shapeOut = rb.shape();
 TiledShape tShapeOut(shapeOut);
 TempImage<Float> imageOut(tShapeOut, rb.coordinates());
 LatticeUtilities::copyDataAndMask(os, imageOut, rb);
 ImageUtilities::copyMiscellaneous (imageOut, imageIn);

Motivation

Users like to rebin images..\.

Definition at line 82 of file RebinImage.h.


Constructor & Destructor Documentation

template<class T>
casacore::RebinImage< T >::RebinImage (  ) 

Default constructor (object useless).

template<class T>
casacore::RebinImage< T >::RebinImage ( const ImageInterface< T > &  ,
const IPosition factors 
)

Constructor.

The bin factors don't have to be integral. Anything left over at the end is treated as a full bin.

template<class T>
casacore::RebinImage< T >::RebinImage ( const RebinImage< T > &  other  ) 

Copy constructor (reference semantics).

template<class T>
virtual casacore::RebinImage< T >::~RebinImage (  )  [virtual]

Member Function Documentation

template<class T>
virtual uInt casacore::RebinImage< T >::advisedMaxPixels (  )  const [virtual]

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

Reimplemented from casacore::Lattice< T >.

template<class T>
virtual ImageAttrHandler& casacore::RebinImage< T >::attrHandler ( Bool  createHandler = False  )  [virtual]

Get access to the attribute handler (of the parent image).

If a handler keyword does not exist yet, it is created if createHandler is set. Otherwise the handler is empty and no groups can be created for it.

Reimplemented from casacore::ImageInterface< T >.

template<class T>
virtual ImageInterface<T>* casacore::RebinImage< T >::cloneII (  )  const [virtual]

Make a copy of the object (reference semantics).

Implements casacore::ImageInterface< T >.

template<class T>
virtual Bool casacore::RebinImage< T >::doGetMaskSlice ( Array< Bool > &  buffer,
const Slicer section 
) [virtual]

Get a section of the mask.

Non-unit strides are not yet supported.

Reimplemented from casacore::MaskedLattice< T >.

template<class T>
virtual Bool casacore::RebinImage< T >::doGetSlice ( Array< T > &  buffer,
const Slicer section 
) [virtual]

Do the actual getting of an array of values.

Non-unit strides are not yet supported.

Implements casacore::Lattice< T >.

template<class T>
virtual IPosition casacore::RebinImage< T >::doNiceCursorShape ( uInt  maxPixels  )  const [virtual]

Get the best cursor shape.

Reimplemented from casacore::LatticeBase.

template<class T>
virtual void casacore::RebinImage< T >::doPutSlice ( const Array< T > &  sourceBuffer,
const IPosition where,
const IPosition stride 
) [virtual]

Putting data is not possible as the lattice is not writable.

Implements casacore::Lattice< T >.

template<class T>
virtual void casacore::RebinImage< T >::flush (  )  [virtual]

Flush the data (but do not unlock).


By default the function does not do anything at all.

Reimplemented from casacore::LatticeBase.

template<class T>
virtual const LatticeRegion* casacore::RebinImage< T >::getRegionPtr (  )  const [virtual]

Get the region used (always returns 0).

Implements casacore::MaskedLattice< T >.

template<class T>
virtual Bool casacore::RebinImage< T >::hasLock ( FileLocker::LockType   )  const [virtual]

Reimplemented from casacore::LatticeBase.

template<class T>
virtual Bool casacore::RebinImage< T >::hasPixelMask (  )  const [virtual]

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

Reimplemented from casacore::MaskedLattice< T >.

template<class T>
virtual String casacore::RebinImage< T >::imageType (  )  const [virtual]

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

Implements casacore::ImageInterface< T >.

template<class T>
virtual Bool casacore::RebinImage< T >::isMasked (  )  const [virtual]

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

Reimplemented from casacore::MaskedLattice< T >.

template<class T>
virtual Bool casacore::RebinImage< T >::isPaged (  )  const [virtual]

Is the RebinImage paged to disk?

Reimplemented from casacore::LatticeBase.

template<class T>
virtual Bool casacore::RebinImage< T >::isPersistent (  )  const [virtual]

A RebinImage is not persistent.

Reimplemented from casacore::LatticeBase.

template<class T>
virtual Bool casacore::RebinImage< T >::isWritable (  )  const [virtual]

An RebinImage is not writable.

Reimplemented from casacore::LatticeBase.

template<class T>
virtual Bool casacore::RebinImage< T >::lock ( FileLocker::LockType  ,
uInt  nattempts 
) [virtual]

Handle the (un)locking and syncing, etc.

Reimplemented from casacore::LatticeBase.

template<class T>
virtual LatticeIterInterface<T>* casacore::RebinImage< T >::makeIter ( const LatticeNavigator navigator,
Bool  useRef 
) const [virtual]

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

Not recommended for general use.

Reimplemented from casacore::Lattice< T >.

template<class T>
virtual String casacore::RebinImage< T >::name ( Bool  stripPath = False  )  const [virtual]

Return the name of the parent ImageInterface object.

Implements casacore::ImageInterface< T >.

template<class T>
virtual Bool casacore::RebinImage< T >::ok (  )  const [virtual]

Check class invariants.

Implements casacore::ImageInterface< T >.

template<class T>
RebinImage<T>& casacore::RebinImage< T >::operator= ( const RebinImage< T > &  other  ) 

Assignment (reference semantics).

Reimplemented from casacore::ImageInterface< T >.

template<class T>
virtual Lattice<Bool>& casacore::RebinImage< T >::pixelMask (  )  [virtual]

Reimplemented from casacore::MaskedLattice< T >.

template<class T>
virtual const Lattice<Bool>& casacore::RebinImage< T >::pixelMask (  )  const [virtual]

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.

Reimplemented from casacore::MaskedLattice< T >.

template<class T>
virtual void casacore::RebinImage< T >::reopen (  )  [virtual]

Explicitly reopen the temporarily closed lattice.


By default the function does not do anything at all.

Reimplemented from casacore::LatticeBase.

template<class T>
virtual void casacore::RebinImage< T >::resize ( const TiledShape newShape  )  [virtual]

Function which changes the shape of the RebinImage.

Throws an exception as resizing an RebinImage is not possible.

Implements casacore::ImageInterface< T >.

template<class T>
virtual void casacore::RebinImage< T >::resync (  )  [virtual]

Resynchronize the Lattice object with the lattice file.

This function is only useful if no read-locking is used, ie. if the table lock option is UserNoReadLocking or AutoNoReadLocking. In that cases the table system does not acquire a read-lock, thus does not synchronize itself automatically.
By default the function does not do anything at all.

Reimplemented from casacore::LatticeBase.

template<class T>
virtual IPosition casacore::RebinImage< T >::shape (  )  const [virtual]

Returns the shape of the RebinImage.

Implements casacore::LatticeBase.

template<class T>
virtual void casacore::RebinImage< T >::tempClose (  )  [virtual]

Temporarily close the lattice.

It will be reopened automatically on the next access.
By default the function does not do anything at all.

Reimplemented from casacore::LatticeBase.

template<class T>
virtual void casacore::RebinImage< T >::unlock (  )  [virtual]

Reimplemented from casacore::LatticeBase.


Member Data Documentation

template<class T>
ImageInterface<T>* casacore::RebinImage< T >::itsImagePtr [private]

Definition at line 195 of file RebinImage.h.

template<class T>
RebinLattice<T>* casacore::RebinImage< T >::itsRebinPtr [private]

Definition at line 196 of file RebinImage.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1