casacore
|
#include <LatticeSlice1D.h>
Public Types | |
enum | Method { NEAREST , LINEAR , CUBIC , N_TYPES } |
Interpolation method. More... | |
Public Member Functions | |
LatticeSlice1D () | |
Default constructor - object useless. More... | |
LatticeSlice1D (const MaskedLattice< T > &lattice, Method method=LINEAR) | |
Constructor More... | |
LatticeSlice1D (const LatticeSlice1D< T > &other) | |
Copy constructor (reference semantics) More... | |
virtual | ~LatticeSlice1D () |
Destructor. More... | |
LatticeSlice1D< T > & | operator= (const LatticeSlice1D< T > &other) |
Assignment operator (reference semantics) More... | |
void | getSlice (Vector< T > &data, Vector< Bool > &mask, const PixelCurve1D &curve, uInt axis0, uInt axis1, const IPosition &coord) |
Get 1-D slice. More... | |
void | getSlice (Vector< T > &data, Vector< Bool > &mask, const IPosition &blc, const IPosition &trc, uInt nPts=0) |
Get 1-D slice between blc & trc. More... | |
void | getPosition (uInt &axis0, uInt &axis1, Vector< Float > &x, Vector< Float > &y, Vector< Float > &distance) const |
Get the (x,y) pixel coordinates from the last slice and the distance along the slice in pixels. More... | |
Method | interpolationMethod () const |
Recover interpolation method. More... | |
Static Public Member Functions | |
static Method | stringToMethod (const String &method) |
Private Member Functions | |
void | checkCurve (IPosition &blc, IPosition &trc, const IPosition &coord, const PixelCurve1D &curve) |
Check the suppliec curve is valid. More... | |
void | findPlane (const IPosition &blc, const IPosition &trc) |
Find the slice plane. More... | |
void | doGetSlice (Vector< T > &data, Vector< Bool > &mask, const PixelCurve1D &curve, const IPosition &blc, const IPosition &trc) |
Get the interpolated slice. More... | |
void | makeInterpolator (Method method) |
Make Interpolator. More... | |
Private Attributes | |
MaskedLattice< T > * | itsLatticePtr |
Interpolate2D * | itsInterpPtr |
Method | itsMethod |
Vector< Float > | itsX |
Vector< Float > | itsY |
Vector< Double > | itsPos |
uInt | itsAxis0 |
uInt | itsAxis1 |
Extract a 1-D slice from a Lattice
Public interface
This class extracts an interpolated 1-D slice from a Lattice with a range of interpolation schemes available. The slice must lie in the plane of two cardinal axes.
Tip:
Users often want to see cross-cuts through their data.
Definition at line 94 of file LatticeSlice1D.h.
enum casacore::LatticeSlice1D::Method |
Interpolation method.
Enumerator | |
---|---|
NEAREST | |
LINEAR | |
CUBIC | |
N_TYPES |
Definition at line 99 of file LatticeSlice1D.h.
casacore::LatticeSlice1D< T >::LatticeSlice1D | ( | ) |
Default constructor - object useless.
casacore::LatticeSlice1D< T >::LatticeSlice1D | ( | const MaskedLattice< T > & | lattice, |
Method | method = LINEAR |
||
) |
Constructor
casacore::LatticeSlice1D< T >::LatticeSlice1D | ( | const LatticeSlice1D< T > & | other | ) |
Copy constructor (reference semantics)
|
virtual |
Destructor.
|
private |
Check the suppliec curve is valid.
|
private |
Get the interpolated slice.
|
private |
Find the slice plane.
void casacore::LatticeSlice1D< T >::getPosition | ( | uInt & | axis0, |
uInt & | axis1, | ||
Vector< Float > & | x, | ||
Vector< Float > & | y, | ||
Vector< Float > & | distance | ||
) | const |
Get the (x,y) pixel coordinates from the last slice and the distance along the slice in pixels.
. Also recover the axes of the slice plane
void casacore::LatticeSlice1D< T >::getSlice | ( | Vector< T > & | data, |
Vector< Bool > & | mask, | ||
const IPosition & | blc, | ||
const IPosition & | trc, | ||
uInt | nPts = 0 |
||
) |
Get 1-D slice between blc & trc.
These start and end points must be in a cardinal plane of the lattice. If nPts is 0 it is set automatically to the length of the slice.
void casacore::LatticeSlice1D< T >::getSlice | ( | Vector< T > & | data, |
Vector< Bool > & | mask, | ||
const PixelCurve1D & | curve, | ||
uInt | axis0, | ||
uInt | axis1, | ||
const IPosition & | coord | ||
) |
Get 1-D slice.
PixelCurve1D supplies the locus of the slice in the plane specified by axis0 and axis1. The pixel coordinate for the rest of the lattice is specified in coord
.
|
inline |
Recover interpolation method.
Definition at line 135 of file LatticeSlice1D.h.
References casacore::LatticeSlice1D< T >::itsMethod.
|
private |
Make Interpolator.
LatticeSlice1D<T>& casacore::LatticeSlice1D< T >::operator= | ( | const LatticeSlice1D< T > & | other | ) |
Assignment operator (reference semantics)
|
static |
|
private |
Definition at line 160 of file LatticeSlice1D.h.
|
private |
Definition at line 161 of file LatticeSlice1D.h.
|
private |
Definition at line 155 of file LatticeSlice1D.h.
|
private |
Definition at line 154 of file LatticeSlice1D.h.
|
private |
Definition at line 156 of file LatticeSlice1D.h.
Referenced by casacore::LatticeSlice1D< T >::interpolationMethod().
|
private |
Definition at line 159 of file LatticeSlice1D.h.
|
private |
Definition at line 157 of file LatticeSlice1D.h.
|
private |
Definition at line 158 of file LatticeSlice1D.h.