RebinImage.h
Classes
- RebinImage -- Rebin an image (full description)
Interface
- Public Members
- RebinImage ()
- RebinImage (const ImageInterface<T>&, const T& factors)
- RebinImage (const RebinImage<T>& other)
- virtual ~RebinImage()
- RebinImage<T>& operator= (const RebinImage<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()
Review Status
- Programs:
- Tests:
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...
To Do
Member Description
Default constructor (object useless)
RebinImage (const ImageInterface<T>&, const T& factors)
Constructor. The bin factors don't have to be integral. Anything left over
at the end is treated as a full bin.
RebinImage (const RebinImage<T>& other)
Copy constructor (reference semantics).
RebinImage<T>& operator= (const RebinImage<T>& other)
Assignment (reference semantics).
virtual ImageInterface<T>* cloneII() const
Make a copy of the object (reference semantics).
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.
Does the image object have a pixelmask?
It does if its parent has a 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.
Get the region used (always returns 0).
A RebinImage is not persistent.
virtual Bool isPaged() const
Is the RebinImage paged to disk?
virtual Bool isWritable() const
An RebinImage is not writable
Returns the shape of the RebinImage
This function returns the recommended maximum number of pixels to
include in the cursor of an iterator.
Function which changes the shape of the RebinImage.
Throws an exception as resizing an RebinImage 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.
Non-unit strides are not yet supported.
virtual void doPutSlice (const Array<T>& sourceBuffer, const IPosition& where, const IPosition& stride)
Putting data is not possible as the lattice is not writable.
Get a section of the mask.
Non-unit strides are not yet supported.
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.
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..